ultralytics 8.0.225 multi-video tracker bug fix (#6862)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
2b49d71772
commit
093943e375
4 changed files with 16 additions and 7 deletions
|
|
@ -345,9 +345,9 @@ class BasePredictor:
|
|||
else: # 'video' or 'stream'
|
||||
frames_path = f'{save_path.split(".", 1)[0]}_frames/'
|
||||
if self.vid_path[idx] != save_path: # new video
|
||||
self.vid_path[idx] = save_path
|
||||
if self.args.save_frames:
|
||||
Path(frames_path).mkdir(parents=True, exist_ok=True)
|
||||
self.vid_path[idx] = save_path
|
||||
self.vid_frame[idx] = 0
|
||||
if isinstance(self.vid_writer[idx], cv2.VideoWriter):
|
||||
self.vid_writer[idx].release() # release previous video writer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue