{"id":35094670,"url":"https://github.com/opensensor/thingino-accel","last_synced_at":"2026-05-21T02:35:49.308Z","repository":{"id":326941514,"uuid":"1104679152","full_name":"opensensor/thingino-accel","owner":"opensensor","description":"Open-Source Neural Network Runtime (Ingenic MIPs)","archived":false,"fork":false,"pushed_at":"2026-02-28T02:08:50.000Z","size":106958,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-14T15:57:42.436Z","etag":null,"topics":["detection-engineering","ingenic","nna","t41","yolo"],"latest_commit_sha":null,"homepage":"https://github.com/opensensor/thingino-accel","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensensor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-26T14:37:11.000Z","updated_at":"2026-05-04T02:07:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/opensensor/thingino-accel","commit_stats":null,"previous_names":["opensensor/thingino-accel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opensensor/thingino-accel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fthingino-accel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fthingino-accel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fthingino-accel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fthingino-accel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensensor","download_url":"https://codeload.github.com/opensensor/thingino-accel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fthingino-accel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33286135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T15:12:43.734Z","status":"online","status_checked_at":"2026-05-21T02:00:07.181Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detection-engineering","ingenic","nna","t41","yolo"],"created_at":"2025-12-27T15:08:18.848Z","updated_at":"2026-05-21T02:35:49.302Z","avatar_url":"https://github.com/opensensor.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"mars-logo.png\" alt=\"Mars Logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n# Mars: Open-Source Neural Network Runtime for Ingenic T41\n\n**Hardware-accelerated inference on IP cameras using the MXUv3 SIMD unit and ORAM.**\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n## 🚀 Performance\n\n| Metric | Before (Scalar) | After (Mars) | Speedup |\n|--------|-----------------|--------------|---------|\n| Inference Time | 35 seconds | **1.75 seconds** | **20x** |\n| Memory Read | 41 MB/s (DDR) | 314 MB/s (ORAM) | 7.6x |\n| Memory Write | 77 MB/s (DDR) | 1578 MB/s (ORAM) | 20.6x |\n\n## Overview\n\nMars is an open-source neural network runtime for the Ingenic T41 SoC, reverse-engineered from Ingenic's proprietary Venus SDK. It enables hardware-accelerated inference on IP cameras running [Thingino](https://thingino.com) firmware.\n\n**Why Mars?**\n- 🔓 **Open Source**: No proprietary SDKs or closed toolchains\n- 🐧 **musl Compatible**: Works with Thingino's musl libc (Venus requires glibc)\n- ⚡ **Hardware Accelerated**: Uses MXUv3 SIMD (512-bit) and on-chip ORAM\n- 🎯 **Purpose-Built**: Custom TinyDet model for security camera use cases\n\n## Features\n\n- ✅ MXUv3 SIMD acceleration (16 floats per instruction)\n- ✅ ORAM weight staging (640KB on-chip, 7.6x faster than DDR)\n- ✅ Conv2D, ReLU, MaxPool, Add, Concat operations\n- ✅ NHWC tensor format (optimized for T41 memory access)\n- ✅ Custom `.mars` model format\n- ✅ ONNX → Mars compiler (Python + Rust)\n\n## Quick Start\n\n### Building\n\n```bash\n# Set cross-compiler (adjust path to your toolchain)\nexport CROSS_COMPILE=/path/to/mipsel-linux-\n\n# Build runtime library and tools\nmake\n\n# Output:\n#   build/lib/libmars.so    - Runtime library\n#   build/bin/mars_detect   - Detection CLI tool\n```\n\n### Running on Device\n\n```bash\n# Copy to camera\nscp build/bin/mars_detect build/lib/libmars.so root@camera:/opt/\n\n# Run detection\nssh root@camera\ncd /opt\nLD_LIBRARY_PATH=/opt ./mars_detect model.mars input.jpg output.jpg\n```\n\n### Compiling Models\n\n```bash\ncd mars-compiler\n\n# Stage 1: ONNX → JSON + weights\npython3 onnx2mars.py model.onnx -o model\n\n# Stage 2: JSON → .mars binary\ncargo run -- -i model.json -o model.mars --float32\n```\n\n## Architecture\n\n```\nthingino-accel/\n├── src/mars/              # Mars runtime (C)\n│   ├── mars_runtime.c     # Model loader and executor\n│   ├── mxu_conv.c         # MXUv3 convolution kernels\n│   └── mars_nn_hw.c       # Hardware initialization (ORAM, MXU)\n├── mars-compiler/         # ONNX → Mars compiler\n│   ├── onnx2mars.py       # Python: ONNX → JSON extraction\n│   └── src/               # Rust: JSON → .mars binary\n├── training/              # TinyDet model training\n│   ├── tinydet.py         # Model architecture\n│   └── train_*.py         # Training scripts\n├── include/               # Public headers\n└── docs/                  # Documentation\n    └── MARS_PROJECT_WRITEUP.md  # Full research paper\n```\n\n## TinyDet: Custom Detection Model\n\nWe trained a purpose-built 4-class detector optimized for security cameras:\n\n| Class | Description |\n|-------|-------------|\n| Person | Human detection |\n| Vehicle | Cars, trucks |\n| Cat | Feline pets |\n| Dog | Canine pets |\n\n**Model specs:**\n- Input: 320×192 RGB (NHWC)\n- Parameters: ~202K\n- Architecture: Anchor-free, single-stage\n- Training: COCO + Oxford Pets datasets\n\n## Hardware Details\n\n### Ingenic T41 SoC\n- **CPU**: Dual XBurst2 @ 1.5GHz (MIPS)\n- **MXUv3**: 512-bit SIMD, 32 VPR registers\n- **ORAM**: 640KB @ 0x12640000 (on-chip SRAM)\n- **NNA**: Neural Network Accelerator with NNDMA\n\n### Memory Performance\n\n| Region | Bandwidth | Latency |\n|--------|-----------|---------|\n| DDR | 41 MB/s read | High |\n| ORAM | 314 MB/s read | Low |\n\nWeights are staged to ORAM before convolution for maximum throughput.\n\n## Documentation\n\n- 📄 [Full Project Writeup](docs/MARS_PROJECT_WRITEUP.md) - Research paper covering reverse engineering, MXUv3 discovery, and model design\n- 📘 [Mars Runtime README](src/mars/README.md) - Runtime architecture and API\n- 🎓 [Training README](training/README.md) - Model training guide\n\n## Comparison with Venus SDK\n\n| Feature | Venus (OEM) | Mars |\n|---------|-------------|------|\n| License | Proprietary | GPLv3 |\n| C Library | glibc only | musl/glibc |\n| Model Format | `.mgk` (closed) | `.mars` (open) |\n| Source Code | No | Yes |\n| Compiler | Closed | Python + Rust |\n\n## Contributing\n\nContributions welcome! See the [project writeup](docs/MARS_PROJECT_WRITEUP.md) for technical background.\n\n## License\n\nGPLv3 - See [LICENSE](LICENSE) for details.\n\n## Acknowledgments\n\n- [Thingino](https://thingino.com) - Open-source IP camera firmware\n- [OpenSensor](https://github.com/opensensor) - Project home\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensensor%2Fthingino-accel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensensor%2Fthingino-accel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensensor%2Fthingino-accel/lists"}