-
-
Notifications
You must be signed in to change notification settings - Fork 298
boxes format in calculation of huber_loss #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, they should be relative (to anchors) regression coordinates in yxyx, they are not converted into absolute xyxy until efficientdet-pytorch/effdet/anchors.py Lines 48 to 82 in 20cd5f3
... which is usually only done for predictions via the Note there is a PR for IOU loss at #52 ... I haven't dug in yet but am hoping to take a closer look this week, maybe possible to optimize a bit |
Hi @rwightman Great thanks for your quick reply. I implemented a version yesterday but messed up the boxes format, which led to NaN value of loss. Now I can try to fix it. Thanks! |
@rwightman While I still have you here, let me ask another question. I'm also trying to modify the default anchors but have no idea of the right way to set it up. Maybe I misunderstood the parameters relevant to anchors in the
As you indicated in your code, your implementation employed I used KMeans to cluster a bunch of anchors, with
Thank you very much for your help! I appreciate your advice & guidance. |
To change the anchor sizes anchor_scale is the main factor, it can be defined as a list so it can change per feature level, it's multiplied by the feat stride at different levels, but also multiplied by the aspects (so a 2,1 vs 1.4, .07 * the scale would result in different size anchors)... as for more detail than that you'll have to dig in, the code is adapted from the Google TF models retinanet and other anchor based models, I have not explored the space of options. |
Hi Ross, thanks for your explanation. I'll dig into it further. Thank you for your help! |
Hi @rwightman, I'm trying to implement a custom iou loss function. But I'd like to confirm with you about the boxes format consumed by
huber_loss
function. Could you help me verify the format of inputs & targets args?I print both of them out and found they are in the shape of
[batch, height_l, width_l, 9*4]
, the last dim of which I think coords for bounding boxes. In other threads, you mentioned that you implementation consumestargets in YXYX format
, outputspred boxes in XYWH format
. Does such theory hold here as well?Thank you for your confirmation!
The text was updated successfully, but these errors were encountered: