# Thermal Threat Monitoring Using Thermal Image Analysis and Convolutional Neural Networks
## 4 Experiments and Results  
The results of hand detection and threat level classification obtained using the developed algorithm are presented below. Hot object detection is a task that is easy to accomplish using classic image segmentation methods (e.g., thresholding). Therefore, there are no requirements for the number of training images. Detection of the risk of burns is based on the CNN network and in this case the size of the image set affects the results obtained. Depending on the number of images in the examined set, the algorithm obtained different results in terms of the effectiveness of detecting the risk of burns. Thus, for 10,590 images (50% of the entire set), the accuracy reached 0.975. When the number of images was 15,885 (75% of the entire set), the algorithm achieved Acc = 0.986. For the full set of 21,180 images, it was 0.995. The algorithm reached Acc above 0.9 for approximately 5295 images (25% of the entire set). The first block of algorithm detects hot objects with a temperature that poses a threat to health with 100% efficiency. The threshold value of 70 degrees Celsius makes it possible to detect objects that threaten to burn quickly. The algorithm block which is responsible for burn detection requires a more complex image analysis. Using the proposed CNN-based model, the system will be able to determine with high efficiency whether there are hands or arms in the analyzed image. At the beginning of the study, several different network configurations and structures were tested and compared. To evaluate the performance of the model, four typical values of accuracy, precision, specificity and sensitivity, based on the confusion matrix determining the number of correct and incorrect hand detections in images, were proposed. The set was divided into training and test sets in two configurations (similar to [19,21]): 75/25 and 90/10, and the impact on the learning process was verified. As can be seen in Table 1, the algorithm achieves very good results for various set configurations. Further research and results concern a set divided in a 90/10 ratio (19,062 training images and 2118 test images). Some selected cases of correct and incorrect hand detection are presented below. Figure 8 shows cases where the algorithm correctly responded to the presence of hands (TP) and the presence of hot objects at the same time. In some cases, even images with a small portion of the hand are classified correctly. Figure 9 shows examples of images where the algorithm detected hands even though they do not actually appear in the image--in expert opinion (FP). This situation results from the existence of areas of warm air (with a temperature and shape similar to that of the hand) surrounded by hot objects. The next images in Figure 10 are examples where the algorithm did not correctly detect hands (TN) because they do not appear in the images. In such a situation, the algorithm should only warn about the existence of a hot object, but the level and intensity of warning may be lower. Figure 11 shows false negative cases (FN), in which the algorithm did not detect hands even though they are actually present in the image. They only constitute less than 0.2% percent, which is very important because it is a key element of the algorithm whose operation affects the safety of the system user. The lack of hand detection may be caused by too small parts of the hand visible in the image (which only appear in the field of view of the camera) or by interference in the hand area resulting from the camera operation. Bearing in mind that the algorithm analyses subsequent frames continuously, the hand will be detected when most of it appears in the image. However, if the hand is not detected, the high-temperature detection block will inform the user about the hot object, which should increase their alertness.