用户使用 OpenMVn6(固件 v5.0.0)尝试部署自训练的 YOLOv26 int8 TFLite 模型(2.8MB,输入尺寸 640×640),但无论通过 ROMFS 加载还是 Flash 二进制读取方式均失败,IDE 报错界面如附图所示。核心诉求:明确 OpenMVn6 当前对 YOLO 系列模型的最高兼容版本(如 YOLOv5/v7/v8/v10?)、是否支持 STM32CubeAI 工具链优化后部署、以及 TFLite 模型适配的关键限制条件。

我说了我发给你的内容别改
sz发贴机器人
# This work is licensed under the MIT license.
# Copyright (c) 2013-2025 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# TensorFlow Lite YOLO Example for OpenMV N6
import csi
import time
import ml
from ml.postprocessing.ultralytics import YoloV8
# Initialize camera
csi0 = csi.CSI()
csi0.reset()
csi0.pixformat(csi.RGB565)
csi0.framesize(csi.VGA) # 640x480 显示画面
csi0.window((640, 640)) # 推理窗口尽量按训练尺寸 640
# Load model
model = ml.Model("yolo26int8.tflite", postprocess=YoloV8(threshold=0.4))
print(model)
# Colors for each class
n = len(model.labels)
model_class_colors = [
(int(255 * i // n), int(255 * (n - i - 1) // n), 255)
for i in range(n)
]
clock = time.clock()
while True:
clock.tick()
img = csi0.snapshot()
# YOLO prediction
boxes = model.predict([img])
# Draw detections
for i, class_detections in enumerate(boxes):
rects = [r for r, score in class_detections]
for rect in rects:
img.draw_rectangle(rect, color=model_class_colors[i], thickness=2)
labels = [model.labels[i] for _ in range(len(rects))]
colors = [model_class_colors[i] for _ in range(len(rects))]
ml.utils.draw_predictions(img, rects, labels, colors, format=None)
print(clock.fps(), "fps")
说这是运行代码
请问 Openmvn6,不能适配自己训练的yolo26,不能通过修改模型结构再运行,如果要修改的话,要怎么改?最高能适配yolov几?目前我训练的yolo26int8 2.8mb用的也是tflite格式,没法加载到romfs,直接下载到flash里面在程序里调用也不行,显示如图所示,即使不能适配yolo26,最高能适配yolov几,能否通过stm32cubeai进行优化后运行,请给我一个详细的回答
目前最高适配到yolov8n。运行部署需要进行int8量化并导出为tflite格式。 当前5.0固件为开发版本,存在部分bug。 若要在当前版本使用自行训练的yolo模型,需要搭配4.8.10版本的IDE。 使用4.8.10的IDE上传romfs即可
使用4.8.10的IDE上传romfs即可,可以具体说下这一步的流程吗,目前已导出YOLOv8的tflite
请问 Openmvn6,能不能适配自己训练的yolo26,能不能通过修改模型结构再运行,如果要修改的话,要怎么改?最高能适配yolov几?目前我训练的yolo26int8 2.8mb用的也是tflite格式,没法加载到romfs,直接下载到flash里面在程序里调用也不行,显示如图所示,即使不能适配yolo26,最高能适配yolov几,能否通过stm32cubeai进行优化后运行,请给我一个详细的回答
为什么会出现模型不适配
1、具体适配哪些模型可以在IDE的工具——机器视觉——开放模型库中查看,没有的就是目前没有适配,当前不适配yolo26,算子不支持,最高支持yolov8n。 2、导入romfs时会使用ST edge ai core自动优化为NPU模型,不需要使用cubeai,cubeai优化出来的c,不兼容openmv的python 2、模型不适配的原因是不同的模型采用了不同的算子,OpenMVN6运行在MCU,并不是所有算子都支持。 3、部署教程:OpenMV Cam
4、你的图片里面还是3.0版本的ST edge ai core,并没有使用4.8.10的IDE烧录 5、必须使用最新的5.0.0开发固件和4.8.10的IDE(4.0.0 ai core),使用4.0.0的ai core重新转译模型