# Models to Identify Small Brain White Matter Hyperintensity Lesions
## 4 Results
### Detection and Classification
#### 4.3.2 DETECTRON2 Model for Detection and Classification  
Figure 24 shows the model's loss and accuracy when trained with the private dataset to detect and classify the lesions. Figure 23: Confusion matrix of the YOLO classification to distinguish between ischemic and demyelination lesions using the pre-trained “yolov8n-seg.pt” model. The images on the top right side and lower sections are examples of the classification of the lesions with their corresponding confidence scores in predicting each lesion type. These results highlight the model’s effectiveness in lesion classification while revealing potential challenges in differentiating lesions with similar radiological characteristics. Table 9 shows the mean values of the metrics from function loss and the accuracy of the Detectron2 model for lesion detection and classification. These values are complemented by the corresponding graphs in Figures 25-27. We note that: \begin{table}
\begin{tabular}{l l l l l l l l l l} \hline \hline  & **loss\_box\_reg** & **loss\_cls** & **loss\_mask** & **loss\_rpn\_cls** & **loss\_rpn\_loc** & **total\_loss** & **mask\_rcnn/** & **fast\_rcnn/** & **Mask\_rcnn/** & **false** \\  & **loss\_rpn\_cls** & **loss\_rpn\_cls** & **loss\_rpn\_loc** & **total\_loss** & **accuracy** & **cls\_accuracy** & **negative** & **positive** \\ \hline
**Instances** & 34200 & 3420 & 3420 & 3420 & 3420 & 3420 & 3420 & 3420 & 3420 & 3420 \\ \hline
**mean** & 0.072 & 0.030 & 0.154 & 0.007 & 0.029 & 0.300 & 0.930 & 0.988 & 0.100 & 0.050 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Statistics of the loss and accuracy curves of the Detectron2 model. Figure 24: Examples of detection and classification of the lesions. The image without a classification is shown on the left side, and the classification prediction with model Detectron2 is shown on the right. The labels “ische” refer to ischemia, and “demy” refer to demyelination diseases, respectively. In the center column, the classification performed by the radiologist expert is shown; the “yellow” color refers to demyelination lesions and the violet color refers to ischemia lesions. Figure 27: Graphs of performance metrics of the classification model over training iterations. (**a**) Accuracy, (**b**) recall, (**c**) precision, and (**d**) F1_score values of the classification model. All values maintain an average value above 0.9, indicating high classification reliability. Figure 25: Training performance metrics for classifying and detecting lesions using the Detectron2 model. (**a**) Loss curves over iterations, including classification loss (orange), bounding box regression loss (blue), mask loss (green), and total loss (brown), indicate the behavior convergence of the model. (**b**) Accuracy metrics over iterations, illustrating the classification performance of the Fast R-CNN and Mask R-CNN models. The increasing accuracy trends suggest improved learning stability and effectiveness in lesion detection and classification between ischemia and demyelination. * The total loss ('total_loss', mean value 0.300) indicates that the model has learned the essential features needed for classification and stabilization with minor fluctuations. * The box regression loss ('loss_box_reg', mean value 0.072) decreases as the model learns to predict better-bounding boxes after stabilizing at a low value. This indicates that the model has become proficient in predicting bounding box coordinates. * The classification loss ('loss_cls', mean value 0.030), through the pass of iteration, decreases and stabilizes, which suggests the model has learned to classify most of the lesions correctly. * The mask loss ('loss_mask', mean value 0.154), shows decreasing and stabilizing values, which indicate a consistent performance in mask predictions. * The RPN classification loss ('loss_rpn_cls', mean value 0.007) indicates a stabilization, which means that the region proposal classification task model has learned to propose regions accurately.