Target detection and flame identification play a critical role in the industry. Unfortunately, current inspection systems are unable to reliably and easily identify flames. For this reason,, a convolutional neural network Alexnet is proposed for target detection. A webcam approach is used for image capture and collection, followed by network training. The target detection and recognition of flames are finally completed. Experimental results demonstrate that the algorithm as well as the Alexnet network can efficiently and accurately identify localized flames.