You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenCV VideoCapture object deadlocks the data loader or throws different errors when multiple workers try to access the same video file. The current logic implemented in the dataset is workable for Linux env but not Windows. The self.multiprocessing attribute doesn't prevent num_worker > 0 from being handled either.
To Reproduce
dataset = VideoFileDataset(video_source = "video.mp4", multiprocessing = True)
dataloader = torch.utils.data.Dataloader(dataset, batch_size = 2, num_worker = 2)
for batch in dataloader:
print(hello)
Expected behaviour
Dataloader will deadlock when trying to create the same cv2.VideoCapture object on same video (behaviour could be different in different video files)
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Windows
Pyhton > 3.9
The text was updated successfully, but these errors were encountered:
Describe the bug
OpenCV VideoCapture object deadlocks the data loader or throws different errors when multiple workers try to access the same video file. The current logic implemented in the dataset is workable for Linux env but not Windows. The self.multiprocessing attribute doesn't prevent num_worker > 0 from being handled either.
To Reproduce
dataset = VideoFileDataset(video_source = "video.mp4", multiprocessing = True)
dataloader = torch.utils.data.Dataloader(dataset, batch_size = 2, num_worker = 2)
for batch in dataloader:
print(hello)
Expected behaviour
Dataloader will deadlock when trying to create the same cv2.VideoCapture object on same video (behaviour could be different in different video files)
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Windows
Pyhton > 3.9
The text was updated successfully, but these errors were encountered: