Skip to content

Consistent and Efficient Preprocessing for Classification and Detection Model #9192

@paradigmn

Description

@paradigmn

Search before asking

  • I have searched the YOLOv5 issues and found no similar feature requests.

Description

The new classification model utilizes a different preprocessing pipeline as the detection model. For object detection, the image is normalized, resized with constant aspect ratio and padded to size. In comparison, the new classification models utilizes normalization, resizing, center crop and standardization by ImageNet mean and std.

Use case

We use YOLOv5 models for embedded applications with our own performance optimized software framework. Due to the two pipelines, the models are not easily interchangeable. Furthermore, the classification preprocessing pipeline is more performance intensive and therefore not well suited for low power environments.

Would it be possible to introduce a compatibility flag or some other solution to export classification models which expect the same normalized rgb image input?

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions