Commit Graph

457 Commits

Author SHA1 Message Date
Ibrahim Abdelkader
3770b314bc
Merge pull request #2906 from openmv/add_crc_test
scripts/unittests: Add crc test.
2025-11-01 11:02:59 +02:00
iabdalkader
627dc0b1f6 scripts/unittest: Add CRC module unit test.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-11-01 09:52:30 +01:00
iabdalkader
c3b0676470 scripts/unittest: Add total test execution time to summary.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
igned-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-11-01 09:52:27 +01:00
Ibrahim Abdelkader
3eaf280ee2
Merge pull request #2875 from kwagyeman/kwabena/add_yolo_v8_example
scripts/examples: Add YOLOV8 person detector script.
2025-10-29 21:50:37 +03:00
iabdalkader
6bf3063a71 scripts/unittest: Fix line_segments.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-10-27 23:15:00 +01:00
Kwabena W. Agyeman
9fa764035b scripts/libraries: Fix postprocess arg default. 2025-10-24 20:44:02 -07:00
Kwabena W. Agyeman
f6d183e5c0 scripts/examples: Add YOLOV8 person detector script. 2025-10-24 20:35:13 -07:00
Ibrahim Abdelkader
d038dc7ab8
Merge pull request #2874 from kwagyeman/kwabena/add_yolo_v2_v5_examples
Some checks failed
🔥 Firmware Build / build-firmware (false, 0, false, DOCKER) (push) Has been cancelled
🔥 Firmware Build / build-firmware (false, 0, true, MPS2_AN500) (push) Has been cancelled
🔥 Firmware Build / build-firmware (false, 0, true, MPS3_AN547) (push) Has been cancelled
🔥 Firmware Build / build-firmware (false, 1, false, OPENMV_N6) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_GIGA) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_NANO_33_BLE_SENSE) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_NANO_RP2040_CONNECT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_NICLA_VISION) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_PORTENTA_H7) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV2) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV4) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV4P) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMVPT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV_AE3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV_N6) (push) Has been cancelled
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV_RT1060) (push) Has been cancelled
🔥 Firmware Build / code-size-report (push) Has been cancelled
🔥 Firmware Build / stable-release (push) Has been cancelled
🔥 Firmware Build / development-release (push) Has been cancelled
scripts/examples: Add yolov2 and yolov5 template examples.
2025-10-22 19:36:55 +03:00
Kwabena W. Agyeman
b897ec4f16 scripts/examples: Switch palm examples to static tuples. 2025-10-21 21:53:41 -07:00
Kwabena W. Agyeman
ce18e680b2 scripts/examples: Fix fomo example. 2025-10-21 21:48:18 -07:00
Kwabena W. Agyeman
74faef3a8e scripts/examples: Fix blazeface detector. 2025-10-21 21:48:08 -07:00
Kwabena W. Agyeman
781a7bf86f scripts/examples: Add yolov2 and yolov5 template examples. 2025-10-19 15:58:23 +04:00
Kwabena W. Agyeman
c4b0b5a3dc scripts/libraries: Fix issue with using YOLOV2. 2025-10-19 15:58:23 +04:00
Kwabena W. Agyeman
3e22e0ea03 scripts/examples: Add YOLO LC person tracking example. 2025-10-18 21:29:43 -07:00
Ibrahim Abdelkader
15070dd722
Merge pull request #2871 from kwagyeman/kwabena/add_hand_detection
Some checks failed
🔥 Firmware Build / build-firmware (false, 0, false, DOCKER) (push) Waiting to run
🔥 Firmware Build / build-firmware (false, 0, true, MPS2_AN500) (push) Waiting to run
🔥 Firmware Build / build-firmware (false, 0, true, MPS3_AN547) (push) Waiting to run
🔥 Firmware Build / build-firmware (false, 1, false, OPENMV_N6) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_GIGA) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_NANO_33_BLE_SENSE) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_NANO_RP2040_CONNECT) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_NICLA_VISION) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, ARDUINO_PORTENTA_H7) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV2) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV3) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV4) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV4P) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMVPT) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV_AE3) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV_N6) (push) Waiting to run
🔥 Firmware Build / build-firmware (true, 0, false, OPENMV_RT1060) (push) Waiting to run
🔥 Firmware Build / code-size-report (push) Blocked by required conditions
🔥 Firmware Build / stable-release (push) Blocked by required conditions
🔥 Firmware Build / development-release (push) Blocked by required conditions
🔎 Check Code Formatting / formatting-check (push) Has been cancelled
scripts/libraries: Add palm detector post-processing support.
2025-10-18 20:40:54 +03:00
Kwabena W. Agyeman
77c8cc5fe0 \scripts/libraries: Add hand landmarks example. 2025-10-18 10:20:33 -07:00
Kwabena W. Agyeman
c8fc7903f4 scripts/libraries: Add hand landmark post-processing. 2025-10-18 10:17:56 -07:00
Kwabena W. Agyeman
8403340257 scripts/examples: Add palm detection example. 2025-10-18 10:17:55 -07:00
Kwabena W. Agyeman
55488e08a5 modules/py_ml: Add support for passing post-processor in Model(). 2025-10-18 10:11:42 -07:00
Kwabena W. Agyeman
8ece14c1a7 scripts/libraries: Add draw_keypoints() utils. 2025-10-18 10:11:41 -07:00
iabdalkader
4b1837f72e scripts: Update unit tests.
Co-authored-by: Kwabena W Agyeman <kwagyeman@users.noreply.github.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-10-18 17:14:36 +02:00
Kwabena W. Agyeman
bb8ed01a23 scripts/libraries: Add palm detector post-processing support. 2025-10-16 04:13:24 -07:00
iabdalkader
4944c157b0 scripts/libraries/ml: Split ml module into components.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-10-09 09:46:45 +02:00
Kwabena W. Agyeman
1e8eb2ec2f scripts/libraries: Move _NO_DETECTION into post-processors.
MicroPython doesn't import _NO_DETECTION from utils using the wildcard
operator. Importing it by name works, but, only after removing the
const() part in the call.
2025-10-08 08:36:24 +02:00
iabdalkader
a4ee9f0a3c lib/ml: Refactor postprocessing module into vendor-specific subpackages.
This commit restructures the ml.postprocessing module for better organization:

