diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-10-21 17:47:57 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-10-21 17:47:57 +0200 |
| commit | 8b8acffcf5f1e9e9ddb552b8ac125e50f68987ac (patch) | |
| tree | 9b618133a468585087ff4b014b22029d40b24bc5 /README.md | |
| parent | 2ce585cc96a3fffba65f1bafbfbc796c6370308f (diff) | |
| download | facedet-master.tar.gz facedet-master.zip | |
Diffstat (limited to '')
| -rw-r--r-- | README.md | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -1,6 +1,6 @@ -# YuNet 2026may +# facedet -A CPU-only face detector for `face_detection_yunet_2026may`. +A CPU-only face detector using the YuNet `face_detection_yunet_2026may` model. ## Build and run @@ -11,11 +11,11 @@ embedded in the binary. ```sh make -./build/yunet photo.jpg -./build/yunet photo.png 0.6 0.3 -./build/yunet image.ppm -./build/yunet photo.jpg -o overlay.ppm > faces.json -./build/yunet --out overlay.ppm photo.png 0.6 0.3 +./build/facedet photo.jpg +./build/facedet photo.png 0.6 0.3 +./build/facedet image.ppm +./build/facedet photo.jpg -o overlay.ppm > faces.json +./build/facedet --out overlay.ppm photo.png 0.6 0.3 ``` @@ -26,7 +26,7 @@ Input is JPEG, PNG, or binary PPM (`P6`, RGB, maxval 255), with dimensions from 1 to 4096. ```sh -./build/yunet photo.jpg > faces.json +./build/facedet photo.jpg > faces.json ``` Standard output contains one JSON object: @@ -51,26 +51,26 @@ decoded image with green face boxes, confidence labels, and five landmark dots. ## C API -Include `yunet.h` and link `build/libyunet.a` with `-lm`. +Include `facedet.h` and link `build/libfacedet.a` with `-lm`. -1. Create a context with `yunet_create(padded_width, padded_height)`. Both dimensions +1. Create a context with `facedet_create(padded_width, padded_height)`. Both dimensions must be multiples of 32 in the range 32 through 4096. Check for `NULL`. -2. Fill it with `yunet_set_rgb`, or fill the buffer returned by `yunet_input` with +2. Fill it with `facedet_set_rgb`, or fill the buffer returned by `facedet_input` with float32 BGR CHW values in `[0, 255]`. -3. Call `yunet_run`, then `yunet_decode` with an output array and its capacity. +3. Call `facedet_run`, then `facedet_decode` with an output array and its capacity. Negative return values indicate errors. The output capacity limits returned detections, not the number of candidates considered. -4. Reuse the context for images with the same padded dimensions. Call `yunet_free` +4. Reuse the context for images with the same padded dimensions. Call `facedet_free` when finished. Use separate contexts for concurrent inference. The command-line implementation in `main.c` demonstrates the complete flow. -`yunet_map` exposes raw CHW head tensors for numerical checks; classification and +`facedet_map` exposes raw CHW head tensors for numerical checks; classification and objectness maps contain logits, so the decoder applies sigmoid before computing `sqrt(classification * objectness)`. `nn.c` contains the required convolution, pooling, addition, and resizing operations. `gemm.c` uses AArch64 NEON or runtime-selected x86-64 AVX2/FMA, -with a portable C fallback. Define `YUNET_SCALAR` to disable explicit SIMD kernels. +with a portable C fallback. Define `FACEDET_SCALAR` to disable explicit SIMD kernels. ## Model and regeneration |
