Add FlyingThings3D dataset for optical flow#4858
Conversation
💊 CI failures summary and remediationsAs of commit ba4cfd6 (more details on the Dr. CI page):
1 failure not recognized by patterns:
This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
pmeier
left a comment
There was a problem hiding this comment.
Some minor comments inline plus you can apply the same comments I had in #4860 here. Otherwise LGTM, thanks @NicolasHug!
test/test_datasets.py
Outdated
| for pass_name in passes: | ||
| for split in splits: | ||
| for letter in letters: | ||
| for subfolder in subfolders: | ||
| current_folder = root / pass_name / split / letter / subfolder | ||
| for camera in cameras: |
There was a problem hiding this comment.
That looks kind of horrifying. Maybe itertools.product?
test/test_datasets.py
Outdated
| for split in splits: | ||
| for letter in letters: | ||
| for subfolder in subfolders: | ||
| for direction in directions: | ||
| current_folder = root / "optical_flow" / split / letter / subfolder / direction | ||
| for camera in cameras: | ||
| os.makedirs(str(current_folder / camera)) | ||
| for i in range(num_images_per_camera): | ||
| datasets_utils.make_fake_pfm_file( | ||
| self.FLOW_H, self.FLOW_W, file_name=str(current_folder / camera / f"{i}.pfm") | ||
| ) |
| def test_bad_input(self): | ||
| with pytest.raises(ValueError, match="split must be either"): | ||
| with self.create_dataset(split="bad"): | ||
| pass |
There was a problem hiding this comment.
If you go with my suggestion from #4860 (comment), we probably don't need these tests.
There was a problem hiding this comment.
I'll go with your suggestion but still keep the test 🤓
| FlyingThings3D | ||
|
|
||
| Args: | ||
| root (string): Root directory of the Sintel Dataset. |
There was a problem hiding this comment.
| root (string): Root directory of the Sintel Dataset. | |
| root (string): Root directory of the FlyingThings3D Dataset. |
|
Hey @NicolasHug! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Reviewed By: kazhang Differential Revision: D32216678 fbshipit-source-id: 1e173234e775e3b6dff2a24e0f257b1d9176eb5c
This PRs adds the FlyingThings3D dataset for optical flow
cc @pmeier