Skip to content

Single class inference, class score is still 0.98 but not 1 #5357

@yuanyuangoo

Description

@yuanyuangoo

Before submitting a bug report, please be aware that your issue must be reproducible with all of the following,
otherwise it is non-actionable, and we can not help you:

If this is a custom dataset/training question you must include your train*.jpg, val*.jpg and results.png
figures, or we can not help you. You can generate these with utils.plot_results().

🐛 Bug

A clear and concise description of what the bug is.

To Reproduce (REQUIRED)

Input:

Just train a model using,

python train.py --single-cls

Output:

a model in runs/train/exp/weights/best.pt

Expected behavior

run debug mode

python detect.py --weights runs/train/exp/weights/best.pt

we should see that in utils/general.py line 655, print x[:,5] which is the cls_conf and it should be all 1 in single class training, but now they are tensor([0.99923, 0.99898, 0.99948, ..., 0.97183, 0.97135, 0.97071], device='cuda:0')

Environment

If applicable, add screenshots to help explain your problem.

  • OS: Linux Mint
  • GPU: 2080 Ti

Additional context

this problem would affect the overall confidence of detection

1
n.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions