Comments (7)
Hi, we would like the gradient of losses to flow to pos_decoded_bbox_preds
and pos_decoded_bbox_preds_refine
so as to optimize the predictions, so we don't detach them. Conversely, we don't want the gradient to back-propagate to pos_decoded_target_preds
.
from varifocalnet.
@hyz-xmaster Thanks for your prompt reply.
For pos_decoded_target_preds
, I guess it may not be a must. It seems common in machine learning that the gradient does not flow back to the "target".
For pos_decoded_bbox_preds
and pos_decoded_bbox_preds_refine
, I understand now that you intended to do that, but could you please share more insights about this gradient behavior? As also mentioned in your paper, VFL is somewhat like GFL, in which QFL uses detached localization prediction to calculate IoU for classification loss, refer to mmdet implementation here. According to my experience, if detach
is removed in this line for QFL, final AP drops significantly. Could you please comment on the different design choices between VFL and QFL? Thanks.
from varifocalnet.
@hyz-xmaster any update?
from varifocalnet.
As I see in the QFL implementation, it uses pos_decoded_bbox_preds
to compute score
and then uses the score
here. It seems QFL uses the score
and label
to compute the target for the cls_score
, which has the similar function of pos_decoded_target_preds
. You should not propagate the gradient to targets.
from varifocalnet.
@hyz-xmaster Exactly, I see that QFL does not and should not propagate gradients to pos_decoded_bbox_preds
. Then back to my above question, why did VFL choose to propagate gradients to pos_decoded_bbox_preds
, without hurting the performance?
from varifocalnet.
@hyz-xmaster Exactly, I see that QFL does not and should not propagate gradients to
pos_decoded_bbox_preds
. Then back to my above question, why did VFL choose to propagate gradients topos_decoded_bbox_preds
, without hurting the performance?
See this line, we detach the iou_targets_ini
calculated from pos_decoded_bbox_preds
, and this line.
We only propagate gradients to pos_decoded_bbox_preds
here.
from varifocalnet.
@zen-d
Though I only took a cursory look at your question, I think you've made a misconception. The line you quoted refers to the calculation of box regression loss, in which the gradient of predicted box regression value should not be detached. What'more, varifocal loss does not apply to the calculation of regression loss, it serves as a cls loss. So the only thing we should take care is to detach the gradient of cls_target in this line.
from varifocalnet.
Related Issues (20)
- Some question about the inference HOT 4
- VFNet-X's config file 404 error HOT 2
- VFocalLoss in yolov5 HOT 3
- Do you think the `VarifocalLoss` could be used for labels with value of 0 & 1 ? HOT 2
- How to visualize detection results?
- where is Star-Shaped Box Feature Representation and Bounding Box Refinement in the code HOT 2
- GPU error HOT 3
- KeyError: 'ATSSVGFLHead is not in the head registry' HOT 9
- How to reimplement IACS? HOT 2
- Varifocal Loss for YOLOv5 HOT 2
- Using MMDet version of VFNet with the lastest backbone (e,g. Poolformer S36, ConvNeXt Small) with Inf Issues on Varifocal loss HOT 1
- VarifocalLoss HOT 1
- Can varifocal loss be applied to softmax classifier?
- AttributeError:'ConfigDict' object has no attribute 'test_cfg'
- About applying Varfifocal to yolox objectness loss HOT 2
- cls loss is increasing HOT 4
- Train custom dataset HOT 2
- Welcome update to OpenMMLab 2.0
- Architecture dimension
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from varifocalnet.