Skip to content
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

[documentation] Pair descriptions #6

Closed
Steven-N-Hart opened this issue Aug 12, 2021 · 2 comments
Closed

[documentation] Pair descriptions #6

Steven-N-Hart opened this issue Aug 12, 2021 · 2 comments

Comments

@Steven-N-Hart
Copy link

When processing images using the utils script , could you clarify the definitions of the inputs?

I'm assuming:

  • self.targets: a list of reference image
  • self.data: a list of images of an alternate class

In this way I would expect that the __get_item__() would return either

  1. two random transformations of the images from a different class, plus the original target
  2. Or if using the positive pair strategy, return 1 augmented non class image, 1 augmented image of the same class, and the target.

Could you confirm if I have this correct?

@joshr17
Copy link
Owner

joshr17 commented Aug 26, 2021

Hi Steven,

self.targets and self.data are lists that store the full dataset and each samples label (if there are no labels, then self.targets is a list of None's. I suspect the reason this is a little confusing here is that these variables are not explicitly defined in my code. Instead, for the three datasets I look at here (CIFAR10, CIFAR100, STL10) all of these attributes are inherited from their base class from the torch library (see e.g. the definition of CIFAR10Pair).

To see a concrete example of what these look like then I recommend loading the torch CIFAR10 dataset and simply printing these two variables.

Hope this helps,

Josh

@joshr17
Copy link
Owner

joshr17 commented Sep 9, 2021

Feel free to re-open if you have any further questions!

@joshr17 joshr17 closed this as completed Sep 9, 2021
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

No branches or pull requests

2 participants