.. _changelog_v4_7_0: v4.7.0 ====== v4.7.0 is a major feature release. Headlining it: the new **OpenMV AE3** (Alif Ensemble, Cortex-M55 + Ethos-U55 NPU) board with a dual-core :mod:`openamp` programming model, a read-only **ROMFS** (``/rom``) filesystem with bundled models and cascades, VL53L8CX 8x8 time-of-flight support, new YOLOv8 / YOLO-LC post-processors, and MicroPython 1.25. It also changes how built-in models and Haar cascades are loaded, so read the breaking changes below. .. contents:: On this page :local: :depth: 1 Highlights ---------- - **OpenMV AE3 board** — the Alif Ensemble (Cortex-M55 + Ethos-U55 NPU) board, with a full port, bootloader, and ROMFS. - **Dual-core** :mod:`openamp` **module** — offload work to the second Alif core over RPMsg (the ``@async_remote`` decorator, ``Endpoint``/ ``EndpointIO``). - **ROMFS** — a read-only ``/rom`` filesystem with built-in TFLite models and Haar cascades, plus a new ``tools/mkromfs.py`` host builder. - **VL53L8CX** 8x8 multi-zone time-of-flight sensor support. - **New ML post-processors** — ``yolo_v8_postprocess`` and ``yolo_lc_postprocess``. - **MicroPython updated to 1.25.0.** - **Breaking:** built-in models and Haar cascades now load from ``/rom`` by path (see :ref:`the ml.Model change ` and :ref:`the Haar cascade change `). New features ------------ - **OpenMV AE3** — new Alif Ensemble board (Cortex-M55 application core + Ethos-U55 NPU), with port, bootloader, board configuration, RGB LED, and ROMFS support. - :mod:`openamp` — a new module for the Alif dual-core (Open-AMP / RPMsg) RPC model: ``Endpoint``, ``EndpointIO``, ``new_service_callback``, and the ``@async_remote`` decorator to offload marshalled functions to the second core. The HE/HP cores ship a default asyncio-based ``_boot.py`` task runner. - :mod:`audio` — the Alif port adds the audio module (PDM microphone) with a callback-based streaming API (``audio.init(channels=, frequency=, gain_db=, buffers=, samples=, overflow=, highpass=)``) on the AE3. - **ROMFS** — a read-only ``/rom`` filesystem with built-in assets (TFLite models, Haar cascades, ...) packaged per board, a new ``tools/mkromfs.py`` host tool (tflite, tflite+vela, Haar cascade, text, binary), and a ``scripts/libraries/romfs.py`` helper exposing ``ls_romfs()``. - **ML post-processing** — new ``yolo_v8_postprocess`` (YOLOv8) and ``yolo_lc_postprocess`` (lightweight tiny-YOLOv2 variant with embedded-optimized default anchors) classes, each taking ``threshold``, ``nms_threshold``, and ``nms_sigma``. - **GenX320 anti-flicker** — a new ``IOCTL_GENX320_SET_AFK`` ioctl to enable and configure the event sensor's anti-flicker filter (min/max flicker frequency in Hz), with a ``genx320_grayscale_set_afk.py`` example. - **VL53L8CX** — support for the 8x8 multi-zone time-of-flight sensor through the :mod:`tof` module (auto-detected, 8x8 at 15 Hz). Other changes and improvements ------------------------------ - **MicroPython updated to 1.25.0** (STM32 and i.MX RT ports), with the upstream Alif port added and legacy BT-HCI drivers dropped from the STM32 / i.MX RT ports. - **GenX320** — a new ISSD sequence doubles the internal pixel clock (24 → 48 MHz) for higher frame rates. - **STM32N6 / ST Edge AI** — groundwork for STM32N6 Neural-ART model deployment (ST Edge AI tooling and ROMFS support). - **PAG7936** — the CSI PHY bitrate is now set, improving operation of that sensor. Bug fixes --------- Camera and sensors: - Fixed the IMU over I2C — boards wiring the LSM6DSx IMU on I2C now initialize and read correctly (the I2C path previously used a broken read path and wrong constants). - FLIR Boson init now retries up to 10 times for older (< IDD 4.x) sensors that take ~10 s to boot, and factory-default settings are restored on reset so externally-loaded settings cannot break the video output. - Fixed the GenX320 ``psee_ehc_activate_override`` writing the wrong (zero) accumulation time. - On STM32 boards without FastMode+ hardware, requesting I2C fast mode is now properly guarded instead of silently misconfiguring the bus. Machine learning: - Fixed bounding-box gathering and ``np.nonzero`` handling in the YOLOv2 / YOLOv5 post-processors, improving detection reliability. Hardware and board support -------------------------- - **OpenMV AE3** — new Alif Ensemble (Cortex-M55 + Ethos-U55 NPU) board. - **VL53L8CX** — 8x8 multi-zone time-of-flight sensor; the AE3's ToF sensor was switched from the VL53L5CX to the VL53L8CX. - **STM32N6** — ST Edge AI (Neural-ART) model-deployment groundwork. Breaking API changes -------------------- User-visible API breaks between v4.6.20 and v4.7.0. Scope: Python C-modules in ``modules/`` and Python libraries in ``scripts/libraries/``. Each change is tagged with its impact: - *major* — most scripts that used it need edits. - *minor* — narrow API; only affects scripts that used it. - *behavior* — same API, different results; re-check tuned scripts. Changes are grouped by impact in that order. If you just want to port your code, jump to the :ref:`migration checklist ` at the end for a condensed to-do list. Each commit hash links to its diff on GitHub. .. _v4_7_0_mlmodel: Built-in models load by path, not name *(major)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :class:`ml.Model` no longer loads a built-in model from a bare name string. Models are now loaded from the filesystem / ROMFS by path: .. code-block:: python model = ml.Model("/rom/person_detect.tflite") # was: ml.Model("person_detect") The C-side ``model.labels`` attribute was removed; labels are now loaded by the Python :class:`ml.Model` wrapper from a sidecar ``.txt`` file (``None`` if absent). All bundled examples and ``ml/apps.py`` were updated to ``/rom/*.tflite`` paths. *Commits:* `978fa436c `__, `3f55d956c `__, `416bc4613 `__ .. _v4_7_0_haar: Haar cascades load from ROMFS *(minor)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :func:`image.HaarCascade` now loads built-in cascades through the VFS / ROMFS. The default frontal-face cascade file was renamed from ``haarcascade_frontalface_default.xml`` to ``haarcascade_frontalface.xml``, and a load failure now raises ``RuntimeError`` ("Failed to load Haar cascade") instead of ``OSError``. *Commit:* `9de1220d8 `__ .. _v4_7_0_tof: :func:`tof.reset` / :func:`tof.deinit` semantics *(behavior)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the :mod:`tof` module, ``reset()`` previously aliased ``init()`` and there was no real deinit. :func:`tof.reset` now performs an actual sensor reset and :func:`tof.deinit` properly shuts the sensor down (with VL53L5CX shutdown support). Code that relied on ``reset()`` re-initializing the sensor should be re-checked. *Commits:* `20d6b53f8 `__, `c743cab6a `__ .. _v4_7_0_genx: GenX320 timing and event-mode constraints *(behavior)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The new GenX320 ISSD sequence changes the sensor time base: frame-rate and exposure arguments are now expressed in 1 MHz units instead of being clock-scaled, and HSYNC blanking is adjusted dynamically to the requested frame rate. Scripts that hard-coded GenX320 timing values must re-tune them. Event-mode capture now raises an error when image transpose is enabled (it is unsupported in that configuration). *Commits:* `660a783d6 `__, `7a718c6af `__ .. _v4_7_0_migration: Migration checklist ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For a clean port to v4.7.0 the typical work is: #. Change built-in model loading from a name string to a ``/rom/.tflite`` path, and provide labels via a sidecar ``.txt`` file (:ref:`the ml.Model change `). #. Update ``haarcascade_frontalface_default.xml`` to ``haarcascade_frontalface.xml`` and catch ``RuntimeError`` (not ``OSError``) on cascade load failure (:ref:`the Haar cascade change `). #. Remove code that relied on :func:`tof.reset` re-initializing the sensor (:ref:`the tof change `). #. Re-tune any hard-coded GenX320 frame-rate / exposure values to 1 MHz units, and do not enable transpose in event mode (:ref:`the GenX320 change `).