faster-rcnn.pytorch icon indicating copy to clipboard operation
faster-rcnn.pytorch copied to clipboard

Question: results of test base on my own dataset

Open lyx190 opened this issue 5 years ago • 8 comments

Hello @jwyang , I met a problem with my custom dataset with only one class. I have modified the pascal_voc.py and voc_eval.py and factory.py to my dataset. And during the training phase value of loss went down to 0.5~0.6 at the first 100 iteration of 1th epoch. And then never changed. During the testing phase, the output value of mAP is 0.0000.

Can you help me?

lyx190 avatar May 17 '19 14:05 lyx190

you likely need to debug your entire changes and post up what you've customized.. I would start over and retry injecting custom data with a clean attempt.. and perhaps you'll see something wrong, and/or post it up here.

EMCP avatar May 23 '19 21:05 EMCP

@EMCP hello, thank you for your help! I have changed https://github.com/jwyang/faster-rcnn.pytorch/blob/0797f6290e104e7d63cd487af759840d4a36985b/lib/datasets/pascal_voc.py#L48-L53 as only one class which from my dataset (for sure also with 'background' in the code). And also set up a new entry for my own dataset in factory.py. After that I have modified the trainval_net.py and test_net.py by here: https://github.com/jwyang/faster-rcnn.pytorch/blob/0797f6290e104e7d63cd487af759840d4a36985b/trainval_net.py#L155-L158 to add my own dataset entry also. What's more my the objects on my own dataset are small, labeled bounding box are 20 x 20. So I changed the anchor sizes here: https://github.com/jwyang/faster-rcnn.pytorch/blob/0797f6290e104e7d63cd487af759840d4a36985b/lib/model/rpn/generate_anchors.py#L45 to base_size = 4. For the training cfg. I used res50.yml by POOLING_MODE: align.

Above are my entire changes. I don't know where my problem is, hope you can help me if you have time

lyx190 avatar May 26 '19 14:05 lyx190

just to confirm, you already ran with the regular dataset successfully.. yes?

EMCP avatar May 26 '19 14:05 EMCP

@EMCP no I didn't run with the regular dataset. As for my own dataset, I have already run with Yolov3 and CenterNet successfully.

lyx190 avatar May 26 '19 14:05 lyx190

@lyx190 Did you solve your problem?

Saharkakavand avatar Sep 17 '19 20:09 Saharkakavand

Actually I have my own dataset in format of ["filename" "boxes label values Like x-min y-min x-max y-max" "class-name"] and filename consist the path of the image, so how can given this dataset to model for testing and training , please help me ..

devendraswamy avatar Nov 19 '19 07:11 devendraswamy

@Saharkakavand yep, you should just modify the class categories during testing phase.

lyx190 avatar Dec 10 '19 09:12 lyx190

@devendraswamy did you find a way to this problem? if yes please let me know

sindhura234 avatar Jan 06 '21 05:01 sindhura234