- Moved common utility functions (logit, sigmoid, threshold, quantize,
  dequantize, mod) from postprocessing.py to utils.py to avoid duplication
- Created vendor-specific subpackages:
  - ultralytics.py: YoloV2, YoloLC, YoloV5, YoloV8 classes
  - edgeimpulse.py: Fomo class
  - mediapipe.py: BlazeFace class
- Converted postprocessing.py file to postprocessing/ package directory
- Updated all class names to follow PascalCase convention
- Maintained full backwards compatibility via aliased imports in __init__.py

New usage:
  from ml.postprocessing import ultralytics
  ultralytics.YoloV2()

Backwards compatible:
  from ml.postprocessing import yolo_v2_postprocess

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-10-08 00:00:20 +02:00
Kwabena W. Agyeman
3667b54319 scripts/examples: Add BlazeFace detection example. 2025-09-18 13:41:57 -07:00
Kwabena W. Agyeman
f6f39f924b lib/models: Add blazeface model. 2025-09-18 13:41:56 -07:00
Kwabena W. Agyeman
65829023f0 scripts/libraries: Add face detection post-processing. 2025-09-18 13:30:14 -07:00
Kwabena W. Agyeman
7124b5134d scripts/libraries: Add keypoint support to NMS.
NMS will now pass-through keypoints along with scaling/offsetting
them to be drawn correctly on the image.
2025-09-18 13:30:14 -07:00
Kwabena W. Agyeman
eccb90699d scripts/libraries: Fix pre-processing float input array normalization.
ULAB only does simple assignment operator operations in-place.
2025-09-18 13:30:14 -07:00
Kwabena W. Agyeman
e64877bbea scripts/libraries: Quantize threshold instead of dequantizing scores.
Compare a quantized threshold against the scores to save having to
dequantized all the scores which takes a significant amount of time
the more classes there are in the score array output.
2025-08-24 15:22:52 -07:00
Kwabena W. Agyeman
8e72debf11 scripts/examples: Update fomo example to use the new post-processor. 2025-08-24 15:22:52 -07:00
Kwabena W. Agyeman
de7a761d3b scipts/libraries: Update fomo post-processor to use numpy vectors. 2025-08-24 15:22:51 -07:00
Kwabena W. Agyeman
84e6ee6507 modules/py_ml: Return tensor references for post-processors.
Converting the output tensors into floats for the prost-processors
causes memory exhaustion when models become very large. Additionally,
it wastes processing time converting values which may not be used. By
moving the conversion step into the post-processors we avoid this issue.

If no callback is passed for post-processing the converted output to
a floating point ndarray is returned still.
2025-08-24 14:43:24 -07:00
iabdalkader
b435a2d0eb scripts/libraries: Update Alif HP boot script.
Create readme.txt, main.py and openmv_disk.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
Kwabena W. Agyeman
061a0b2b6b scripts/examples: Rename and update histogram mode genx320 scripts. 2025-08-09 11:03:09 -07:00
Kwabena W. Agyeman
c231f66555 drivers/sensors: Add different event buffer sizes for genx320. 2025-08-09 11:03:07 -07:00
Kwabena W. Agyeman
3908807509 drivers/sensors: Add calibration ioctl for the genx320. 2025-08-09 10:51:08 -07:00
Kwabena W. Agyeman
b200ec4b1f scripts/examples: Add examples for RAW event camera output. 2025-08-09 10:51:08 -07:00
Kwabena W. Agyeman
1a614202ee scripts/examples: Update PureThermal example script to new API. 2025-07-21 23:10:51 -07:00
Kwabena W. Agyeman
444120f2d2 scripts/examples: Add simple buzzer example for Pure Thermal. 2025-07-20 22:33:09 -07:00
Kwabena W. Agyeman
7602c8638b scripts/examples: Add 320x240 basic touch LCD example. 2025-07-10 21:42:27 -07:00
Kwabena W. Agyeman
a5ac15a764 scripts/examples: Cleanup LCD shield example. 2025-07-10 21:41:49 -07:00
Kwabena W. Agyeman
6fe99051cb scripts/examples: Update rstp scripts to use the new CSI API.
Also delete the other scripts using disable_fb() as they were
meant for the RPC desktop library which has been deleted.
2025-07-07 20:39:29 -07:00
Kwabena W. Agyeman
84c3db58a4 modules/py_omv: Remove disable fb from omv module. 2025-07-07 20:39:29 -07:00
Kwabena W. Agyeman
7b5c32e57f scripts/examples: Merge genx320 light/dark examples. 2025-07-06 16:27:18 -07:00
Kwabena W. Agyeman
8c599b50e8 scripts/examples: Show contrast and brightness control by default. 2025-07-06 16:20:49 -07:00
Kwabena W. Agyeman
caf56ede8d scripts/examples: Add framerate control to genx320 examples. 2025-07-06 16:20:49 -07:00
Kwabena W. Agyeman
ea255e81ce scripts/examples: Add Joystick example for OLED shield. 2025-06-18 12:41:36 -07:00
Kwabena W. Agyeman
73a73a0806 scripts/libraries: Add support for the SSD1351 OLED display. 2025-06-18 12:37:53 -07:00