mmfewshot icon indicating copy to clipboard operation
mmfewshot copied to clipboard

About the miniimagenet

Open xiaofeng-c opened this issue 2 years ago • 7 comments

Thank you for yourcontribution,after get the format of miniimage dataset,i train it,but a error occurs as follow: 2022-03-04 18:21:39,431 - mmfewshot - INFO - Set random seed to 0, deterministic: False Traceback (most recent call last): File "/home/dio/VSST/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(**args) File "/home/dio/VSST/zwm/mmfewshot/mmfewshot/classification/datasets/mini_imagenet.py", line 73, in init super().init(*args, **kwargs) File "/home/dio/VSST/zwm/mmfewshot/mmfewshot/classification/datasets/base.py", line 45, in init self.data_infos = self.load_annotations() File "/home/dio/VSST/zwm/mmfewshot/mmfewshot/classification/datasets/mini_imagenet.py", line 140, in load_annotations int(filename.split('.')[0][-5:]) - 1] IndexError: list index out of range do you know what wrong with it?

xiaofeng-c avatar Mar 04 '22 10:03 xiaofeng-c

The picture format of original miniimage dataset just like 0153282900005.jpg,i try to get the format of n01532829_5.jpg according to the guidance.

xiaofeng-c avatar Mar 04 '22 11:03 xiaofeng-c

@linyq17 Would you mind taking a look at this issue?

jshilong avatar Mar 09 '22 15:03 jshilong

Currently, we read images directly from the original ImageNet. To adapt to a format like 0153282900005.jpg, the code needs some modifications.

linyq17 avatar Mar 10 '22 08:03 linyq17

Ok,thank you,that means we must use the whole ImageNet dataset?

xiaofeng-c avatar Mar 11 '22 02:03 xiaofeng-c

don't need! Just delete some code!

Leeinsn avatar May 14 '22 05:05 Leeinsn

can I ask where should I delete?

Troyella avatar Aug 09 '22 09:08 Troyella

我遇到了相同的问题 2023-05-10 20:02:44,435 - mmfewshot - INFO - Set random seed to 0, deterministic: False Traceback (most recent call last): File "D:\ProgramData\Anaconda3\envs\mmdet\lib\site-packages\mmcv\utils\registry.py", line 52, in build_from_cfg return obj_cls(**args) During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./tools/classification/train.py", line 187, in main() File "./tools/classification/train.py", line 162, in main datasets = [build_dataset(cfg.data.train)] File "d:\upload\pyworkspace\few-shot learning\mmfewshot-main\mmfewshot\classification\datasets\builder.py", line 29, in build_dataset build_dataset(cfg['dataset'], default_args), File "d:\upload\pyworkspace\few-shot learning\mmfewshot-main\mmfewshot\classification\datasets\builder.py", line 45, in build_dataset dataset = build_from_cfg(cfg, DATASETS, default_args) File "D:\ProgramData\Anaconda3\envs\mmdet\lib\site-packages\mmcv\utils\registry.py", line 55, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') IndexError: MiniImageNetDataset: list index out of range

Can someone tell me where the boundary has been crossed??Which number should I change?

BradSteven avatar May 10 '23 12:05 BradSteven