import cv2

from genericDetector import GenericDetector

model_path='models/object_detection_mobile_object_localizer_v1_1_default_1.tflite'
threshold = 0.3

# Initialize object detection model
detector = GenericDetector(model_path, threshold)

# Initialize webcam
cap = cv2.VideoCapture(0)
cv2.namedWindow("Detections", cv2.WINDOW_NORMAL)

while(True):
    ret, frame = cap.read()

    # Draw the detected objects
    detections = detector(frame)
    detection_img = detector.draw_detections(frame, detections)

    
    cv2.imshow("Detections", detection_img)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
6a5be9649a013e35ea77d7722df2ac9d0c226752
<mask token>

<mask token>
cv2.namedWindow('Detections', cv2.WINDOW_NORMAL)
while True:
    ret, frame = cap.read()
    detections = detector(frame)
    detection_img = detector.draw_detections(frame, detections)
    cv2.imshow('Detections', detection_img)
    if cv2.waitKey(1) & 255 == ord('q'):
        break

<mask token>
model_path = (
    'models/object_detection_mobile_object_localizer_v1_1_default_1.tflite')
threshold = 0.3
detector = GenericDetector(model_path, threshold)
cap = cv2.VideoCapture(0)
cv2.namedWindow('Detections', cv2.WINDOW_NORMAL)
while True:
    ret, frame = cap.read()
    detections = detector(frame)
    detection_img = detector.draw_detections(frame, detections)
    cv2.imshow('Detections', detection_img)
    if cv2.waitKey(1) & 255 == ord('q'):
        break

import cv2
from genericDetector import GenericDetector
model_path = (
    'models/object_detection_mobile_object_localizer_v1_1_default_1.tflite')
threshold = 0.3
detector = GenericDetector(model_path, threshold)
cap = cv2.VideoCapture(0)
cv2.namedWindow('Detections', cv2.WINDOW_NORMAL)
while True:
    ret, frame = cap.read()
    detections = detector(frame)
    detection_img = detector.draw_detections(frame, detections)
    cv2.imshow('Detections', detection_img)
    if cv2.waitKey(1) & 255 == ord('q'):
        break

import cv2

from genericDetector import GenericDetector

model_path='models/object_detection_mobile_object_localizer_v1_1_default_1.tflite'
threshold = 0.3

# Initialize object detection model
detector = GenericDetector(model_path, threshold)

# Initialize webcam
cap = cv2.VideoCapture(0)
cv2.namedWindow("Detections", cv2.WINDOW_NORMAL)

while(True):
    ret, frame = cap.read()

    # Draw the detected objects
    detections = detector(frame)
    detection_img = detector.draw_detections(frame, detections)

    
    cv2.imshow("Detections", detection_img)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break