Alpha-VL / ConvMAE

ConvMAE: Masked Convolution Meets Masked Autoencoders
MIT License
477 stars 41 forks source link

Hello, how to finetune own datasets #11

Open wudizuixiaosa opened 2 years ago

wudizuixiaosa commented 2 years ago

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

TeleeMa commented 2 years ago

@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.

wudizuixiaosa commented 2 years ago

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 commented 2 years ago

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

gaopengpjlab commented 2 years ago

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.

wudizuixiaosa commented 2 years ago

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

gaopengpjlab commented 2 years ago

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

The folder structure is similar to the above illustration.