Skip to content
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

fix iou precision error #1592

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix iou precision error #1592

wants to merge 2 commits into from

Commits on Jan 13, 2023

  1. fix iou precision error

    currently, when cal iou, yolox use float16 (in float16 mode), but float16 only has 10 bits for valid part
    this may lead iou precision error, for example torch.tensor(841, dtype=float16) -  torch.tensor(5.2, dtype=float16) ==torch.tensor(836., dtype=torch.float16). this can lead iou to be larger than 1
    and in cls loss, yolox multiplies target with iou, so that the bce loss can be negtive!
    
    change iou calculation to float32 seems to fix that
    h-bo committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    c60f82b View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. Update yolo_head.py

    fix line length 103 > 100
    h-bo committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    c0fc511 View commit details
    Browse the repository at this point in the history