Since the heat dissipation problem is always confusing and hindering the computing power improvement of electronic chip, an effective thermal management strategy is critical to relieve these problems. In this work, a new twice topology optimization design method combining topology optimization and image processing to design heat sinks is presented, which extends topology optimization from 2Dimention (2D) to 3Dimention(3D). Firstly, on the horizontal design domain, the conventional topology optimization is conducted for the minimization of average temperature/standard deviation. Then the optimal shape of liquid domain is converted into 1D flow routine by thinning algorithm. After that, another topology optimization is performed on the flow channel cross-section plane to get the best cross-section shape of channels. The liquid domain of the final heat sink is then obtained by scanning the optimized flow channel cross-section along the 1 Dimension (1D) flow routine and solving the interference by introducing cylinder joints. Finally, two kinds of twice topology optimized heat sinks including TTOHS-1 with minimized temperature variation as optimal goal and TTOHS-2 with minimized average temperature as optimal goal are generated by combining the liquid domain and a cuboid using Boolean Operation. The performance of heat sinks is numerically investigated, and the results indicate that the thermal performance of TTOHS-1 and TTOHS-2 are much better than that of the traditional heat sink with straight channels (TSCHS). When Re = 689, the average temperature and the maximum temperature of the heat source surface of TTOHS-1 are decreased by 4.99 % and 6.29 % respectively, compared to the TSCHS. The Nusselt number is increased by 46.16 % while the thermal resistance is reduced by 33.13 %. At last, the thermal and flow performance of the TTOHS-1 is studied by conducting experiments, showing that the numerical results agree well with that of the experiment.