🛠 Inférence de réseau de neurones sur le C7x+MMA avec edgeai-tidl-tools
Objectives
Move beyond CPU emulation: install the TI edgeai-tidl-tools stack (the J721E/TDA4VM is an officially supported device), retrieve pre-quantized models from the Edge AI Model Zoo, and run classification/detection on the C7x+MMA accelerator (~8 TOPS INT8) using the TIDL runtime. This tutorial justifies the purchase of this board.
Hardware
- 1 BeagleBone AI-64 with a recent BeagleBoard Debian image or TI Edge AI image
- Generous storage: 64 GB+ microSD or NVMe via M.2 — the stack and models weigh several GB; the 16 GB eMMC is not enough
- Network access to download models and dependencies
Complete Code
sudo apt update && sudo apt install -y python3-pip git python3-venv
git clone --depth 1 https://github.com/TexasInstruments/edgeai-tidl-tools
cd edgeai-tidl-tools
# Suivre le README pour le setup aarch64 ON-DEVICE (script osd/setup.sh) ;
# les versions exactes d'API bougent, rester sur un tag stable (ex. 10_01_00_02).
export OS_ARCH=aarch64
cd examples/osd && sudo ./setup.sh && cd ../..
sudo ./get_models.sh # modèles pré-quantisés du Model Zoo
# Exemple de classification sur le C7x-MMA (cible SoC, pas CPU)
sudo ./tidl_classification \
-t 1 -m mobilenet-v2-12 \
-l ../../dl_test_lists/labels.txt \
-i ../../test_images/ -b ../../model_zoo/
# Vérifier que l'accélérateur travaille (pas les A72)
htop # les 2 Cortex-A72 doivent rester majoritairement inactifs
Expected Verification
The benchmark displays a throughput (FPS or inferences/s) significantly higher than what the CPU would achieve, and the runtime log indicates execution on the target SoC with C7x/MMA offload. The classes and scores for the test image are output correctly.
Common Errors
- Believing you are accelerating when everything is running on the A72s: check the execution mode in the log and CPU usage (htop) — an unsupported model silently falls back to the CPU.
- Running out of space on the eMMC: installation fails at 99% without a clear message; migrate the root filesystem or work from microSD (see the storage tutorial).
- Mixing versions: the TIDL API changes between tags; pin a specific tag (e.g., 10_01_00_02) and its associated Model Zoo.
- Pure mainline image: the C7x-MMA libraries come from the TI downstream stack; without it, nothing is accelerated.
- git.beagleboard.org repository behind Anubis anti-bot: some Yocto fetch scripts fail (issue #45) — use GitHub mirrors.
Other tutorials for this board
- Flasher l'image officielle et démarrer la BeagleBone AI-64
- Faire clignoter une LED sur la broche P8_03 avec libgpiod
- Surveiller la température et l'alimentation du TDA4VM
- Réseau : Ethernet Gigabit unique et module Wi-Fi en M.2 E-key
- Caméra MIPI CSI et encodage H.264 matériel via GStreamer
- Remoteproc : inventorier et démarrer les co-processeurs R5F et C66x
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash