



我也出现了类似的问题
我的txt文件和tfilte能烧录上去
但是运行不了main.py文件
怎么没人来回答啊
OpenMV N6的AI模型只能用星瞳AI云服务训练吗,这个网站训练的都是打矩形框标签,可是我的自定义模型是想检测关键点和姿态组成的特定动作,不太适合用YOLO框识别,有没有别的办法
OpenMV Cam 此链接教程适用于4.8.6版本以上的IDE和5.0版本及以上固件。 当前可以先使用IDE内的示例模型
或可以提供模型和标签文件,这边提供测试
IDE内的示例模型中,直接就有关键点和姿态分析模型,此模型可以直接使用
示例代码一运行就断开连接
你们产品是不是有问题
我已经全部按照你们的要求配置了
还是不行
IDE内的示例模型中,直接就有关键点和姿态分析模型,此模型可以直接使用 对,我是想在关键点检测的基础上,识别特定手势,不是还得训练模型吗,这个模型也只能用星瞳AI云服务训练吗,可是我的自定义模型是想检测关键点组成的特定动作,有没有别的方法
# 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")
此代码可以正常运行
此模型返回特征点,针对特征点的参数做后处理即可识别特定手势,无需再训练模型。 且训练目标检测模型也可实现手势检测功能