leokarlin / LaSO

LaSO: Label-Set Operations networks for multi-label few-shot learning - official implementation
BSD 3-Clause "New" or "Revised" License
86 stars 14 forks source link

About 1-shot and 5-shot #13

Closed LargeFishPKU closed 2 years ago

LargeFishPKU commented 3 years ago

Hi, could I ask where reflects the 1-shot and 5-shot setting in your codes?

zhangyikaii commented 3 years ago

LaoGe, I had a similar problem: #14

alfassy commented 3 years ago

@yankun-pku You will have to be more specific as this is being reflected in so many different parts of the code. we have training and few different types of tests

LargeFishPKU commented 3 years ago

@yankun-pku You will have to be more specific as this is being reflected in so many different parts of the code. we have training and few different types of tests

I don't think so. First, there is no code of 5-shot setting. Second, for 1-shot setting, the training procedure is just in a traditional image classification style, where the restriction is only one image one time.

zhangyikaii commented 3 years ago

Sorry for interrupting, "for 1-shot setting, the training procedure is just in a traditional image classification style" I guess the author uses a similar Few-Shot sampling method here.

But I'm still trying to understand the difference between 1-shot and 5-shot. I mean here doesn't seem to work for different sampling method.

alfassy commented 3 years ago

from the readme: "Generate the augmentation model's results Paper model 1 shot -

$ python test_augmentation.py --batch_size=4 --class_cap=1 --class_ind_dict_path='/data_for_augmentation/1shotRun1ClassIdxDict.pkl' --crop_size=299 --latent_dim=2048 --lr=0.01 --n_epochs=50 --resume_path= --used_ind_path='/data_for_augmentation/1shotRun1UsedIndices.pkl' --results_path= --coco_path= Paper model 5 shot -

$ python test_augmentation.py --batch_size=4 --class_cap=5 --class_ind_dict_path='/data_for_augmentation/5shotRun1ClassIdxDict.pkl' --crop_size=299 --latent_dim=2048 --lr=0.01 --n_epochs=50 --resume_path= --used_ind_path='/data_for_augmentation/5shotRun1UsedIndices.pkl' --results_path= --coco_path= "

alfassy commented 3 years ago

The 3 differences between 1 and 5 shot in the augmentation scenario is: a. class_cap, b. class_ind_dict_path, c.used_ind_path. open the files of b and c in debug mode, and you'll understand, c holds the indices per class in each 1/5 shot scenario, so you'll have more indices in the 5 shot scenario, it's called usedIndices in the dataset class.

zhangyikaii commented 3 years ago

@alfassy Great reply. I got it. Thank you very much!!