Skip to content

Classification from webcam #9111

@sctrueew

Description

@sctrueew

Search before asking

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

YOLOv5 Component

No response

Bug

Hi,

I tested classify with a webcam and I got an error on this line:

im = im.to(device)

'numpy.ndarray' object has no attribute 'to'
I changed it to
im = torch.from_numpy(im).to(device)
works fine

Environment

No response

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions