Skip to content

Can't YOLOV5 be detected with multithreading? #1979

@bulingda

Description

@bulingda

Environment:
Python 3.7
Pytorch 1.5.1
Yolov5 v1.0

Bug:
RuntimeError: The expanded size of the tensor (50) must match the existing size (25) at non-singleton dimension 3. Target sizes: [1, 3, 28, 50, 2]. Tensor sizes: [3, 14, 25, 2]
The detailed error information is shown in the figure below:
image

Description:
I use ThreadPoolExecutor in Python concurrent-future to implement multithreading detection, and the above error occurs whenever my number of tasks (detection) is greater than and 1.
The error occurred here
I was doing two detection tasks at the same time when the error occurred, and I wondered if the shapes didn't match because of information confusion between threads.

Thank you very much for helping me solve this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions