RFCN-tensorflow icon indicating copy to clipboard operation
RFCN-tensorflow copied to clipboard

I want to know how to train on my own dataset?I didn't see the code for train

Open Jamescallow opened this issue 7 years ago • 15 comments

Jamescallow avatar May 24 '17 08:05 Jamescallow

Oh,I'm so

stupid!!! hahaha,I found it

Jamescallow avatar May 24 '17 08:05 Jamescallow

@XingJun940207 Could you help me to find out too how to train for your own data set ?

ananddb90 avatar May 24 '17 08:05 ananddb90

and also could you help me to know the possible reason behind #6 issue. That would be really appreciated. thank you

ananddb90 avatar May 24 '17 08:05 ananddb90

Training on your own data that is different from MS COCO is not trivial. You need to write your own data loader. You can use the Dataset/CocoDataset.py as an example/reference. As long as you maintain interface compatibility with the original CocoDataset class, you shuld be fine. Maybe you need some additional hyper paramtere tuning to make the training stable if your data is very different.

RobertCsordas avatar May 24 '17 20:05 RobertCsordas

Hi,I want to know how many Iterations did you train? I trained on COCO dataset for about 180000 Iterations,but It seems got a bad result.The loss is around 1.5 and the detection result is not as good as yours. Thank you very much.

Jamescallow avatar May 28 '17 04:05 Jamescallow

It was trained for 2.2M iterations. After 100-200k iters enable training of the base network (trainFrom argument, you can experiment with different values). After 1.5M iterations decrease the learning rate by factor of 10 (1e-5).

RobertCsordas avatar May 28 '17 08:05 RobertCsordas

hi, i want to train on voc datasets, but i cannot figure out how to read the xml data and feed to this project, can you give me a demo if possible, thanks!

zhangleiedu avatar Jul 03 '17 01:07 zhangleiedu

To train your own dataset on this repo:

Training Stage : [1] replace the CocoDataset.py by your own script, to read the images, load the coordinates, and the class label/index [2] Update the total number of categories here [3] Update the main.py, import script in [1]

Inference Stage [1] in test.py, update the category definition

qiningonline avatar Jul 11 '17 14:07 qiningonline

Thank you qiningonline! I was very busy recently and not able to support the issue.

RobertCsordas avatar Jul 19 '17 07:07 RobertCsordas

@qiningonline or you could just make a script that reformat your data to coco format, I believe it's easier that doing step 1 , it's just parsing the values in a json file following this format (in section 4.1 )

step 2 remain the same of course , and there will be no need for step 3 :)

cheers !

obendidi avatar Jul 27 '17 13:07 obendidi

After my training(only vehicle ang background), the mAP was just only 0.773. When i training the dataset, the params unchanged, except the categories(set 1) and used the pretrained model(inception_resnet_v2_2016_08_30.ckpt). Can you tell me how can i improve the mAP???

Qiuchenggit avatar Aug 31 '17 01:08 Qiuchenggit

@XingJun940207 I got the same problem.I change the trainFrom from -1 to 0 after 40000 iterations but my loss is still 1.5. And result is bad. How do you deal with this?

MaskVulcan avatar Jan 18 '18 05:01 MaskVulcan

@xdever I trained for 5 epochs and the loss is always around 1.5(I have changed the trainFrom to 0).Will loss decrease after more epochs?How is your result? Will The loss decrease all the time? Or will loss suddenly decrease at some time?

MaskVulcan avatar Jan 18 '18 05:01 MaskVulcan

@qiningonline could you please give me an example how to rewrite a script to replace the CocoDataset.py. Or

audience3 avatar Jan 30 '18 12:01 audience3

how to train my own data?????????????

henbucuoshanghai avatar Jun 12 '19 04:06 henbucuoshanghai