はじめる

クイックスタートガイド: Seeed Studio reCameraとUltralytics YOLO26

reCameraは、Ultralyticsが毎年開催するハイブリッドイベント、YOLO Vision 2024 (YV24)でAIコミュニティ向けに発表されました。主にエッジAIアプリケーション向けに設計されており、オンデバイスAI処理と簡単なデプロイを実現します。

幅広いハードウェア構成に対応し、オープンソースのリソースも利用できるため、エッジ上でコンピュータービジョンソリューションのプロトタイピングとデプロイを行うのに適しています。

Seeed Studio reCamera

reCameraを選ぶ理由#

reCameraシリーズは、開発者のニーズに合わせてエッジAIアプリケーション向けに専用設計されています。主な機能は次のとおりです。

  • RISC-Vによる高性能処理: 中核となるSG200XプロセッサはRISC-Vアーキテクチャを採用し、エッジAIタスクで高い効率性を発揮します。1秒あたり1兆回の演算(1 TOPS)を実行でき、リアルタイムの物体検出などのタスクに対応します。

  • 最適化された動画技術: H.264やH.265などの高度な動画圧縮規格に対応し、画質を損なわずにストレージと帯域幅の要件を削減します。HDRイメージング、3Dノイズリダクション、レンズ補正などの機能により、厳しい環境でも画質を維持します。

  • エネルギー効率に優れたデュアルプロセッシング: SG200Xが複雑なAIタスクを処理する一方で、小型の8ビットマイクロコントローラーが単純な処理を担い、消費電力を抑えます。そのため、reCameraはバッテリー駆動や低消費電力の環境に最適です。

  • モジュール式でアップグレード可能な設計: reCameraは、コアボード、センサーボード、ベースボードの3つの主要コンポーネントで構成されるモジュール式構造を採用しています。この設計により、プロジェクトの進行に合わせてコンポーネントを交換またはアップグレードできます。

reCameraのハードウェアをすばやくセットアップする#

reCamera Getting Startedページに従い、お使いのデバイス(reCamera 2002 Series、Gimbal、HQ POEなど)を選択して、デバイスの初期セットアップ(ネットワークへの接続や、検出結果をすばやくプレビューするためのNode-RED Web UIへのアクセスなど)に関するクイックスタートガイドを開きます。

プリインストール済みYOLOモデルを使用した推論#

reCameraには4つのUltralytics YOLOモデルがプリインストールされており、Node-REDダッシュボードで任意のモデルを選択できます。

ステップ1: reCameraをネットワークに接続した場合は、WebブラウザーにreCameraのIPアドレスを入力してNode-REDダッシュボードを開きます。reCameraをUSB経由でPCに接続した場合は、192.168.42.1と入力できます。検出モデルはデフォルトで読み込まれます。

reCameraの検出デモ

ステップ2: 右下隅の緑色の丸をクリックして、Node-REDフローエディターを開きます。

手順3: modelノードをクリックし、On Deviceをクリックします。

Node-REDのモデル選択

ステップ4: プリインストールされている4つのモデルから1つを選択し、Doneをクリックします。この例ではポーズモデルを選択します。

Selecting the pose model in the Node-RED model node

手順5: Deployをクリックし、デプロイが完了したらDashboardをクリックします。

reCamera Node-REDのデプロイ

ダッシュボードに、カメラ映像上でポーズ推定モデルが実行されている様子が表示されます。

reCameraの姿勢推定デモ

cvimodelへのエクスポート: YOLO26モデルの変換#

reCameraでカスタムトレーニングしたYOLO26モデルを使用する場合は、以下の手順に従ってください。

変換では、まずPyTorchモデルをONNXにエクスポートし、次にMLIRモデル形式に変換してから、最後にMLIRをcvimodelに変換して、デバイス上で推論を実行します。

Seeed Studio reCamera AI development toolchain

ONNXにエクスポート#

