Work in the field of fire and smoke detection is becoming an increasingly covered subject. Conventional algorithms use exclusively models based on feature vectors. These vectors are difficult to define and depend largely on the type of fire being treated. These traditional methods give results with low detection rates and high false classification rates. The current trend is to take an innovative approach to solving this problem by using an algorithm to automatically determine useful features to classify fire and smoke. In this paper, we propose a convolutional neural network to identify fire and smoke from real-time images. Convolutional neural networks have shown their great performance in the field of object classification. Tested on real image sequences, the proposed approach achieves better classification performance than conventional methods. These results clearly indicate that the use of convolutional neural networks for fire detection is very encouraging.