Skip To Main Content
Support Knowledge Base

Unable to Determine the Confidence Values from Output Results of MobileNetV2 Backbone with ATSS Head Model

Content Type: Troubleshooting   |   Article ID: 000098366   |   Last Reviewed: 04/13/2024

Description

  • Installed OpenVINO™ Training Extension 2023.3.
  • Trained a custom MobileNetV2 Backbone with ATSS Head Model.
  • Obtained output results with boxes,labels value.
  • Unable to determine the confidence values of the results.

Resolution

  • Confidence values are included in the boxes output blob with the following format:
    [x_min, y_min, x_max, y_max, conf]
  • Code snippet for extracting the confidence values from boxes output blob:

for i, detection in enumerate(detections):

class_id = labels[i]

xmin, ymin, xmax, ymax, confidence = detection
 

if confidence > 0.5:

label = int(labels[class_id])
 

xmin = int(xmin * w)

ymin = int(ymin * h)

xmax = int(xmax * w)

ymax = int(ymax * h)
 

log.info(f'Found: label = (label), confidence = (confidence:.2f), ' f'coords = ((xmin), (ymin)), ((xmax), (ymax)) ')

Related Products

This article applies to 1 products.