# Root Dilaceration Using Deep Learning:
## 2 Materials and Methods
### Evaluation Criteria  
Object detection tasks are mainly evaluated by mean average precision (mAP), which is a standard metric used to assess performances of object detection models in computer vision. Many object detection algorithms and benchmark challenges use it to evaluate models, for instance, detectors such as Faster R-CNN, YOLO, SSD, and MobileNet. On the other hand, Pascal, VOC and COCO challenges utilize mAP.  
Calculation of mAP is related to Intersection over Union (IOU). IOU refers to the overlap of the predicted bounding box and the ground truth. Values close to 1 show how close the predicted bounding box is to the ground truth.  
\[IoU=\frac{area(ground\ truth\cap predicted)}{area(ground\ truth\cup predicted)} \tag{1}\]  
IOU is primarily used for a confusion matrix that is a table listing predictions and ground truths for each class. It gives classifier performance with four values: true positive, true negative, false positive, and false negative. Evaluation metrics such as accuracy, precision, recall and F1 score are calculated using a confusion matrix, as presented in Table 1. Accuracy defines the number of correct predictions over all the predictions. Precision measures how correct the positive predictions made are. Recall, or sensitivity, measures how correct true positives are over all predictions. F1 score measures how correct the model finds true positives over all predictions. It takes precision and recall together and outputs a single metric that is more sensitive to a lower value, which makes it an optimal confidence metric.  
Object detection tasks make use of IOU to calculate precision in such a way that if an object has a higher IOU with respect to ground truth than the IOU-threshold, mostly 0.5, it is then classified as a true positive. Mean average precision (mAP), on the other hand, refers to the average of average precision (AP) of each class. AP is calculated by the area under precision-recall curve with distinct IOU thresholds as shown in Table 2.  
\begin{table}
\begin{tabular}{c c} \hline Precision & True Positive/True Positive + False Positive \\ \hline Recall (sensitivity) & True Positive/True Positive + False Negative \\ \hline Accuracy & True Positive + True Negative/All predictions \\ \hline F1 Score & 2 * True Positive/2 * True Positive + False Positive + False Negative \\ \hline \end{tabular}
\end{table}
Table 1: Calculation of precision, recall, accuracy and F1 score based on confusion matrix.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Average Precision** & **Mean Average Precision for n-Classes** \\ \hline \(AP_{threshold}=\int_{0}^{1}p(x)dx\) & \(mAP_{threshold}=\frac{1}{n}\sum\limits_{i=1}^{n}AP_{i}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Equations for average precision and mean average precision.  
Some of the Common Objects in Context (COCO) metrics appear in the precision-recall curve so that area under curve (AUC) is provided for different metrics as a figure legend. Briefly, C75 and C50 indicate an AUC for IOU of 0.75 and 0.5, respectively. Loc cites AUC ignoring localization errors. Sim, Oth and FN show AUC while removing super-category class confusions, class confusions and all remaining errors, respectively.