Open vismayaps opened 5 years ago
If you want to use a webcam, you can replace:
video_reader = cv2.VideoCapture(image_path)
with:
video_reader = cv2.VideoCapture(0)
or if you want to use a RTSP transmission, you could use something like this:
video_reader = cv2.VideoCapture("rtsp://username:password@ip:port/cam/realmonitor?channel=1&subtype=1")
and inside the for loop, you can use this code below to show the image:
cv2.imshow("video", image)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
Read more: https://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html
I have trained on my dataset and weights are generated. I want to test the model on a live video stream connected to a camera and display the live results. Any help would be appreciated.