Skip to content

error of missing key 'anchors' in hyp.scratch.yamlΒ #1744

@sunsdy2018

Description

@sunsdy2018

hi, thank you for providing yolo v5. I think I found a bug. The code branch was downloaded yesterday.
I run the code just as the link '#12' with the same data coco128.zip by using VS Code with Pytorch 1.7.1 and Conda and python 3.8.6 in Windows 10 professional.

  1. At line 20 in file hyp.scratch.yaml , it says '# anchors: 3 # anchors per output layer (0 to ignore)', which means the arg 'anchors' is commented and doesn't exist.
  2. However, in train.py, at line 541 "'anchors': (2, 2.0, 10.0), # anchors per output grid (0 to ignore)" , the key 'anchors' is not commented, and at line 591-593, there are 'hyp[k] = max(hyp[k], v[1])', 'hyp[k] = min(hyp[k], v[2])' and 'hyp[k] = round(hyp[k], 5)', hyp[k] is used in the right side.
  3. When running at line 191, error of missing key 'anchors' will occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions