ai-camera-viewer
:::warning [UNTESTED] on hardware — v0.9 paper-correct
Builds clean on native_sim/native/64 against the full <alp/camera.h> / <alp/inference.h> surfaces (both ship today; Ethos-U dispatch runs through alp_inference_open(...) the same as any other backend). Still missing: a real Vela-compiled person_detect.tflite model and AEN HiL bench validation.
:::
Headline edge-AI demo: an E1M-AEN module captures camera frames, runs a person-detect model on the on-die Ethos-U NPU, and renders the preview + bounding boxes on a 240×240 LVGL display.
Source: examples/camera-vision/ai-camera-viewer/.
Pipeline
OV5640 → <alp/camera.h> → <alp/inference.h> → post-process → LVGL
(SCCB+MIPI) RGB565 frame person-detect bbox list +
(uint8 quantised) per-frame latency
What is still a placeholder
- No model is checked in — a Vela-compiled
person_detect.tfliteis still required. - The camera returns
ALP_ERR_NOSUPPORTonnative_sim; there is no emul controller for it. - The bounding-box decode post-process is still a TODO.
Display bring-up
The viewer opens its panel via alp_display_open() and binds LVGL with alp_gui_lvgl_attach() before starting the inference thread, with CONFIG_LV_Z_AUTO_INIT=n in prj.conf. See lvgl-widgets-demo for the reference sequence.
board.yaml
libraries:
- name: lvgl
cores: [m55_hp]
- name: tflite-micro
cores: [m55_hp]
som:
sku: E1M-AEN801
preset: e1m-evk
pins:
- { e1m: E1M_I2C0, macro: EVK_I2C_BUS_SENSORS, doc: "Shared sensor + IO-expander + INA236 bus" }
- { e1m: E1M_SPI1, macro: EVK_SPI_BUS_ARDUINO, doc: "Arduino UNO header SPI" }
cores:
a32_cluster:
os: "off"
m55_hp:
app: ./src
inference:
default_arena_kib: 256
peripherals:
- i2c # Camera SCCB.
- spi # Display.
- gpio # Camera ancillaries + display D/C#.
chips:
- ov5640 # 5 MP camera.
- st7789 # 240x320 TFT.
diagnostics:
log_level: info
The inference backend is driven by the SoM preset's capabilities: block, not by board.yaml — arena_kib is the only knob. Swapping som.sku compares E4 / E6 / E8 dispatch without touching the app source.
See also
<alp/camera.h>·<alp/inference.h>·<alp/display.h>·<alp/gui.h>ai-object-detection-realtime— DEEPX variant on V2N-M1- Examples overview