Closed ZYJ-JMF closed 3 years ago
Hi, AFHQ-CAT dataset does not have the domain lables, therefore, it can not conduct the semi-supervised learning. I am so sorry for the inconvenience. It should be changed into "python main.py --gpu 0 --dataset afhq_cat --output_k 10 --data_path '../data' --p_semi 0.0"
I will change ReadMe. Thank you for letting me know that!
Thanks for your answer. I saw you used the animal faces dataset and FOOD-101 dataset. I can find the name of the class name of Animal Faces in code,but I can not find the FOOD-101 class name could you please provide the ten classes' names that used for FOOD-101 dataset?
This source code is under the refactoring, so I provide the class names directly: baby_back_ribs beef_carpaccio beignets bibimbap caesar_salad clam_chowder dumplings edamame spaghetti_bolognese strawberry_shortcake
These are the file of the used classes in Food-101.
I copy and paste the folders and use [i for i in range(10)]. Then, give the directory of Food-10.
Thanks a lot !
Hi,could you share the set about the Food-10 dataset? Such as in your validation.py L52-61,you set this:
x_each_cls = []
if args.dataset == 'animal_faces':
num_tmp_val = -50
elif args.dataset == 'ffhq':
num_tmp_val = -7000
elif args.dataset == 'lsun_car':
num_tmp_val = -10000
else:
num_tmp_val = 0
if I want to use food-10 to train,what should I set? Thanks
The Food-10 dataset is basically the same as 'animal_faces' dataset. Therefore, you should change the conditions containing 'animal_faces' into a condition having 'food-10'.
For the above example, you should change to
if args.dataset in ['animal_faces', 'food-10']
'food-10' might be changed as you set.
ok~ got it~Thanks
If it is ok, I will upload the source code without refactoring but simply applied "food-10"
oh That's cool. I will glad to see that~ Thanks again~
Please check "food_added" branch. I assume that you separated a folder only for food-10.
If you have any issues, feel free to tell me.
I got it~ Thank you very much~
Hi,when I use your actual example in Train: python main.py --gpu 0 --dataset afhq_cat --output_k 10 --data_path '../data' --p_semi 0.2
will have error.
Traceback (most recent call last): File "main.py", line 524, in
main()
File "main.py", line 201, in main
main_worker(args.gpu, ngpus_per_node, args)
File "main.py", line 257, in main_worker
train_loader, val_loader, train_sampler = get_loader(args, {'train': train_dataset, 'val': val_dataset})
File "main.py", line 448, in get_loader
train_sup_dataset = train_dataset['SUP']
KeyError: 'SUP'
Is the code fit for all the dataset? and What's the reason you deal different dataset with different way? Thanks