Add multi-stream saving feature (#3864)
* Added the recording feature for multiple streams Thanks for the very cool repo!! I was trying to record multiple feeds at the same time, but the current version of the detector only had one video writer and one vid_path! So the streams were not being saved and only were initialized with one frame and this process didn't record the whole thing. Fix: I made a list of `vid_writer` and `vid_path` and the `i` from the loop over the `pred` took care of the writer which need to work! I hope this helps, Thanks! * Cleanup list lengths * batch size variable * Update datasets.py Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
d3e9d69850
commit
9d86b54eb3
2 files changed
+11
-9
No files matched your search
+1
-1
@@ -352,7 +352,7 @@ class LoadStreams: # multiple IP or RTSP cameras
|
||||
return self.sources, img, img0, None
|
||||
|
||||
def __len__(self):
|
||||
return 0 # 1E12 frames = 32 streams at 30 FPS for 30 years
|
||||
return len(self.sources) # 1E12 frames = 32 streams at 30 FPS for 30 years
|
||||
|
||||
|
||||
def img2label_paths(img_paths):
|
||||
|
||||
Reference in new issue
Block a user