Coal gangue separation is one of the important links in the process of coal mining. High gangue content will lead to low combustion efficiency of power plants and serious environmental pollution. Through field investigation and investigation, it is found that at present, most mines still use manual gangue separation. The dust in the coal preparation bunker is large and the light is dark. Long-term and high load work will not only harm the health of workers, It will also affect the sorting efficiency. Based on this, this paper proposes a deep learning target detection algorithm to replace manual gangue selection, but the target detection algorithm depends on a large number of coal and gangue images for training to achieve better robustness. In order to overcome the problem of small number of data sets and poor quality in the automatic sorting of coal gangue based on deep learning methods, the paper proposes an image expansion method based on Deep Convolutional Generative Adversarial Networks(DCGAN),which adds a feature fusion part to the generator network It is used to improve the diversity of the output image, and at the same time, the loss function is improved to Wasserstein distance to overcome the problem of the disappearance of the generator gradient. The experimental results show that the images generated by the improved DCGAN network have good performance in diversity and quality. The images generated by the improved DCGAN network increase the accuracy of coal gangue recognition by 5.87%.