6 ms·
Just stream it one frame at a time to the model and eat the latency: https://www.youtube.com/watch?v=IHbJcOex6dk https://www.youtube.com/watch?v=IHbJcOex6dk if
by llm_trw 2y ago
Just stream it one frame at a time to the model and eat the latency: https://www.youtube.com/watch?v=IHbJcOex6dk https://www.youtube.com/watch?v=IHbJcOex6dk if you need more hand holding.
There's a reason why there's a whole family of models from tiny to huge.
- yeldarb 2y agoIf you do it naively your video frames will buffer waiting to be consumed causing a memory leak and eventual crash (or quick crash if you’re running on a device with constrained resources). You really need to have a thread consuming the frames and feeding them to a worker that can run on its own clock.
- llm_trw 2y agoThat's not how loop devices work on Linux.
- _giorgio_ 2y agoSorry for the newbie question Under windows, say that I have an RTSP stream (or something similar) Would you use a single python script with which one of this multithreading solutions? 1 import concurrent.futures 2 import multiprocessing 3 import threading
- _giorgio_ 2y agoThanks for the link, but what happens when you have a video stream, be it a usb webcam, or an RTSP stream, and the hardware can't keep up? I'm on windows. Ideally I'd like the frames to be dropped, so the inference is done on the last received frame? Is this a standard behaviour?