logo

OpenMV N6板升级固件后运行BlazeFace示例代码导致IDE断连并提示U盘拔出

2026-07-13 16:33
F
Birdy

OpenMV N6板升级固件后运行BlazeFace示例代码导致IDE断连并提示U盘拔出

故障概述

OpenMV N6板子连接上后运行默认的helloworld.py正常,右上角可以实时返回画面,但一运行MediaPipe BlazeFace人脸检测示例代码,IDE即与N6断连,同时电脑提示U盘已拔出。此前仅执行过IDE提示的固件升级(从旧版本升至5.0.0),未擦除FAT或重置romfs。

关键信息

  • 故障类型:硬件故障
  • 硬件型号:其他(N6板子)
  • 固件版本:5.0.0
  • 参考教程:[序言 · OpenMV中文入门教程](https://book.openmv.cc/)

复现代码

import csi
import time
import ml
from ml.postprocessing.mediapipe import BlazeFace

# Initialize the sensor.
csi0 = csi.CSI()
csi0.reset()
csi0.pixformat(csi.RGB565)
csi0.framesize(csi.VGA)

# BlazeFace requires a square image for the best results.
csi0.window((400, 400))

# Load built-in face detection model
model = ml.Model("/rom/blazeface_front_128.tflite", postprocess=BlazeFace(threshold=0.4))
print(model)

clock = time.clock()
while True:
    clock.tick()
    img = csi0.snapshot()

    # faces is a list of ((x, y, w, h), score, keypoints) tuples
    for r, score, keypoints in model.predict([img]):
        ml.utils.draw_predictions(img, [r], ("face",), ((0, 0, 255),), format=None)

        # keypoints is a ndarray of shape (6, 2)
        # 0 - right eye (x, y)
        # 1 - left eye (x, y)
        # 2 - nose (x, y)
        # 3 - mouth (x, y)
        # 4 - right ear (x, y)
        # 5 - left ear (x, y)
        ml.utils.draw_keypoints(img, keypoints, color=(255, 0, 0))

    print(clock.fps(), "fps")

附件

image
image
image
2026-07-13 22:56
D
zixiaojun

跟你相同的问题,目前没有找到解决办法,我运行的例程是lc person detector.py

2026-07-14 09:25
Z
星小瞳xs

更新到最新版本IDE,随后点击IDE右下角的固件版本,勾选重置FAT和romfs,重新烧录固件后重试

2026-07-14 13:35
D
zixiaojun

感谢,按照你说的,

问题已经解决