-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Add SmallNORB Dataset #492
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
Conversation
Dear mavanb, We are researchers working on identifying redundant development and duplicated pull requests. We have found there is a pull request: #493 which might be a potentially duplicate to this one. We would really appreciate if you could help us to validate and give us feedback. Thank you very much for your time! Sincerely, |
torchvision/datasets/smallnorb.py
Outdated
|
||
# read test files | ||
left_test_img, right_test_img = self._read_image_file(self.data_files["test"]["dat"]["name"]) | ||
test_label = self._read_info_file(self.data_files["test"]["info"]["name"]) |
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.
should swap test_label and test_info here
mode ``stereo'': | ||
tuple: (image left, image right, target, info) | ||
""" | ||
target = self.labels[index % 24300] if self.mode is "all" else self.labels[index] |
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.
'is' need to change to "=="
Thanks @mavanb for the contribution and sorry for taking that long to get back at you. As you might know, there is a new dataset API being designed and existing datasets are being ported as discussed here. There is also this issue that lists new datasets that the community wants to add: #3562 For now, the focus is to finish porting existing datasets and then add new ones once the API is stable enough. The best thing to do for now is to wait a bit until the new design is finalized and then get some help to port the dataset to the new design or do it yourself if you feel like it @mavanb. There is this guide that can be useful. Does that work for you? Thanks again for you contribution and sorry for the delay. |
Given that this PR received a few comments from the community although it was never properly reviewed (sorry for that @mavanb!), I guess it is a good idea to add it to the list in #3562. @yassineAlouini could you take that up? Still, as mentioned above, we are revamping our dataset API and thus won't accept any new datasets until that is finished. Since the new API uses a new paradigm, we can't port the changes from this PR 1-to-1. Still, it can serve as basis so the work is not completely wasted. |
@pmeier Yes, I can ask for it to be added. Do you also want me to review the code? 🤔 |
Nope, we can do that on the PR that ports this to the new API. You should however mention this PR. |
Sorry, I do not work with this dataset or even |
I have added a wrapper for the smallNORB dataset. See https://cs.nyu.edu/~ylclab/data/norb-v1.0-small/.
SmallNORB is a iseful intended for experiments in 3D object reocgnition from shape. It is, for example, used by Hinton et al. in Dynamic Routing Between Capsules (2017) and Matrix Capsules with EM routing (2018).
Something that might be reconsidered:
The data set contains stereo pair images, so each sample consists of a left and a right image. Therefore, I include 4 differents modes (is an instantion parameter) for this data set:
shuffling over pairs.