test_with_camera#
- test_with_camera.make_boxes(num_detections, detection_boxes, detection_classes, detection_scores)#
Draw the boxes on the frame and label them
- Parameters:
num_detections – Number of detections
detection_boxes – Bounding box coordinates
detection_classes – Class indices
detection_scores – Confidence scores
- Returns:
Frame with bounding boxes and labels
- test_with_camera.interpret(frame, height, width, interpreter, input_details, output_details)#
Interpret the frame and make predictions
- Parameters:
frame – Input frame
height – Frame height
width – Frame width
interpreter – TFLite interpreter
input_details – Input details
output_details – Output details
- Returns:
Number of detections scores: Confidence scores boxes: Bounding box coordinates classes: Class indices
- Return type:
num_detections