Skip to content
\n

def main():
\nmodel = YOLO(\"yoloV8m.pt\")

\n
   webcam_id_1 = 0\n   webcam_id_2 = 1\n\n   cap2 = cv2.VideoCapture(1)# cv2.CAP_DSHOW\n   cap = cv2.VideoCapture(0)# cv2.CAP_DSHOW\n\n   thread2 = Thread(target=webcam_inference, args=(webcam_id_2, model, cap2))\n   thread1 = Thread(target=webcam_inference, args=(webcam_id_1, model, cap))\n\n   thread2.start()\n   thread1.start()\n  \n   thread1.join()\n   thread2.join()\n
\n

if name == \"main\":
\nmain()

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

I found the solution with the help of another form, but if anyone comes by here and needs it, here's where you can read the solution: https://forum.opencv.org/t/real-time-inference-on-dual-webcams-in-parallel/14729

","upvoteCount":1,"url":"https://github.com/roboflow/notebooks/discussions/209#discussioncomment-7173598"}}}

inference on 2 webcams in parallel #209

Discussion options

You must be logged in to vote

I found the solution with the help of another form, but if anyone comes by here and needs it, here's where you can read the solution: https://forum.opencv.org/t/real-time-inference-on-dual-webcams-in-parallel/14729

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SkalskiP
Comment options

Answer selected by SkalskiP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants