-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
test/test_datasets.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you go with my suggestion from #4860 (comment), we probably don't need these tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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