Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I train metaracnn on my own dataset? #14

Open
duynn912 opened this issue Oct 30, 2019 · 9 comments
Open

How do I train metaracnn on my own dataset? #14

duynn912 opened this issue Oct 30, 2019 · 9 comments

Comments

@duynn912
Copy link

I want to train metarcnn on my own dataset followwing PASCAL VOC format. My dataset has 200 classes so what do I have to finetune to train. Would you please help me and show me how much memory you use to train on COCO.
My GPU have 12G but it is always out of memory, though I attempt to change bs and ws.
Following your code in the first phase you use 200 shots to train so if I drop this parameter to smaller, is it fine ?

@yanxp
Copy link
Owner

yanxp commented Oct 31, 2019

hello, when training coco you can only sample the k-shots containing the classes of input X like our training phase figure3.

@duynn912
Copy link
Author

Thank you for your respond!
But I think you misunderstood me. My problem here is how I can train my setting dataset following the format of PASCAL VOC. PASCAL has 20 classes and I finetune it to 200 classes to train. However, I have a problem related to out of memory although I drop ws to 0 or 1 and batchsize to 4 or 8. The number of images is similar to PASCAL formed from trainval 2007 and 2012. My GPU has 12 GB.

@zb1439
Copy link

zb1439 commented Oct 31, 2019

So are you training COCO with a different setting (referred as Meta-Optimization Process in the paper) from training VOC, i.e., train VOC with 20 ways support set simultaneously while training COCO with categories included in query image only? In addition, is this difference applied on your evaluation of COCO as well, i.e., using support set including query image categories only instead of a support set include all 80 categories at the same time?

@duynn912
Copy link
Author

duynn912 commented Oct 31, 2019

Hi @zb1439,

I did not try to train on COCO. I just tried on PASCAL and my setting following PASCAL but I have had a memory problem. If it is successful, I will try it on COCO

@zb1439
Copy link

zb1439 commented Oct 31, 2019

Hi @duynn912 , we did successfully finished modification for parallel training and you can refer to issue #13 to have a glance of some major changes to adapt to multiple GPUs. Basically just change all the tensors to variable types and add additional batch dimension then tile the dimension #GPU times. Of course, some other easy fix after you change the two major implementation. But I am not sure if you can train 200 ways simultaneously just by utilizing GPUs (according to our experiment, batch per gpu = 1 was the max we could do for 80 ways. (We are using 12GB gpus as well)

We might fork this repo and add our modification later if @yanxp agrees with it.

@duynn912
Copy link
Author

Hi @zb1439 ,
Thank you so much for your implementation and recommendation. I think I should try it now.

@yanxp
Copy link
Owner

yanxp commented Nov 5, 2019

@zb1439 Welcome to pull requests, Thanks

@EasitMickly
Copy link

@yanxp I also want to train metarcnn on my own dataset followwing PASCAL VOC format. My dataset has 4 classes, but i don't know how to prepare the split datasets. I want to put the 3 class label in train_first_split.txt file, but i don't know how to prepare the few shot class dataset. Can you give me some help. Thank you very much.

@cxcjcj
Copy link

cxcjcj commented Dec 16, 2019

@EasitMickly
Hello, did you solve this problem? I also want to train metarcnn on my own dataset followwing PASCAL VOC format. My dataset has 5 classes, but i don't know how to prepare split datasets. I want to put the 2 class label in train_first_split.txt file,but i don't know how to prepare the few shot class dataset. Can you give me some help. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants