Remove streaming source sleep period (#8243)
Negatively impacts YouTube inference but removes any lag on webcams/RTSP/RTMP etc. Resolves https://github.com/ultralytics/yolov5/issues/4465
This commit is contained in:
parent
75bbaa8f44
commit
86e6add07b
|
|
@ -359,7 +359,7 @@ class LoadStreams:
|
||||||
LOGGER.warning('WARNING: Video stream unresponsive, please check your IP camera connection.')
|
LOGGER.warning('WARNING: Video stream unresponsive, please check your IP camera connection.')
|
||||||
self.imgs[i] = np.zeros_like(self.imgs[i])
|
self.imgs[i] = np.zeros_like(self.imgs[i])
|
||||||
cap.open(stream) # re-open stream if signal was lost
|
cap.open(stream) # re-open stream if signal was lost
|
||||||
time.sleep(1 / self.fps[i]) # wait time
|
time.sleep(0.0) # wait time
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
self.count = -1
|
self.count = -1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue