results = model(frame, verbose=False)[0]
detections = sv.Detections.from_ultralytics(results)
detections = detections[np.isin(detections.class_id, selected_classes)]
labels = [
f"{CLASS_NAMES_DICT[class_id]} {confidence:0.2f}"
for confidence, class_id in zip(detections.confidence, detections.class_id)
]
annotated_frame = corner_annotator.annotate(scene=frame, detections=detections)
sv.plot_image(annotated_frame, (16, 16))