logo

OpenMV N6 运行 Edge Impulse 模型报错(固件4.8.1)

2026-04-08 09:02
X
xqfrgc9c7w6d

我要把文件复制到openmv里面吗?

X
xqfrgc9c7w6d
image.png

你的代码又有新的

报错了

2026-04-08 13:20
Z
星小瞳xs

肯定要把文件放到OpenMV里面

2026-04-08 13:38
Z
星小瞳xs

N6因为有NPU,H7和H7PLUS上能使用的FOMO目标检测模型不能在N6上使用,需要使用星瞳ai训练器重新训练

2026-04-12 09:59
X
xqfrgc9c7w6d
image.png

这个要训练多久,已经一小时了还没有动静

2026-04-12 10:41
X
xqfrgc9c7w6d
image.png

出现这样的报错怎么办

2026-04-12 10:49
X
xqfrgc9c7w6d

无

2026-04-13 11:20
Z
星小瞳xs
image.png

报错显示数据集加载错误 确保目录没有中文,数据文件正常,然后尝试重新上传

2026-04-17 13:34
C
cqkk0az6zrgz

我也出现了这个问题,而且我是在星瞳AI上训练的

C
cqkk0az6zrgz
image.png
C
cqkk0az6zrgz
image.png
2026-04-20 10:55
Z
星小瞳xs

具体用法参考示例中的例子

image.png

2026-04-20 11:20
C
cqkk0az6zrgz

示例代码一运行就断开连接、

2026-04-20 17:58
Z
星小瞳xs
# 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
#
# This example shows off Google's MediaPipe Face Landmark Detection model for a single face.
#
# NOTE: This exaxmple requires an OpenMV Cam with an NPU like the AE3 or N6 to run real-time.

import csi
import time
import ml
from ml.preprocessing import Normalization
from ml.postprocessing.mediapipe import BlazeFace
from ml.postprocessing.mediapipe import FaceLandmarks

# Initialize the sensor.
csi0 = csi.CSI()
csi0.reset()
csi0.pixformat(csi.RGB565)
csi0.framesize(csi.QVGA)
csi0.window((400, 400))

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

# Load built-in face landmark model
face_landmarks = ml.Model("/rom/face_landmarks_192.tflite", postprocess=FaceLandmarks(threshold=0.4))
print(face_landmarks)

# Tracking vars.
n = None

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

    if n is None:
        # faces is a list of ((x, y, w, h), score, keypoints) tuples
        for r, score, keypoints in face_detection.predict([img]):
            # rect is (x, y, w, h) - enlarge by 2x for face landmarks model
            wider_rect = (r[0] - r[2] // 2, r[1] - r[3] // 2, r[2] * 2, r[3] * 2)
            # Operate on just the ROI of the detected face
            n = Normalization(roi=wider_rect)

    else:
        # marks is a list of ((x, y, w, h), score, keypoints) tuples
        marks = face_landmarks.predict([n(img)])

        # No faces detected, reset the tracker.
        if not marks:
            n = None
            continue

        # Draw bounding boxes around the detected faces and keypoints.
        for r, score, keypoints in marks:
            ml.utils.draw_predictions(img, [r], ("face",), ((0, 0, 255),), format=None)

            # keypoints is a ndarray of shape (468, 3) where each keypoint is (x, y, z)
            ml.utils.draw_keypoints(img, keypoints, radius=0, color=(255, 0, 0))

            # Center new_wider_rect on face for tracking
            new_wider_rect = (r[0] + (r[2] // 2) - (wider_rect[2] // 2),
                              r[1] + (r[3] // 2) - (wider_rect[3] // 2),
                              wider_rect[2],
                              wider_rect[3])
            # Operate on just the ROI of the detected face
            n = Normalization(roi=new_wider_rect)

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

运行此代码

2026-04-20 22:57
C
cqkk0az6zrgz

依旧是一运行就断开了

2026-04-21 09:31
Z
星小瞳xs

可以录一个视频上传到这里,以供分析问题

2026-05-29 20:26
W
wlwpoeq0t107
W
wlwpoeq0t107

为什么n6运行示例代码就闪退,固件已更新为5.0.0,ide已最新的4.8.11

W
wlwpoeq0t107

这该怎么解决

2026-06-01 09:27
Z
星小瞳xs

去掉csi.windwo这一句