Skip to content

WEBP image support for training YoloV5 #2166

@Transigent

Description

@Transigent

❔Question

I noted in this YoloV3 post that cv2 supports a range of image formats including WEBP.

I assumed this would apply to YoloV% also, so I went ahead and regenerated my dataset as WEBP files (they are a lot smaller for the same quality) and tried to run on Colab in the usual way but it failed saying 'no images found'.

I then modified line 28 of utils/dataset.py
img_formats = ['bmp', 'jpg', 'jpeg', 'png', 'tif', 'tiff', 'dng'] # acceptable image suffixes
to add webp as a suffix and it appears to be working fine.

Is there a reason why WEBP files are not enabled here by default?

Thanks!
And thanks for the superb YoloV5 library!

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions