How stmicroelectronics/stm32ai-modelzoo works
Project type and purpose
• This is an open-source “Model Zoo” repository that hosts hundreds of pre-trained ML models (H5/TFLite/ONNX) and configuration files, organized by use case (Image Classification, Object Detection, Audio Event Detection, etc.).
• It has no application code here; instead, it’s a content/artifact repository consumed by external tooling (the “stm32ai-modelzoo-services” dashboard, Hugging Face, STM32 boards).
File structure
• Top-level folders = “use cases” (audio_event_detection, image_classification, object_detection, …).
• Under each use-case folder are subfolders per model architecture (e.g. “efficientnet”, “miniresnet”, “ssd_mobilenet_v2_fpnlite”), and then “ST_pretrainedmodel_…” directories containing model files and YAML configs.
• A manifest.json at root and docs/images for high-level README visuals.
• There are no build scripts here: this repo relies on Git LFS for large files and is purely a content store.
README for additional insights
• The README describes integration with a separate “stm32ai-modelzoo-services” repo (Dash Plotly + Flask in Docker).
• Mentions Hugging Face hosting for model cards, and ST Edge AI Developer Cloud for benchmarking.
• Users clone via Git LFS, then point the dashboard or scripts at this repo to retrain, quantize, evaluate, benchmark, and generate application code for STM32 targets.
a. Main components
1. Model Zoo Repository (GitHub + Git LFS) – static content store for model binaries and config files.
2. Dashboard Service (stm32ai-modelzoo-services) –
• Backend: Flask REST API that reads the Model Zoo, drives training/evaluation pipelines.
• Frontend: Dash Plotly UI for visualization, user configuration, triggering tasks.
• Packaged as Docker container.
3. External Services
• ST Edge AI Developer Cloud – for automated benchmarking jobs.
• Hugging Face – for hosting model cards and additional diffusion.
4. User Devices / Targets
• Local developer machines (clone repo, run Docker or scripts).
• STM32 boards (STM32H7, STM32MP, STM32N6, microcontrollers running generated application code).
b. Relationships and interactions
• Developer → (git clone + Git LFS) → Model Zoo Repo
• Dashboard Service (in Docker) → pulls/clones or mounts the Model Zoo Repo
• Dashboard Service → calls ST Edge AI Developer Cloud API for benchmarking
• Dashboard Service → reads/writes to Hugging Face via HF APIs for model cards
• Developer UI (browser) → interacts with Dash Plotly frontend → calls Flask backend → interacts with Model Zoo and external services
• Generated application code → deployed onto STM32 boards via user’s toolchain
c. Architectural patterns and design principles
• Separation of concerns: Content Repository vs. Service layer vs. Visualization layer
• Containerization: Docker for environment standardization
• RESTful API: Flask backend exposes endpoints for train/eval/benchmark
• Extensibility: New models can be added by dropping folders into the repo; dashboard auto-discovers them
• External integration: Uses cloud APIs (ST Edge AI), HF APIs
d. Key technologies & frameworks
• Git + Git LFS (model storage)
• Docker (containerization)
• Python Flask (backend)
• Dash Plotly (frontend)
• ST Edge AI Developer Cloud (benchmarking)
• Hugging Face (model hosting, model cards)
Final advice
• Every essential element but group similar model folders under “Model Zoo Content Store”