RUHMI Model zoo is a collection of models, notebooks, and model artifacts curated for Renesas Embedded platforms. It demonstrates how to evaluate, quantize, compile and run neural network models for on-device inference using the RUHMI Framework stack.
The repo is organized to separate compilation helpers and compiler-specific environment, and model-specific inference code and notebooks. It is intended as a benchmark showcase of models and workflows for embedded/edge deployment of these models on the RA8P1.
- Target board: Renesas RA8P1 (Cortex-M85 + Ethos-U55 NPU)
- Compilation/quantization workflow uses RUHMI Framework (Renesas BYOM framework), which includes AI MCU Compiler with the MERA 2.0 backend (EdgeCortix integration)
- Python 3.10 is the preferred runtime for all venvs (Windows and Ubuntu)
- Per-model
requirements.txtfiles are provided for inference dependencies (so you can create a model-specific venv)
Top-level structure (important folders):
ruhmi_tools/— Generic compilation and RUHMI integration code. It contains compilation flows and shared code.tutorials/— Notebooks that show end-to-end examples per task. E.g.Image Classification, Object Detection etcvision/— Vision model collections organized by task (image classification, object detection, face detection).audio/— Audio model collections organized by task (audio classification / keyword spotting).real_time_analytics/— Real-time analytic model collections organized by task (e.g. anomaly detection).
| Task | Models | README |
|---|---|---|
| Image Classification | 7 | View models |
| Object Detection | 2 | View models |
| Face Detection | 1 | View models |
| Audio Classification | 1 | View models |
| Anomaly Detection | 1 | View models |
Each task README contains a detailed table of all models with dataset, input shape, accuracy, and per-model links.
- Notebooks: The notebooks in
tutorials/are runnable examples. They contain guidance for preprocessing and inference. If you'd like to run a different model in a notebook, copy the preprocess/postprocess code from that model'sinference.pyinto the notebook. - Per-model venvs: Since different inference examples may require different Python packages (and because RUHMI/MERA compiler dependencies can conflict with inference packages), we recommend creating a separate venv for:
- Compilation (RUHMI / MERA) — a single shared compiler venv that you use to compile/quantize models for RA8P1.
- Inference per model — create a venv per model or per notebook using the model's
requirements.txt.
-
Install prerequisites & clone repo
- Python 3.10 — required for all virtual environments.
- Git LFS — required to download model files (
.tflite) and pre-built
If you clone without Git LFS installed, model files and embedded C artifacts will be small pointer files instead of real content. Run
git lfs pullafter installing Git LFS to fetch them.sudo apt-get install git-lfs git lfs install git clone https://github.com/renesas/ruhmi-model-zoo.git cd ruhmi-model-zoo git lfs pull -
Compiler installation (one-time) — create and configure the compiler venv
The RUHMI/MERA compilation toolchain requires a contained environment that includes low-level or platform-specific wheel files. Create a dedicated compiler venv (eg:
.mera_venv) and use it only when compiling or quantizing models.Download RUHMI AI MCU compiler from its respective GitHub and follow the installation instructions here.
-
Inference venv setup (per model)
Each model includes a
requirements.txtin itspython/directory. Create a dedicated venv for the model you want to run:In most cases inference dependencies are similar across models (TensorFlow, NumPy, Pillow). You can reuse the same venv across models in the same task category, but a per-model venv is the safest approach to avoid version conflicts.
-
Benchmark model on platform (per model)
Each model includes the compiled models in
.c\.hformat for both CPU and CPU+NPU compilation. The models can be ported into the inference benchmarking project to quickly measure the inference cycles.
-
Keep
.mera_venvdedicated to compilation tasks. Avoid installing model runtime packages here. -
Inference venv (per model) — runtime and notebook environments
Create a small, model-specific venv for running inference, notebooks, and examples. This keeps runtime dependencies (numpy, pillow, torch, etc.) isolated and easy to reproduce.
Why this split is helpful
- Compiler venv (
.mera_venv) isolates heavy, possibly native or low-level dependencies required for conversion. - Inference venvs are lightweight and per-model, so running experiments and notebooks is safer and faster.
- Compiler venv (
-
Run a tutorial notebook
Activate a model venv, install
notebookorjupyterlabif needed, then open the notebook intutorials/and follow the instructions.pip install notebook pip install jupyter ipykernel pip install --user --upgrade ipywidgets jupyter notebook tutorials/image_classification.ipynb
