13. SSD model validation
After training the SSD model for 200 epochs, the performance can be validated. Three possible metrics for evaluation are used: 1) IoU, 2) Precision, and 3) Recall.
The first metric is mean IoU (mIoU). Given the ground truth test dataset, the IoU between the ground truth bounding box and predicted bounding box is computed. This is done for all ground truth and predicted bounding boxes after performing NMS. The average of all IoUs is computed as mIoU:
where nbox is the number of ground truth bounding boxes bi and npred is the number of predicted bounding boxes dj. Please note that this metric does not validate if the two overlapping bounding boxes belong to the same class. If this is required, then the code can be easily modified. Listing 11.13.1 shows the code implementation.
The second metric is precision as shown in Equation 11.3.2. It is the number of object categories correctly predicted (true positive or TP) divided...