CosmoEdge: one C++17 engine that unifies Sophgo, Rockchip and x86 NPUs for edge video AI
CosmoEdge is an open-source C++17 engine that turns video-AI models into deployable edge applications — and its pitch is a deliberately pragmatic one. Instead of pretending a single model file can run everywhere, it unifies the application layer across three very different NPU ecosystems, from Sophgo to Rockchip to plain x86.
Edge AI has a familiar pain point: every board ships its own toolchain. A Sophgo BM1688 speaks BMRT and .nn model files; a Rockchip RK3576 leans on RKNN plus the MPP/RGA media pipeline; an x86 box falls back to ONNX Runtime. Each platform brings its own toolchain, its own model format and its own API, so swapping the hardware all but forces you to rewrite the application.
Many "cross-platform" projects simply staple several inference backends together behind a wrapper. The genuinely hard parts — unified scheduling, unified media handling, unified alarm logic and unified model distribution — are exactly what CosmoEdge set out to tackle.
What it is
In one line: CosmoEdge is a C++ engine that turns video-AI models into deployable edge applications, providing a complete application layer — model import, visual orchestration, alarms and event dispatch — across Sophgo, Rockchip and x86 platforms.
Supported platforms
| Platform | Status | Inference backend / model format | Current capability |
|---|---|---|---|
| Sophgo BM1688 | v1.1 primary | BMRT / .nn |
VLM, 6 channels @ 0.1 FPS; passed 72-hour dual-CV stability test |
| Sophgo CV186X | v1.1 | BMRT / target-specific .nn |
VLM, 6 channels @ 0.1 FPS; passed 72-hour dual-CV stability test |
| Rockchip RK3576 | v1.1 | RKNN + RKLLM / .rknn |
VLM, 4 channels @ 0.1 FPS; passed 72-hour dual-CV stability test |
| Rockchip RV1126B | v1.1 | RKNN + MPP/RGA / .rknn |
Passed 72-hour dual-CV stability test; VLM not in this release's scope |
| x86 Linux / Windows | Supported | ONNX Runtime / .onnx |
Full workflow can be tried locally with no dedicated hardware |
| Apple Silicon macOS | Docker preview | ONNX Runtime (linux/amd64 emulation) | Local single-stream developer workflow |
| Sophgo BM1684X | Planned | — | Out of scope for the current release |
That covers the two domestic NPU vendors with the largest share of the edge-AI box market: Sophgo (BM1688 / CV186X) and Rockchip (RK3576 / RV1126B).
Video intake, including the Chinese national standard
One box takes in several kinds of source at once. GB/T 28181 is the Chinese national standard that most domestic IP cameras and recorders speak, and it sits alongside RTSP, local video files, USB cameras and WebRTC as an input CosmoEdge drives in parallel. The certified device bundle passed a 16-channel CV baseline. That figure matters, because the box CosmoEdge is usually brought in to replace tends to stall around five streams once its memory fills up.
The important nuance is that CosmoEdge does not claim "one model runs on every platform." Only the application architecture and engine are unified; each platform still uses its own runtime and its own model artefacts. That is the honest approach, because NPU instruction sets differ far too much for a single model file to cover them all.
Architecture: one application layer, native backends underneath
+-------------------------------------------------------------+
| Web Console | Visual Orchestration | REST/WebSocket/MQTT |
+----------------------------+--------------------------------+
|
+----------------------------v--------------------------------+
| C++ Engine Core |
| Media | Inference | Tasks | Rules | Alarms | Events | Models|
+----------------------------+--------------------------------+
|
+----------------------------v--------------------------------+
| Inference & Media Backend Interfaces |
+---------------+--------------------------+------------------+
| Sophon BMRT | RKNN + MPP/RGA | ONNX Runtime |
| BM1688/CV186X | RK3576/RV1126B | x86 Linux/Win |
+---------------+--------------------------+------------------+
The stack is unified in three places: the application layer (web console, orchestration, API), the engine layer (C++17 multi-channel media, inference scheduling, tasks, rules, alarms and events), and the backend adapters (each platform's own inference and media pipeline).
Capability matrix
| Capability | Description |
|---|---|
| Real-time video analytics | Detection, classification, tracking, regions, counters, OSD, alarm snapshots |
| Prompt-driven vision | VLM state judgement, GroundingDINO open-vocabulary detection |
| Visual application workflows | Drag and connect models, rules, events and output actions in the browser |
| Edge integration | Structured events over REST / WebSocket / MQTT / HTTP webhook |
| Model import and protection | Conversion, import, validation; Open / Protected distribution boundary |
| Native runtime | C++17 multi-channel media, inference scheduling, tasks, events |
| Observability | Prometheus metrics, event history, alarms |
Prompt-driven vision is the standout. Rather than being limited to a fixed-class YOLO model, you can write a natural-language prompt for a VLM to judge a state, or point GroundingDINO at arbitrary open-vocabulary targets — a person in a red vest, a box that has fallen over, and so on.

A scenario, once it works, can be saved as a template and reused. Around that sits a library of 25+ ready-made vision scenarios, covering helmet detection, unauthorised intrusion, smoke and fire, perimeter crossing and people counting. A repeat job therefore starts from an existing rule set rather than a blank canvas, and the site-specific work narrows to whatever is genuinely new.
Building for Sophgo and Rockchip
Both build paths are wrapped in Docker, so developers do not need to install the BMRT or RKNN SDK locally — a key part of lowering the barrier to entry.
Sophgo (BM1688 / CV186X):
./scripts/docker-compose.sh -f docker-compose.sophon.yml run --rm \
cosmo-sophon-package --chip bm1688
# or --chip cv186x
Output lands in build_output/public-runtime/<chip>/, with TARGET_CHIP and SHA256SUMS.
Rockchip (RK3576 / RV1126B):
# RK3576
COSMO_TARGET_CHIP=rk3576 ./scripts/docker-compose.sh \
-f docker-compose.rockchip.yml run --rm cosmo-rockchip-package
# RV1126B
COSMO_TARGET_CHIP=rv1126b ./scripts/docker-compose.sh \
-f docker-compose.rockchip.yml run --rm cosmo-rockchip-package
Output lands in build_output/<chip>/.

The benchmarks
What makes CosmoEdge credible is that it publishes specific numbers with the conditions spelled out. These are described by the authors as "short-run gate boundaries under recorded conditions" — not a maximum-capacity certification, and not a production recommendation.
72-hour dual-CV stability test (each channel ran two tasks at once — pedestrian detection plus no-hard-hat analysis — across three model stages; fed by a controlled local loop, not real RTSP network capture):
| Platform | Channels | Task bindings | Sampling coverage | Min / average FPS | Result |
|---|---|---|---|---|---|
| BM1688 | 8 | 16 | 4316/4320 | 4.68 / 5.086 | PASS |
| CV186X | 8 | 16 | 4316/4320 | 4.54 / 5.085 | PASS |
| RK3576 | 8 | 16 | 4316/4320 | 5.00 / 5.098 | PASS |
| RV1126B | 4 | 8 | 4316/4320 | 4.85 / 5.230 | PASS |
VLM capacity boundary (target 0.1 FPS per channel):
| Platform | Target FPS / channel | Last passing channel count | First failure reason |
|---|---|---|---|
| BM1688 | 0.1 | 6 | 7-channel FPS ratio 69.5%, below the 80% threshold |
| CV186X | 0.1 | 6 | 7-channel FPS ratio 69.2%, below the 80% threshold |
| RK3576 | 0.1 | 4 | 5-channel FPS ratio 69.7%, below the 80% threshold |
| RV1126B | — | — | VLM not validated in this release |

Publishing the point where it stops working — and why — is far more professional than simply claiming "supports 100 streams."
What it costs
The engine is free software; the money goes on hardware. The reference unit is a Rockchip RK3576 board with a 6 TOPS NPU, 8 GB of memory and 64 GB of storage, listed in China at around ¥1,980 — roughly US$275. At that level, eight channels of analytics fit inside project budgets that would never have carried a dedicated AI line item. It also keeps the validation path honest, because a prototype can run on x86 before the same pipeline moves onto an NPU box.
Who it is for
- Teams building edge-AI video analytics — security, industrial inspection, workplace safety, smart construction sites
- Developers using Sophgo or Rockchip NPU platforms
- Product managers and architects who need a cross-platform edge-AI path
- Teams that want to validate on x86 and then migrate to an NPU
- AI algorithm vendors that need protected model distribution
- Video-surveillance integrators needing detection, tracking, alarms and event dispatch in one stack
- Anyone wanting to deploy a VLM on edge hardware
- Developers keeping an eye on the domestic NPU ecosystem
The edge-AI field is crowded with vendor SDKs and frameworks that each want to unify the ecosystem. But at delivery time, what is usually missing is not the model — it is the ability to turn a model into an application that can run, be orchestrated, be distributed and be maintained. CosmoEdge concedes that it cannot run one model across every platform, yet it does manage to adapt one application architecture to all of them, from BM1688 to RK3576 to x86, and from YOLO detection to VLM inference. That engineering layer — visual orchestration, event dispatch, 72-hour stability testing and Model Guard model protection — is precisely the part of edge AI that is hardest to ship.
The core engine and the web console were released under Apache-2.0 in July 2026, and the documentation covers quick start, scenario configuration, visual orchestration, VLM usage, model import, device deployment and API integration. The project is published as cosmo-wander-ai/cosmo-edge on GitHub, and the traction has followed: it reported 650+ stars and 150+ forks in early September 2026, and by mid-October it stood at 1,626 stars and 302 forks.

IOTTourChina covers open-source IoT hardware and edge platforms built on widely available Chinese silicon as part of its device and developer resource. Details should be confirmed against the project's official documentation.