modify the event pickle file

This commit is contained in:
18262620154
2024-07-28 19:21:27 +08:00
parent f14faa323e
commit 0ccfd0151f
152 changed files with 57 additions and 27 deletions

View File

@ -311,6 +311,9 @@ def yolo_resnet_tracker(
h = int(vid_cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
else: # stream
fps, w, h = 25, im0.shape[1], im0.shape[0]
## for image rotating in dataloader.LoadImages.__next__()
w, h = im0.shape[1], im0.shape[0]
vdieo_path = str(Path(vdieo_path).with_suffix('.mp4')) # force *.mp4 suffix on results videos
vid_writer[i] = cv2.VideoWriter(vdieo_path, cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
vid_writer[i].write(im0)
@ -594,6 +597,9 @@ def run(
h = int(vid_cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
else: # stream
fps, w, h = 30, im0.shape[1], im0.shape[0]
## for image rotating in dataloader.LoadImages.__next__()
w, h = im0.shape[1], im0.shape[0]
save_path = str(Path(save_path).with_suffix('.mp4')) # force *.mp4 suffix on results videos
vid_writer[i] = cv2.VideoWriter(save_path, cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
vid_writer[i].write(im0)