• Anton Lebedev's avatar
    Bug fix mAP0.5-0.95 (#6787) · 43569d53
    Anton Lebedev 提交于
    * Improve mAP0.5-0.95
    
    Two changes provided
    1. Added limit on the maximum number of detections for each image likewise pycocotools
    2. Rework process_batch function
    
    Changes #2 solved issue #4251
    I also independently encountered the problem described in issue #4251 that the values for the same thresholds do not match when changing the limits in the torch.linspace function.
    These changes solve this problem.
    
    Currently during validation yolov5x.pt model the following results were obtained:
    from yolov5 validation
                   Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100%|██████████| 157/157 [01:07<00:00,  2.33it/s]
                     all       5000      36335      0.743      0.626      0.682      0.506
    from pycocotools
     Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.505
     Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.685
    
    These results are very close, although not completely pass the competition issue #2258.
    I think it's problem with false positive bboxes matched ignored criteria, but this is not actual for custom datasets and does not require an additional solution.
    
    * [pre-commit.ci] auto fixes from pre-commit.com hooks
    
    for more information, see https://pre-commit.ci
    
    * Remove line to retain pycocotools results
    
    * Update val.py
    
    * Update val.py
    
    * Remove to device op
    
    * Higher precision int conversion
    
    * Update val.py
    Co-authored-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com>
    Co-authored-by: 's avatarpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    43569d53
名称
最后提交
最后更新
.github 正在载入提交数据...
data 正在载入提交数据...
models 正在载入提交数据...
utils 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.pre-commit-config.yaml 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
detect.py 正在载入提交数据...
export.py 正在载入提交数据...
hubconf.py 正在载入提交数据...
requirements.txt 正在载入提交数据...
setup.cfg 正在载入提交数据...
train.py 正在载入提交数据...
tutorial.ipynb 正在载入提交数据...
val.py 正在载入提交数据...