在线训练模型部署到板子后一些图片输入会报错

Viewed 129

重现步骤
img_data = image.Image(img_path)
img_data_rgb888=img_data.to_rgb888()
有些图片可以,有些图片会报错。第一张可以,第二张不可以会报错

期待结果和实际结果

软硬件版本信息

错误日志
RuntimeError: given output image colortype or bitdepth not supported for color conversion

尝试解决过程

补充材料

1 Answers

现在分析问题,我采用
img = Image.open(img_path)
print(img.mode)
有些图片为灰度图,有些图片为位图