Detectron2: GIOU, DIOU,CIOU

Created on 22 Mar 2020  路  5Comments  路  Source: facebookresearch/detectron2

Hello! detectron2 use IOU loss, that is, smooth_l1_loss function. will you plan to support of GIOU,DIOU,CIOU in detectron2?

enhancement

Most helpful comment

Hey @hejinsome , @WeihongM , @ferna11i -

Support for GIoU loss has been added in 73bbd7c1828d5d7560b380c69379fcaa0b226dda for the rcnn head box regression loss and in af0462a8632e4391c70ce45eb06080cb43e29206 for the rpn box regression loss.

See https://github.com/facebookresearch/detectron2/blob/master/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x_giou.yaml for a sample of enabling GIoU.

All 5 comments

any updates? @ppwwyyxx

Hi!

I've implemented DIoU and CIoU in my clone of Detectron2. However, I'm not sure if I have got all the mathematical details correct. That being said, I did get improvements on certain private datasets over L1 loss. Here's my repo: https://github.com/ferna11i/detectron2

Looking for anyone who would like to work with me to solve this issue. We could potentially add these new loss functions to Detectron2.

The major changes have been done on two files:

  1. detectron2/modeling/roi_heads/fast_rcnn.py
  2. detectron2/config/defaults.py

Right off the bat I can point out definite changes that would need to be done such as:

  1. Confirm the mathematics behind the functions (that I've worked on, not the original authors code, I'm certain their code is right) is working as expected.
  2. Better way to reference the config details in fast_rcnn.py

Looking forward to working with anyone who is interested in adding IOU based loss functions to Detectron2.

Hey @hejinsome , @WeihongM , @ferna11i -

Support for GIoU loss has been added in 73bbd7c1828d5d7560b380c69379fcaa0b226dda for the rcnn head box regression loss and in af0462a8632e4391c70ce45eb06080cb43e29206 for the rpn box regression loss.

See https://github.com/facebookresearch/detectron2/blob/master/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x_giou.yaml for a sample of enabling GIoU.

Thank you @jonmorton. This is a good feature to have in the detectron2 library.

I just have one question in terms of in the implementation. The GIOU loss here uses Bounding Boxes while the original authors code used delta values. Have you noticed any difference in performance of using boxes instead of delta values?

Hi @jonmorton I noticed you've setBBOX_REG_LOSS_WEIGHT: 2.0 for RPN and 10.0 for ROI. Is this just to show we can alter them, or any good reason for these values? Would you recommend staying with the defaults of 1.0 even when training with GIOU? Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LotharTUM picture LotharTUM  路  3Comments

DeepLakhani99 picture DeepLakhani99  路  4Comments

soumik12345 picture soumik12345  路  3Comments

aminekechaou picture aminekechaou  路  3Comments

jinfagang picture jinfagang  路  3Comments