Ultralytics YOLO26モデルをONNXモデル形式にエクスポートします。

インストール#

必要なパッケージをインストールするには、次を実行します。

インストール
pip install ultralytics

インストール手順の詳細とベストプラクティスについては、Ultralyticsのインストールガイドをご覧ください。YOLO26に必要なパッケージのインストールで問題が発生した場合は、解決策とヒントが記載されたよくある問題のガイドをご確認ください。

使用方法#

使用方法
from ultralytics import YOLO

# YOLO26モデルを読み込みます
model = YOLO("yolo26n.pt")

# モデルをONNXフォーマットにエクスポート
model.export(format="onnx", opset=14)  # 'yolo26n.onnx'を作成します

エクスポートプロセスの詳細については、Ultralyticsのエクスポートに関するドキュメントページをご覧ください。

ONNXをMLIRとcvimodelにエクスポートする#

ONNXモデルを取得したら、AIモデルの変換と量子化のページを参照し、ONNXモデルをMLIRに変換してからcvimodelに変換してください。

reCameraの実世界での活用例#

reCameraは、デバイス上でのコンピュータービジョン処理とモジュール式設計により、幅広い実環境のシナリオに適しています。

  • 転倒検出: 安全対策や医療用途向けに設計されたreCameraは、転倒をリアルタイムで検出できます。そのため、高齢者介護施設、病院、迅速な対応が不可欠な産業現場に適しています。

  • 個人用保護具の検出: reCameraは、PPEの着用状況をリアルタイムで検出することで、職場の安全を支援できます。作業員がヘルメットや手袋などの安全装備を着用しているかどうかを特定し、産業環境でのリスクを低減します。

個人用保護具の検知

  • 火災検出: reCameraのリアルタイム処理機能は、産業地域や住宅地での火災検出に適しており、潜在的な災害を防ぐための早期警告を提供します。

  • 廃棄物検出: 環境モニタリングや、YOLO11による廃棄物管理における廃棄物検出にも利用できます。

  • 自動車部品検知: 製造業や自動車産業では、品質管理、組立ラインのモニタリング、在庫管理を目的とした自動車部品の検知と分析に役立ちます。

自動車検査向けYOLOによる自動車部品検知

よくある質問#

  • reCameraを初めてセットアップするには、次の手順に従ってください。

    1. reCameraを電源に接続します
    2. reCameraのスタートガイドページを使ってネットワークに接続します(デバイスを選択すると、クイックスタートガイドが開きます)
    3. WebブラウザーにデバイスのIPアドレスを入力してNode-REDのWeb UIにアクセスします(USB接続の場合は192.168.42.1を使用します)
    4. ダッシュボードインターフェースから、プリインストール済みのYOLOモデルをすぐに使用できます
  • はい、独自にトレーニングしたYOLO26モデルをreCameraで使用できます。手順は次のとおりです。

    1. model.export(format="onnx", opset=14)を使用して、PyTorchモデルをONNX形式にエクスポートします
    2. ONNXモデルをMLIR形式に変換します
    3. MLIRをcvimodel形式に変換し、デバイス上で推論できるようにします
    4. 変換したモデルをreCameraに読み込みます

    詳しい手順については、AIモデルの変換と量子化ガイドを参照してください。

  • 処理に外部ハードウェアが必要な従来のIPカメラとは異なり、reCameraには次の特長があります。

    • RISC-V SG200Xプロセッサーにより、AI処理をデバイス上で直接実行できます
    • リアルタイムのエッジAIアプリケーション向けに、1 TOPSの演算性能を提供します
    • コンポーネントのアップグレードやカスタマイズが可能なモジュール式設計を採用しています
    • H.264/H.265圧縮、HDRイメージング、3Dノイズ低減などの高度な動画技術に対応しています
    • すぐに使用できるUltralytics YOLOモデルがプリインストールされています

    これらの特長により、reCameraは追加の外部処理ハードウェアを必要としない、エッジAIアプリケーション向けのスタンドアロンソリューションとなっています。

