fewshot-CAN icon indicating copy to clipboard operation
fewshot-CAN copied to clipboard

tiered Imagenet dataset

Open ssusie opened this issue 5 years ago • 4 comments

I have downloaded Imagenet dataset (~140GB) then ran tiered imagenet tools on it to build the tiered imagent dataset, but it's not loading properly in your code. The error I am getting is the following:

`Initializing dataset tieredImageNet => tieredImageNet loaded Dataset statistics:

subset | # cats | # images

train | 0 | 0 val | 0 | 0 test | 0 | 0

total | 0 | 0

Traceback (most recent call last): File "train.py", line 188, in main() File "train.py", line 53, in main dm = DataManager(args, use_gpu) File "/home/sargsyan/fewshot-CAN/torchFewShot/data_manager.py", line 81, in init load=args.load, File "./torchFewShot/dataset_loader/init.py", line 21, in init_loader return __loader_factory[name](*args, **kwargs) File "./torchFewShot/dataset_loader/test_loader.py", line 74, in init Tnovel, Exemplar = self._sample_episode() File "./torchFewShot/dataset_loader/test_loader.py", line 88, in _sample_episode Knovel = random.sample(self.labelIds, self.nKnovel) File "/home/sargsyan/anaconda3/envs/pytorch/lib/python3.6/random.py", line 320, in sample raise ValueError("Sample larger than population or is negative") ValueError: Sample larger than population or is negative`

Could you please point me how you built the dataset you used, or provide access to the dataset?

Thank you.

ssusie avatar Feb 01 '20 19:02 ssusie

You can refer to 'https://github.com/kjunelee/MetaOptNet’ to download the tieredImageNet and try again.

blue-blue272 avatar Sep 03 '20 07:09 blue-blue272

The page 'https://github.com/kjunelee/MetaOptNet' seems to have a 404 error. Is there any other way to download tieredImageNet with categories?

johnjongko avatar Jan 25 '21 06:01 johnjongko

@johnjongko I had the same problem. Have you solved the problem?

wwcc1 avatar Aug 27 '22 09:08 wwcc1

this error comes from the file "tieredImageNet.py",you can change the code in line 60 from"if '.JPEG' not in img_path:" to "if '.jpg' not in img_path:".

gaoyangyang-1 avatar Sep 25 '23 11:09 gaoyangyang-1