In this project, we will be using OpenCV2 to develop an object detection system using Python. OpenCV2 is a powerful computer vision library that provides various functions and tools for image and video processing.
The objectives of this project are:
the class of the object just like object-oriented programming
the classes that the training model can predict are in the
requirements.txt
the score of the guess of the object
the boxes surrounded around the object with coordinates
while True:
ret, frame = cap.read()
#object dection() #bboxes or boxes
(class_ids, scores, bboxes)= model.detect(frame) #class ids, score, boxess
#display objects
for class_id, score, bbox in zip(class_ids, scores, bboxes):
(x, y, w, h) = bbox
print(x, y, w, h)
cv2.rectangle(frame, (x,y), (x + w, y +h), (200, 0, 90), 4)