# Deep Learning Application in Dental Caries Detection Using Intraoral Photos Taken by Smartphones
## 2 Materials and Methods
### Deep Learning Architecture  
Deep learning is a class of artificial neural networks with many advances and has been applied successfully in computer vision including object detection [16]. Different variations of deep learning architecture are developed for object detection problems that are the general model of caries lesion detection. Therefore, in this section, we describe some selected deep learning models for the automatic detection of caries. We also present the data preparation, training process, and analysis method for these techniques. In terms of technique, different deep learning architectures can be used, such as Fast R-CNN, Faster R-CNN, RetinaNet, YOLOv3, SSD, etc., for automatic detection of caries lesions from intraoral images. They are meta-network architecture, and there is no systematic study comparing these technologies' performance in general. The algorithms designed to perform object detection are commonly based on two approaches: one-stage object detection and two-stage object detection. Regrading two-stage detectors, they have high localization and recognition accuracy [20]. Previous studies concluded that Faster R-CNN seemed to be the best at detecting small objects due to its power and its stability [17; 18; 19]. The dental caries lesions in our study were also small and had low contrast. Therefore, a two-stage detector, Faster R-CNN was selected. Herein, a brief introduction of the Faster R-CNN architecture, its implementation, and the training process are presented. The core blocks of a Faster R-CNN model are depicted generally in Figure 3, and its details can be found in a study by [PERSON] et al. [21]. In Faster R-CNN architecture, convolutional layers are a convolutional neural network, and they work as a feature extraction block. In this study, we tested several CNN networks, including VGG16, Xception, and ResNet50 Inception-Resnet-v2. In the final version, the Inception-Resnet-v2 network was chosen. The architecture of Inception-Resnet-v2 implementation was introduced in detail to the public [22]. Faster R-CNN used a region-based proposal network to identify bounding boxes. On the other hand, one-stage detectors obtain high inference speeds. They include the algorithms of the YOLO family, SSD family, and RetinaNet family. The first YOLO version  
Figure 3: Faster-RCNN architecture. was introduced by [PERSON] et al. in 2015 [23], and an updated version of YOLOv3 was presented in 2018 [24]. In principle, YOLOv3 uses only one single neural network trained by an end-to-end model. The model takes an image as input data, predicts bounding boxes containing objects, and labels each bounding box. Like the previous YOLO versions, YOLOv3 uses the \"dimensional clustering proposal\" algorithm to identify bounding boxes. The YOLOv3 network architecture is shown in Figure 4, which was presented in the study of [PERSON] et al. [25]. SSD, introduced by [PERSON] et al. [26], generates a set of fixed-size bounding boxes on a feature map (also known as the offsets of the bounding box) and the relative scores presenting the label of the object contained. After that, the non-maximum suppression step is applied to combine generated bounding boxes to obtain a final predicted result. Similar to YOLO, the special feature to make the high speed of the SSD is that the model uses only a single neural network. In SSD, the model creates a grid of squares on the feature maps, and each cell is called a feature map cell. From the center of each feature map cell, a set of default boxes is defined to predict the frame that is capable of enclosing objects. The SSD training process has its own matching strategy [26] to refine the probability of the label and bounding box to match the model's ground truth input values (including labels and bounding box offsets). Moreover, the network is combined with many feature maps with different resolutions to detect objects of various sizes and shapes.