The traditional method of fire detection is based on the data collected by sensors to detect the changes in environmental factors such as temperature and smoke to judge whether a fire has occurred, which has limitations. In recent years, the deep learning model has become more mature, and the convolution neural network (CNN) has the ability to automatically extract image features with greater advantages than traditional methods. Therefore, this paper studies fire detection based on the deep learning model and compares three models. The specific research is as follows: (1) Collecting datasets and architectural pictures through the network and local agents to make the datasets more versatile with the increasing diversity of data; (2) Three models are selected for comparison, including CNN model, VGG16 model and Mobile Net-V2 model. According to the experiment, the deep learning model can effectively identify and detect the fire area. Among the three selected models, the correct rate of Mobile Net-V2 reaches 99.01%. Compared with the other two models, the convolution neural network has poor accuracy. Although the accuracy of the VGG16 model is close to that of Mobile Net-V2, it consumes more computing resources than Mobile Net-V2. In other words, there are too many internal parameters in the model, so Mobile Net-V2 performs best. Based on the research, it is confirmed that three fire detection models involved in this experiment can identify and monitor the fire area efficiently, which has a great guiding significance for the future application of fire prevention..