Open wumy27 opened 4 years ago
the objects are too small, you should try larger network or smaller anchors to fit you gt boxes
the objects are too small, you should try larger network or smaller anchors to fit you gt boxes
Thanks for your reply. I will use smaller anchors and see if it can help.
@wumy27 same problem when using --head_only True
, what's the result after you using smaller anchors?
It has nothing to do with head_only
, you should try more suitable anchors or larger network/ larger image size
@zylo117 after seeing other similar issues, maybe the problem lies on the category id? my categories are like following:
"categories": [
{
"id": 2,
"supercategory": "none",
"name": "car"
},
{
"id": 1,
"supercategory": "none",
"name": "bicycle"
},
{
"id": 5,
"supercategory": "none",
"name": "tricycle"
},
{
"id": 3,
"supercategory": "none",
"name": "truck"
},
{
"id": 6,
"supercategory": "none",
"name": "electrocycle"
},
{
"id": 4,
"supercategory": "none",
"name": "crowd"
},
{
"id": 0,
"supercategory": "none",
"name": "motorcycle"
}
which starts from 0
, while you said category id starts from 1
I think this caused my model to predict really bad?
For your information:
after I set debug
option to True, the output images are all whole blue after 17epochs, like following:
it has to start from 1. And if the pictures are all green, it's probably under fitting. you can visualize the loss graph on tensorboard to get more infomation.
@zylo117 yeah,thanks, I'll change the category id. And as the regression loss is far smaller than cls loss, I manually add weights to regression loss, which is :
loss = cls_loss + reg_loss*4000
do you consider it reasonable?
You are welcome to try and feel free to share the result. Reg loss is much lower than cls loss becasue regression is much easier to train than classification.
it has to start from 1. And if the pictures are all green, it's probably under fitting. you can visualize the loss graph on tensorboard to get more infomation.
I tried few times without category_id starting from 1. My cat_id starts from 0 and it works pretty good. @oukohou: I met blue images as well. It's from ori_imgs somehow. But I just extract ROIS after invert_affine and plot them onto img = cv2.imread()
@dthaicuong did you modify the code to adapt to cat_id starting from 0? I've been training well with cat id starting from 1 for months.
did you modify the code to adapt to cat_id starting from 0? I've been training well with cat id starting from 1 for months.
@zylo117 I did not change anything from your repo. For few first tries, I forgot "background" class as usual COCO but results are pretty good (or caused by low diversity in my dataset)
I have transformed the custom dataset to coco2017 form and use your pre-trained model d2 to train my model.. But run like this:
My training code: python train.py -c 2 -p coco2017 --batch_size 8 --lr 1e-5 --num_epochs 10 --load_weights /weights/efficientdet-d2.pth
My training process:
When i train with adding the parameter --head_only True , the test result like this:
Can any one give me some help?