Skip to content

loss.py修改 #71

@zspzhangshoupeng

Description

@zspzhangshoupeng

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

No response

Bug

AttributeError: module ‘numpy‘ has no attribute ‘int‘
修改requirement.txt
numpy==1.23

RuntimeError: result type Float can't be cast to the desired output type __int64

需要修改utils/loss.py

第223行

anchors, shape = self.anchors[i], p[i].shape

第257行

indices.append((b, a, gj.clamp_(0, shape[2] - 1), gi.clamp_(0, shape[3] - 1))) # image, anchor, grid

​AttributeError: ‘FreeTypeFont‘object has no attribute ‘getsize‘
暂无影响

Environment

OS: win10
Python:3.10

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions