tianzhi0549 / FCOS

FCOS: Fully Convolutional One-Stage Object Detection (ICCV'19)
https://arxiv.org/abs/1904.01355
Other
3.27k stars 630 forks source link

Have you train and test on VOC? #85

Open BlueBlueFF opened 5 years ago

tianzhi0549 commented 5 years ago

@BlueBlueFF No. You can try it by yourself, but I think data augmentation is important on PASCAL VOC because the number of images is small.

BlueBlueFF commented 5 years ago

@BlueBlueFF No. You can try it by yourself, but I think data augmentation is important on PASCAL VOC because the number of images is small.

ok, I will try it and tell you the results. Thank you.

tianzhi0549 commented 5 years ago

@BlueBlueFF It will be very nice if you can post your results here.

BlueBlueFF commented 5 years ago

@BlueBlueFF It will be very nice if you can post your results here.

And recently i have tested fcos on other tasks such as face detection and i find when use a strong backbone (such as resnet-50), the fcos is better than anchor-based methods. But when use some very light backbones(such as mobilenet-v2 and cut some channels), the performance of fcos is bad than anchor-based methods. Have you encounter this problem?what do you think might be the reason?

tianzhi0549 commented 5 years ago

@BlueBlueFF I am not sure. But slightly tuning the hyper-parameters such as object_sizes_of_interest might be helpful. From my perspective, the anchor-free detector should at least yield no worse performance than its anchor-based counterparts.

BlueBlueFF commented 5 years ago

@BlueBlueFF I am not sure. But slightly tuning the hyper-parameters such as object_sizes_of_interest might be helpful. From my perspective, the anchor-free detector should at least yield no worse performance than its anchor-based counterparts.

I tried to tune object_sizes_of_interest and other parameters and it doesn't work. QAQ. Hope a good performance on VOC. ^-^

tianzhi0549 commented 5 years ago

@BlueBlueFF Feel free to post your results here if you have some questions.

BlueBlueFF commented 5 years ago

@BlueBlueFF Feel free to post your results here if you have some questions.

In my test, fcos get 66.2 map (backbone resnet18) and 74.8 map(backbone resnet50) in voc 2007 test. Is it too poor in resnet18? QAQ

tianzhi0549 commented 5 years ago

@BlueBlueFF I am not sure. But have you used data augmentation, which is crucial on PASCAL VOC?

BlueBlueFF commented 5 years ago

@BlueBlueFF I am not sure. But have you used data augmentation, which is crucial on PASCAL VOC?

I used data augmentation like ssd.

tianzhi0549 commented 5 years ago

@BlueBlueFF How about the training settings such as batch size?

BlueBlueFF commented 5 years ago

@BlueBlueFF How about the training settings such as batch size?

BatchSize is 64, and I do some new test such as not frozen the first stage in resnet and get better result(in resnet18 is 72.0).

tianzhi0549 commented 5 years ago

@BlueBlueFF Great! If you like, you can pull request your code and models to our repository. I think it will be very useful to others.

BlueBlueFF commented 5 years ago

@BlueBlueFF Great! If you like, you can pull request your code and models to our repository. I think it will be very useful to others.

Actually my experiments are all based on mmdetection, but i would like to pull requeset the code and pretrained model to fcos( still something to do, such as code style, other resnet backbones.).

tianzhi0549 commented 5 years ago

@BlueBlueFF Thank you very much!

auroua commented 5 years ago

@BlueBlueFF Could you shall the training config file?

YYZ-rose commented 5 years ago

@BlueBlueFF can u share your code which train and test on VOCdataset? i am look forward train and test on VOCdataset.thank u~

XiongweiWu commented 4 years ago

@tianzhi0549 Hi I am not sure whether you have solved this issue. I just train a VOC dataset based on your current FCOS version. The results of R-50-FPN-1x are as follows:

  1. VOC2007 for training, VOC2007 for testing. The results are 72.36, with batchsize 2, 1e-3 learning rate, 70k iteration(50k for lr decay)
  2. VOC0712 for training, VOC2007 for testing. The results are 78.30, with batchsize 4, 1e-3 learning rate, 80k iteration(50k for lr decay)

According to Xinlei's baseline, VGG16(70.8, 75.7), ResNet101(75.7, 79.8) , the results are reasonable (between VGG16 and ResNet101). According to my past experience, FPN will not contribute a lot in VOC dataset. In addition, I do not think extensive data augmentation shall contribute a lot as in SSD. I just use the default horizontal flip to train the model.

BTW, the most critical point is the learning rate. The default lr(1e-2) cannot well trained the model. And the AP_0.5 results of COCO-style evaluation are different with results reported by VOC-style, which is strange to me.

tianzhi0549 commented 4 years ago

@XiongweiWu Thank you very much for sharing your experience on PASCAL VOC here.

akshitac8 commented 4 years ago

@XiongweiWu What image size did you use for VOC dataset while training it with FCOS?

dyx118186878 commented 4 years ago

@tianzhi0549 Hi I am not sure whether you have solved this issue. I just train a VOC dataset based on your current FCOS version. The results of R-50-FPN-1x are as follows:

1. VOC2007 for training, VOC2007 for testing. The results are 72.36, with batchsize 2, 1e-3 learning rate, 70k iteration(50k for lr decay)

2. VOC0712 for training, VOC2007 for testing. The results are 78.30, with batchsize 4, 1e-3 learning rate, 80k iteration(50k for lr decay)

According to Xinlei's baseline, VGG16(70.8, 75.7), ResNet101(75.7, 79.8) , the results are reasonable (between VGG16 and ResNet101). According to my past experience, FPN will not contribute a lot in VOC dataset. In addition, I do not think extensive data augmentation shall contribute a lot as in SSD. I just use the default horizontal flip to train the model.

BTW, the most critical point is the learning rate. The default lr(1e-2) cannot well trained the model. And the AP_0.5 results of COCO-style evaluation are different with results reported by VOC-style, which is strange to me.

@tianzhi0549 Hi I am not sure whether you have solved this issue. I just train a VOC dataset based on your current FCOS version. The results of R-50-FPN-1x are as follows:

1. VOC2007 for training, VOC2007 for testing. The results are 72.36, with batchsize 2, 1e-3 learning rate, 70k iteration(50k for lr decay)

2. VOC0712 for training, VOC2007 for testing. The results are 78.30, with batchsize 4, 1e-3 learning rate, 80k iteration(50k for lr decay)

According to Xinlei's baseline, VGG16(70.8, 75.7), ResNet101(75.7, 79.8) , the results are reasonable (between VGG16 and ResNet101). According to my past experience, FPN will not contribute a lot in VOC dataset. In addition, I do not think extensive data augmentation shall contribute a lot as in SSD. I just use the default horizontal flip to train the model.

BTW, the most critical point is the learning rate. The default lr(1e-2) cannot well trained the model. And the AP_0.5 results of COCO-style evaluation are different with results reported by VOC-style, which is strange to me. Hi! How do you train fcos on voc? Do you transfer the voc datasets from voc-style to coco-style?

liukangji commented 2 years ago

你好,你能分享你在 VOCdataset 上训练和测试的代码吗?我现在正在复现,但是精度才60多。

countytown commented 2 years ago

For any one is trying to train this code on VOC(0712trainval+07test):

_SOLVER:
  BASE_LR: 0.004
  WEIGHT_DECAY: 0.0001
  STEPS: (62500, )
  MAX_ITER: 67500
  IMS_PER_BATCH: 4
mAP: 0.8016
aeroplane       : 0.8783
bicycle         : 0.8498
bird            : 0.8069
boat            : 0.7331
bottle          : 0.7109
bus             : 0.8635
car             : 0.8848
cat             : 0.8743
chair           : 0.6378
cow             : 0.8518
diningtable     : 0.7457
dog             : 0.8503
horse           : 0.8723
motorbike       : 0.8161
person          : 0.8517
pottedplant     : 0.5539
sheep           : 0.8262
sofa            : 0.7386
train           : 0.8643
tvmonitor       : 0.8215

This may not be the best option, I set maxiter=67500 which is about 15 epochs for all images in the training set.

countytown commented 2 years ago

你好,你能分享你在 VOCdataset 上训练和测试的代码吗?我现在正在复现,但是精度才60多。

你可以看看我的训练方式。

liukangji commented 2 years ago

你好,可以分享你在 VOCdataset 上训练和测试的代码吗?

你可以看看我的训练方式。 非常感谢你的回复,请教一下,我如何在FCOS里利用这些参数?作者并未给出voc的训练方式。

countytown commented 2 years ago

你好,可以分享你在 VOCdataset 上训练和测试的代码吗?

你可以看看我的训练方式。 非常感谢你的回复,请教一下,我如何在FCOS里利用这些参数?作者并未给出voc的训练方式。

如果你用R50训练,直接替换掉configs/fcos/xxxR50.yaml最后的SOLVER就可以了。

liukangji commented 2 years ago

你好,可以分享你在 VOCdataset 上训练和测试的代码吗?

你可以看看我的训练方式。 谢谢你的回复,教一下,我如何在 FCOS 里利用参数方式?

如果你用R50训练,直接替换掉configs/fcos/xxxR50.yaml最后的SOLVER就可以了。 十分感谢你的指点。