Skip to content

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

Closed
wants to merge 5 commits into from
Closed

Add SmallNORB Dataset #492

wants to merge 5 commits into from

Conversation

mavanb
Copy link

@mavanb mavanb commented May 8, 2018

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:

  • 'stereo': include both left and right. Return them as stereo pairs (left and right pair). Usage: in case the user wants to use the stereo effect.
  • 'all': include left and right. Return as single image (either left or right). Usage: in case the user wants include the whole data set, but wants to be able to shuffle. This mode thus allows
    shuffling over pairs.
  • 'left': include only left. Return as single image (left). Usage: in case the user wants to exclude images that are very similiar. Only half the data set is loaded, which reduces memory usage.
  • 'right': same as 'left', but then with 'right' images.

@luyaor
Copy link

luyaor commented May 14, 2018

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,
Luyao


# 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"])

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]

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 "=="

@pmeier pmeier self-assigned this Apr 8, 2022
@yassineAlouini
Copy link
Contributor

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.

@pmeier
Copy link
Collaborator

pmeier commented May 23, 2022

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.

@yassineAlouini
Copy link
Contributor

@pmeier Yes, I can ask for it to be added. Do you also want me to review the code? 🤔

@pmeier
Copy link
Collaborator

pmeier commented May 23, 2022

Do you also want me to review the code? thinking

Nope, we can do that on the PR that ports this to the new API. You should however mention this PR.

@mavanb
Copy link
Author

mavanb commented May 23, 2022

Sorry, I do not work with this dataset or even pytorch anymore. Feel free to close the PR and mention it elsewhere if someone wants to pick it up and reuse some elements.

@pmeier pmeier closed this May 23, 2022
rajveerb pushed a commit to rajveerb/vision that referenced this pull request Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants