My data source is in RGB565 format, and the converted picture is a BMP file. But after executing the train command, it prompts that the BMP file cannot be opened.
The .bmp
file format is supported by Ultralytics, however I’m not certain what the difference is with the RGB565 format. Are you able to open the same image using OpenCV directly?
import cv2
img = cv2.imread("path/to/file.bmp")
If the file doesn’t open using OpenCV, you might need to convert to another format before training.
Oh, looks like the RGB565 format is for 16-bit images. You’ll either have to create custom code or covert to 8-bit for compatibility with training.
I understand. Thank you.
Hello!
It appears the training dataloader is having trouble with the BMP format. While BMP files are supported for prediction as noted in our Model Prediction documentation, for training, we generally recommend using more standard image formats like JPG or PNG.
Converting your BMP images to JPG or PNG should resolve this issue and allow the training process to proceed smoothly.