ConvMAE icon indicating copy to clipboard operation
ConvMAE copied to clipboard

Hello, how to finetune own datasets

Open wudizuixiaosa opened this issue 2 years ago • 6 comments

What should I do if I want to fine tune the current pre training model to my own dataset instead of Imagenet's Val dataset? Can you answer it? Thank you very much

wudizuixiaosa avatar Jul 17 '22 15:07 wudizuixiaosa

@wudizuixiaosa You just need to write your own Dataset Class in datasets.py. Also, don't forget change the data_path and nb_classes in args of main_finetune.py.

TeleeMa avatar Jul 18 '22 02:07 TeleeMa

Thank you for your reply. I know that we can change the data_path and class in finetune..py. I've also seen dataset.py project, but I see that the settings in it are based on Imagenet. As I am a beginner, my foundation is not good, and I am very interested in your project. So can you give me an example? Let's assume that there are two kinds of dogs and cats in my dataset. How can I define them? Mainly, I don't see relevant parameter settings in the project.

wudizuixiaosa avatar Jul 18 '22 13:07 wudizuixiaosa

By the way, which format of dataset should i choose,coco,voc or Unlabeled pictures in folders of corresponding categories?

wudizuixiaosa avatar Jul 18 '22 13:07 wudizuixiaosa

Please follow the dataset format of Imagenet. Basically, you can need to build two folders named dog and cat then put images into the corresponding folder.

gaopengpjlab avatar Jul 18 '22 13:07 gaopengpjlab

Oh, thank you for replying so quickly,i am coming to try it now

wudizuixiaosa avatar Jul 18 '22 13:07 wudizuixiaosa

train ----dog ----cat val ----dog ----cat

The folder structure is similar to the above illustration.

gaopengpjlab avatar Jul 18 '22 14:07 gaopengpjlab