-
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 Kitti and Sintel datasets for optical flow #4845
Conversation
💊 CI failures summary and remediationsAs of commit ac4eaab (more details on the Dr. CI page):
2 failures not recognized by patterns:
1 job timed out:
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.
Just a few thoughts:
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.
Thanks!
There were problems with older datasets that returning tuple doesn't allow for easy adding extra fields in the future, e.g. #3608. I propose to return img, target_dict tuple (even better may be always returning a single dict for the cases of skipping actual image loading). And there is more unity when iterating between different related datasets. |
@vadimkantorov We are aware of that and the new prototype dataset API will always return a single dictionary per sample. There is no documentation yet, but if you want to you can have a look into |
If you're committed to using only tuples, please also return some internal example id, image/video file name or something of this form. Then at least people can hack around and fetch additional information |
Thanks for your input @vadimkantorov I don't think any of the datasets return that kind of info so far (sadly), so returning a dict with extra info would make KittiFlow and Sintel outliers w.r.t. what we currently have. Returning the ids etc. is definitely useful, but such new design is better suited for a complete re-work of the datasets, which we are currently doing as @pmeier pointed out above. |
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.
LGTM, thanks!
Definitely interesting to see how the ideas mentioned above can be incorporated on the new API but I think it's worth merging this PR to unblock your work on the flow models.
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.
LGTM, thanks @NicolasHug!
Reviewed By: kazhang Differential Revision: D32216685 fbshipit-source-id: ec74c2a573eace36bd4a0cf9913ea1dc77fcf260
This PR Adds the Kitti and Sintel datasets for optical flow.
Here are a few design decisions, following our initial discussion (in this PR):
Unlike Sintel, Kitti has a built-in
valid
mask indicating which flow values are returned. As a resut Sintel returnsimg1, img2, flow
while Kitti returnsimg1, img2, flow, valid
.For both these datasets, the targets aren't known if split="test" so we return
img1, img2, None
andimg1, img2, None, None
in these cases.For both,
flow
is a numpy array of shape (2, H, W) and valid is a boolean numpy array of shape (H, W). The images are PIL images.The transforms expect to receive
img1, img2, flow, valid
, even for Sintel, and even in test mode.add tests
write docs
cc @pmeier