Using list as path/clips/frames containers lead to memory leaks for very large datasets and num_workers>1
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
Hi,
The class VideoClips uses the list datastructure to store video_paths, clips, frame_rate etc. However, In multi-dataloader workers paradigm and for very large datasets (Kinetics400/700), this leads to memory leaks. This is described in this issue
https://github.com/pytorch/pytorch/issues/13246
Please replace it with either torch tensor/panadas dataframe/ numpy arrays
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked VideoClips implementation in torchvision/datasets/video_utils.py and read the referenced PyTorch issue for context on multiprocessing memory growth. The issue proposes replacing list-based containers with tensor, dataframe, or NumPy alternatives; done means addressing the reported memory problem for large datasets with multiple workers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100