cnaps icon indicating copy to clipboard operation
cnaps copied to clipboard

Questions about changing the dataset

Open SmartNight-cc opened this issue 1 year ago • 2 comments

Hello, I am a few-shot learning beginner. I was very interested in your work, but I ran into this problem while trying to change the training data set to miniImagenet: RuntimeError: No dataset_spec file found in directory /home/cnaps/filelists/miniImagenet Can you help me solve it? Looking forward to your reply!

SmartNight-cc avatar Aug 02 '23 13:08 SmartNight-cc

Or perhaps you could post the checkpoint? The model in Table 1.1 that uses miniImagenet as a training set.

SmartNight-cc avatar Aug 02 '23 15:08 SmartNight-cc

Hello - Thanks for the question. The CNAPs code uses the meta-dataset reader which requires data to be pre-processed into tfrecords. An example of doing this can be found in the file src/prepare_extra_datasets.py. More examples can be found in the meta-dataset repo: https://github.com/google-research/meta-dataset/blob/main/meta_dataset/dataset_conversion/convert_datasets_to_records.py.

We never evaluated CNAPs on miniImageNet since the full version of ImageNet is used in training and evaluation, which is a better indication of performance. The results in Table 1 in the TaskNorm paper use the MAML algorithm, not CNAPs.

Note that much of the few-shot learning community has moved on to zero-shot models such as CLIP https://arxiv.org/pdf/2103.00020.pdf which are very effective.

Hope this helps.

jfb54 avatar Aug 05 '23 18:08 jfb54