Commit Graph

446 Commits

Author SHA1 Message Date
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
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
iabdalkader
333eea86da modules/py_display: Pass DT to display controller initializer.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-02 16:11:59 +02:00
Kwabena W. Agyeman
de2bea26e9 scripts/examples: Fix Haar Cascade Paths. 2025-05-30 11:05:14 -07:00
Kwabena W. Agyeman
5e72cdbde9 scripts/libraries: Add support for yolo_lc post-processing. 2025-05-15 20:58:23 -07:00
Kwabena W. Agyeman
5ec0bcfdfa scripts/libraries: Fix axis used for gathering bounding box results.
len(bb) returns the row count but bb.shape[0] is better to use.
2025-05-15 20:58:23 -07:00
Kwabena W. Agyeman
3d6ea57ad4 scripts/libraries: Remove tuple detection for np.nonzero.
np.nonzero always outputs a tuple.
2025-05-15 20:58:23 -07:00
Kwabena W. Agyeman
727d3200a2 scripts/libraries: Fix yolov2 and yolov5 variable naming. 2025-05-15 20:58:23 -07:00
Kwabena W. Agyeman
3e46eee35a scripts/libraries: Add support for yolov8 post-processing. 2025-05-15 20:58:22 -07:00
kaizhi-singtown
5ccf1f019d example: Fix set_auto_gain param. 2025-05-07 19:12:01 +08:00
kaizhi-singtown
2a61482797 example: Change lepton max_temp. 2025-04-24 18:11:48 +08:00
kaizhi-singtown
c42bace0a5 example: Fix examples. 2025-04-22 09:59:06 +08:00
iabdalkader
c27e850b30 scripts/libraries: Clean remote core output.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-03-30 16:24:33 +02:00