readers.video - Sampling from a subset of frames
Open
@klecki is already working on this.
Since Oct 27, 2022.
PyTorch Lightning
question
Video
- Dominant language
- C++
- Stars
- 5.8k
- Forks
- 678
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 27
Description
Hi. I want to achieve the following result, if possible.
SCENARIO
I am working on a project regarding faces. I have long (labeled) video footage of which only few segments are interesting. Maybe I have a face track from frame S1 to E1, then another face track from S2 to E2 and so on. I have big json file with all these tracks, and relative bounding boxes. Eg:
[======= F1 =======]
: [====== F2 ======]
[-----|------------|-----|----------|-----] t
0 100 300 400 600 700
Then I have this info in the json:
100 -> BBox
101 -> BBox
...
350 -> [BBox, BBox]
...
450 -> BBox
...
600 -> BBox
EXPECTED BEHAVIOR
I want the video reader to return a batch where each sample is (frame, bounding box)
Tuple[NDArray, Tuple[int, int, int, int]]
- valid frames only (e.g. in the example above excluding range 0-99 and 601-700)
- one BBox. Or the full list, then I could randomly choose one of them.
In this moment I am not interested into temporal ranges (that's the next step), just sequence length of 1 is fine.
Is there a way to achieve this?
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.
Assessment
This issue has not been assessed yet.