コメント50

質問したり、結果を共有したり、ほかの人をサポートしたりできます。

    1. Glenn JocherUltralytics

      Yes, a custom-trained YOLO26 model can run on reCamera using the ONNX -> MLIR -> cvimodel workflow in the reCamera guide; if you hit a blocker, please share the exact step and full error here so the Ultralytics team can help.

  1. HanJammerGitHub

    This site mentions recamera comes with YOLO26 (which is why I bought two of them) yet YOLO11 is installed (which is visible on screenshots as well) and I can't load YOLO26 - how to do that? I can't find reliable guide :(

    1. HanJammerGitHub

      Ah nevermind, I think I got it, still it would be better not to advertise the camera "reCamera comes pre-installed with four Ultralytics YOLO26 models" which is basically not true.

    2. HanJammerGitHub

      I whipped out some 'single click' tool to convert YOLO26 onnx-es which makes it a bit easier... I need to test it a bit, for now it supports the base model. Perhaps I will push it to my github later this week.

      image

  2. tcpipchipGitHub

    I tested on recamera with my trainned pose keypoint model... Same problem...no keypoint

    Need to test on yolo8 on tdl sdk

    1. Glenn JocherUltralytics

      Thanks for checking this; for custom pose models on reCamera, please drop the exact export and conversion steps here in the discussion so the Ultralytics team can take a look, since keypoints should work only after a correct ONNX -> MLIR -> cvimodel pipeline as outlined in the reCamera guide and Seeed’s conversion guide, and it’s worth first confirming your exported ONNX model still produces keypoints before converting.

    1. Glenn JocherUltralytics

      Calibration isn’t done in the Ultralytics export step; for reCamera, you export to ONNX first with the reCamera guide, then calibration happens during Seeed’s ONNX→MLIR→cvimodel flow using a small representative set of your own images, as described in Seeed’s Convert and Quantize AI Models guide. If you hit an error in that step, please drop the full log here and we’ll take a look.

    1. tiruvijayakumarGitHub

      NOO, i didnt train on animals, i trained on these classes for pose detection for persons using yolov11n-pose.pt weights. I fine‑tuned the YOLOv11n‑pose.pt model on my custom classes:

      Running Walking Golf Skate Horse riding Kicking Diving I just uploaded animal detection model to justify that custom model deployment with quantization for object detection(yolo11n.pt) on recamera has no issues, it was another cvi model which i had no issues, it worked PERFECTLY. i only issue what i am facing is the pose detection quantized model where i am not able to see the keypoints on the inference output but bounding box is drawn along with predicted class label refer below: image image

      now just trying to train the model for pose detection using yolov8 and then i would try quantizing the model and check if the keypoints are shown in the inference output

    2. Glenn JocherUltralytics

      Thanks, that helps narrow it down — since detection cvimodels work and only the quantized pose model loses keypoints, this looks more like a pose conversion or postprocessing issue in the ONNX → MLIR → cvimodel step than a training problem. Please keep the details here so the Ultralytics team can see them, and share the exact conversion commands and full text logs from the reCamera guide and Seeed model conversion guide, plus whether the same pre-quantized ONNX shows keypoints before conversion.

    3. tiruvijayakumarGitHub(編集済み)

      i ran predictions on ultralytics hub on the .pt model format, i attached the whole problem scenario and image content :https://github.com/orgs/ultralytics/discussions/22090?sort=new#discussioncomment-16346206 Any ways uploading the prediction on ultralytics hub in this thread also : image so on the model.pt file inference shows this data, this confirms that pose estimation model works. { "images": [ { "shape": [ 426, 640 ], "speed": { "preprocess": 1.41517, "inference": 130.14456, "postprocess": 0.99221 }, "results": [ { "name": "Kicking", "class": 5, "confidence": 0.80929, "box": { "x1": 0.26068, "y1": 0.10738, "x2": 0.55882, "y2": 0.85426 }, "keypoints": { "x": [ 0.41923001408576965, 0.42656999826431274, 0.4166699945926666, 0.45181000232696533, 0.42857998609542847, 0.488209992647171, 0.43380001187324524, 0.543470025062561, 0.41604000329971313, 0.5516700148582458, 0.4164600074291229, 0.46198999881744385, 0.4427199959754944, 0.357340008020401, 0.427839994430542, 0.29197001457214355, 0.43891000747680664 ], "y": [ 0.2315099984407425, 0.21907000243663788, 0.21740999817848206, 0.21602000296115875, 0.21322999894618988, 0.2783600091934204, 0.2824600040912628, 0.3255299925804138, 0.35097000002861023, 0.32879000902175903, 0.3619599938392639, 0.5179499983787537, 0.5104399919509888, 0.6517800092697144, 0.6389099955558777, 0.7586100101470947, 0.7324900031089783 ], "visible": [ 0.9994300007820129, 0.9990299940109253, 0.9990000128746033, 0.999019980430603, 0.9988300204277039, 0.9995700120925903, 0.9996600151062012, 0.998960018157959, 0.9992700219154358, 0.9985499978065491, 0.997439980506897, 0.9995700120925903, 0.9995700120925903, 0.9988800287246704, 0.9989299774169922, 0.982990026473999, 0.9852499961853027 ] } } ] } ], "metadata": { "imageCount": 1, "functionTimeAlive": 78321.917, "functionTimeCall": 0.138, "model": "best.pt", "version": { "ultralytics": "8.4.30", "torch": "2.11.0+cpu", "torchvision": "0.26.0+cpu", "python": "3.14.3" } }, "networkTime": 1.214 }

      I didnt capture the conversion commands and text logs during the onnx->mlir->cvimodel, would repeat the same steps and paste the images in this thread itself.

    4. tiruvijayakumarGitHub

      Exported the yolov11n-pose.pt(finetuned) on google colab to onnx format image Uploaded the model on netron to view the structure, onnx is in the format IRv9 ,opset v20(would downgrade it). Classes are running, walking, golf-swing, skateboarding, riding-horse and kicking image image image image Seeed studio guide for downgrading image Initial structure of workspace folder image Step1: pull sopho/tpuc_dev:v3.1 image Step2: starting the container image Step3: installing onnx image Step4: Clone Downgrade Script image Step5: Downgrade Script settings IR v8 and Opset v17 image image image Step6: Install TPU-MLIR tools inside container: image

      Step7: clone tpu-mlir image Step8: setup environment tpu-mlir(long step) image image

      Step9: according to seeed studio guide, i have to include outputs before the model's head as the parameter for this particular step model_transform
      --model_name yolo11n
      --model_def yolo11n.onnx
      --input_shapes "[[1,3,640,640]]"
      --mean "0.0,0.0,0.0"
      --scale "0.0039216,0.0039216,0.0039216"
      --keep_aspect_ratio
      --pixel_format rgb
      --output_names "/model.23/cv2.0/cv2.0.2/Conv_output_0,/model.23/cv3.0/cv3.0.2/Conv_output_0,/model.23/cv2.1/cv2.1.2/Conv_output_0,/model.23/cv3.1/cv3.1.2/Conv_output_0,/model.23/cv2.2/cv2.2.2/Conv_output_0,/model.23/cv3.2/cv3.2.2/Conv_output_0"
      --test_input ../image/dog.jpg
      --test_result yolo11n_top_outputs.npz
      --mlir yolo11n.mlir i have the onnx file, could someone of the team help me identify the outputs before the model's head? @glenn-jocher here is the onnx file https://drive.google.com/file/d/1UF25DK2zXx0GCWdcx55SPYHL71SylDeg/view?usp=sharing