MaixPy icon indicating copy to clipboard operation
MaixPy copied to clipboard

物体检测不支持 image 格式 FMT_RGBA8888,导致无法正常使用 png 图片

Open 1014156094 opened this issue 8 months ago • 5 comments

以下代码会报错,预期结果应该是要正确运行

detector = nn.YOLO11(model="/root/models/yolo11n.mud", dual_buff=True)
cam = camera.Camera(disp.width(), disp.height(), image.Format.FMT_RGBA8888)

1014156094 avatar Apr 03 '25 06:04 1014156094

那就用RGB888

Neutree avatar Apr 03 '25 08:04 Neutree

那就用RGB888

需求需要还原UI设计稿要用png图片,所以要用FMT_RGBA8888

1014156094 avatar Apr 03 '25 10:04 1014156094

img.to_format()转换一下格式

Neutree avatar Apr 03 '25 14:04 Neutree

或者你自己训练一个RGBA输入的模型就好了

Neutree avatar Apr 03 '25 14:04 Neutree

img.to_format()转换一下格式

试了不行,一样会报错

Image

1014156094 avatar Apr 10 '25 05:04 1014156094