{"id":50558500,"url":"https://github.com/marceloeatworld/yolo26-training","last_synced_at":"2026-06-04T09:30:51.575Z","repository":{"id":354171977,"uuid":"1200660995","full_name":"marceloeatworld/yolo26-training","owner":"marceloeatworld","description":"YOLO26 hand pose (21 keypoints) \u0026 face detection — trained   for touchless kiosk interaction","archived":false,"fork":false,"pushed_at":"2026-04-03T20:33:02.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T13:32:27.749Z","etag":null,"topics":["computer-vision","directml","face-detection","hand-pose","hand-tracking","keypoint-detection","onnx","photobooth","pose-estimation","ultralytics","yolo","yolo26"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marceloeatworld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-03T17:18:04.000Z","updated_at":"2026-04-13T09:15:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marceloeatworld/yolo26-training","commit_stats":null,"previous_names":["marceloeatworld/yolo26-training"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/marceloeatworld/yolo26-training","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloeatworld%2Fyolo26-training","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloeatworld%2Fyolo26-training/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloeatworld%2Fyolo26-training/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloeatworld%2Fyolo26-training/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marceloeatworld","download_url":"https://codeload.github.com/marceloeatworld/yolo26-training/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloeatworld%2Fyolo26-training/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33899697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","directml","face-detection","hand-pose","hand-tracking","keypoint-detection","onnx","photobooth","pose-estimation","ultralytics","yolo","yolo26"],"created_at":"2026-06-04T09:30:50.885Z","updated_at":"2026-06-04T09:30:51.569Z","avatar_url":"https://github.com/marceloeatworld.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YOLO26 Hand Pose \u0026 Face Detection Models\n\nCustom-trained [YOLO26](https://docs.ultralytics.com/models/yolo26/) models for real-time hand tracking and face detection. Built for touchless kiosk interaction via dwell-based cursor control.\n\n## Models\n\n| Model | Task | Keypoints | ONNX (FP16) | ONNX (FP32) | Output Shape |\n|---|---|---|---|---|---|\n| `yolo26_hand_pose` | Hand detection + pose | 21 | **20.5 MB** | 41.0 MB | `(1, 300, 69)` |\n| `yolo26_face` | Face detection | — | **18.3 MB** | 36.4 MB | `(1, 300, 6)` |\n\nBoth models use YOLO26's **end-to-end NMS-free** architecture. Output is in **xyxy** format — no post-processing needed.\n\n### Hand Pose Output Format\n\nEach of the 300 detections contains 69 values:\n\n```\n[x1, y1, x2, y2, confidence, class_id, kp1_x, kp1_y, kp1_vis, ..., kp21_x, kp21_y, kp21_vis]\n ├─ bbox (xyxy) ─┘    │          │       └──────── 21 keypoints × 3 ────────────────────────┘\n                       │          └─ always 0 (single class: hand)\n                       └─ detection confidence\n```\n\n### Face Detection Output Format\n\nEach of the 300 detections contains 6 values:\n\n```\n[x1, y1, x2, y2, confidence, class_id]\n ├─ bbox (xyxy) ─┘    │          └─ always 0 (single class: face)\n                       └─ detection confidence\n```\n\n### 21 Hand Keypoints\n\n```\n    8 (index tip) ← used for cursor\n    |\n    7\n    |      12    16    20\n    6      |     |     |\n    |      11    15    19\n    5      |     |     |\n    |  4   10    14    18\n    |  |   |     |     |\n    |  3   9     13    17\n    |  |   |     |     |\n    |  2   |     |     |\n    |  |   |     |     |\n    |  1   |     |     |\n    └──┴───┴─────┴─────┘\n              0 (wrist)\n```\n\n## Training Results\n\n### Hand Pose\n\n| | |\n|---|---|\n| **Base model** | [yolo26s-pose.pt](https://docs.ultralytics.com/models/yolo26/) (Ultralytics, pretrained on COCO-pose) |\n| **Architecture** | YOLO26s-pose — 10.6M params, 25.0 GFLOPs |\n| **Dataset** | [Ultralytics Hand Keypoints](https://docs.ultralytics.com/datasets/pose/hand-keypoints/) — 18,776 train / 7,847 val images |\n| **Keypoints** | 21 per hand (wrist + 4 per finger), generated with Google MediaPipe |\n| **GPU** | NVIDIA H200 NVL (143 GB VRAM) on [RunPod](https://runpod.io) |\n| **Batch size** | 512 |\n| **Epochs** | 100 |\n| **Optimizer** | AdamW (lr=0.002, momentum=0.9) |\n| **Training time** | **1h 45min** |\n| **Training cost** | **~$6** (H200 NVL @ $3.40/hr) |\n| **Framework** | Ultralytics 8.4.33, PyTorch 2.8.0, CUDA 12.8 |\n\n**Final metrics (epoch 100/100):**\n\n| Metric | Score |\n|---|---|\n| **Pose mAP50** | **0.942** |\n| **Pose mAP50-95** | **0.843** |\n| Box mAP50 | 0.993 |\n| Box mAP50-95 | 0.912 |\n\n### Face Detection\n\n| | |\n|---|---|\n| **Base model** | [yolo26s.pt](https://docs.ultralytics.com/models/yolo26/) (Ultralytics, pretrained on COCO) |\n| **Architecture** | YOLO26s — 9.6M params, 20.5 GFLOPs |\n| **Dataset** | [WiderFace](http://shuoyang1213.me/WIDERFACE/) — 12,876 train / 3,222 val images (downloaded via [HuggingFace CUHK-CSE mirror](https://huggingface.co/datasets/CUHK-CSE/wider_face)) |\n| **GPU** | NVIDIA H200 NVL (143 GB VRAM) on [RunPod](https://runpod.io) |\n| **Batch size** | 64 |\n| **Epochs** | 50 |\n| **Optimizer** | MuSGD (lr=0.01, momentum=0.9) |\n| **Training time** | **54min** |\n| **Training cost** | **~$3** (H200 NVL @ $3.40/hr) |\n| **Framework** | Ultralytics 8.4.33, PyTorch 2.8.0, CUDA 12.8 |\n\n**Final metrics (epoch 50/50):**\n\n| Metric | Score |\n|---|---|\n| **Box mAP50** | **0.744** |\n| **Box mAP50-95** | **0.413** |\n| Precision | 0.861 |\n| Recall | 0.656 |\n\n\u003e Note: WiderFace scores appear low because the dataset includes extremely small faces (crowds, distant people). For kiosk use (single person close to camera), detection is highly reliable.\n\n## Total Training Cost\n\n| Model | GPU | Time | Cost |\n|---|---|---|---|\n| Hand pose (100 epochs) | H200 NVL (143GB) | 1h 45min | ~$6 |\n| Face detection (50 epochs) | H200 NVL (143GB) | 54min | ~$3 |\n| **Total** | | **2h 39min** | **~$9** |\n\n## Quick Start\n\n### Download Pre-trained Models\n\n```bash\n# Clone with Git LFS\ngit clone https://github.com/YOUR_USERNAME/yolo26-training.git\ncd yolo26-training\n\n# Models are in models/ (tracked with Git LFS)\nls -lh models/\n```\n\n### Export .pt to ONNX\n\n```bash\npip install ultralytics onnx onnxslim\n\n# Exports both FP32 and FP16 versions\nbash scripts/export_onnx.sh checkpoints/yolo26_hand_pose.pt\nbash scripts/export_onnx.sh checkpoints/yolo26_face.pt\n```\n\n### Inference (Python)\n\n```python\nfrom ultralytics import YOLO\n\n# Hand pose\nmodel = YOLO(\"checkpoints/yolo26_hand_pose.pt\")\nresults = model.predict(\"image.jpg\")\n\nfor r in results:\n    keypoints = r.keypoints.xy   # [N, 21, 2] — pixel coordinates\n    boxes = r.boxes.xyxy         # [N, 4] — bounding boxes\n    confs = r.boxes.conf         # [N] — confidence scores\n\n# Face detection\nmodel = YOLO(\"checkpoints/yolo26_face.pt\")\nresults = model.predict(\"photo.jpg\")\nhas_face = len(results[0].boxes) \u003e 0\n```\n\n### Inference (C# / ONNX Runtime + DirectML)\n\n```csharp\n// Load model\nvar session = new InferenceSession(\"yolo26_hand_pose.onnx\", options);\n\n// Run inference → output shape [1, 300, 69]\nusing var results = session.Run(inputs);\nvar tensor = results.First().AsTensor\u003cfloat\u003e();\n\n// Parse: [x1, y1, x2, y2, conf, class, kp1_x, kp1_y, kp1_vis, ...]\nvar conf = tensor[0, i, 4];        // confidence\nvar indexTipX = tensor[0, i, 30];   // keypoint 8 (index tip) x\nvar indexTipY = tensor[0, i, 31];   // keypoint 8 (index tip) y\n```\n\n## Train from Scratch\n\n### On RunPod (or any cloud GPU)\n\n```bash\npip install ultralytics onnxruntime-gpu onnx onnxslim\n\n# Hand pose (~1h45 on H200, ~3h on A40)\nbash scripts/train_hand_pose.sh\n\n# Face detection (~54min on H200, ~2h on A40)\nbash scripts/train_face_detect.sh\n```\n\n### With Docker\n\n```bash\ndocker build -t yolo26-training -f docker/Dockerfile .\ndocker run --gpus all -v $(pwd)/models:/workspace/output yolo26-training\n```\n\n### Recommended GPUs\n\n| GPU | VRAM | Hand Pose | Face Detect | Total Cost |\n|---|---|---|---|---|\n| **H200 NVL** | 143 GB | 1h 45min | 54min | **~$9** |\n| H100 SXM | 80 GB | ~2h 30min | ~1h 15min | ~$10 |\n| A100 | 80 GB | ~3h | ~1h 30min | ~$6 |\n| A40 | 48 GB | ~4h | ~2h | ~$3 |\n\n### Training Tips\n\n- **Hand pose**: batch=512 works on 48GB+ VRAM. Lower to 128 on 24GB GPUs.\n- **Face detect**: batch=64 recommended. WiderFace has 100+ faces/image — higher batch causes OOM.\n- **Early stopping**: Both scripts use `patience` to stop early if metrics plateau.\n- **WiderFace download**: Script auto-downloads from [HuggingFace CUHK-CSE mirror](https://huggingface.co/datasets/CUHK-CSE/wider_face) (Google Drive links are unreliable).\n\n## Project Structure\n\n```\nyolo26-training/\n├── README.md\n├── .gitignore\n├── .gitattributes             # Git LFS tracking for .onnx and .pt files\n├── models/                    # Exported ONNX models\n│   ├── yolo26_hand_pose_fp16.onnx   # FP16 (20.5 MB) — recommended\n│   ├── yolo26_hand_pose_fp32.onnx   # FP32 (41.0 MB)\n│   ├── yolo26_face_fp16.onnx        # FP16 (18.3 MB) — recommended\n│   └── yolo26_face_fp32.onnx        # FP32 (36.4 MB)\n├── checkpoints/               # PyTorch checkpoints\n│   ├── yolo26_hand_pose.pt          # Hand pose (19.3 MB stripped)\n│   └── yolo26_face.pt               # Face detect (19.3 MB stripped)\n├── scripts/\n│   ├── train_hand_pose.sh     # Hand pose training (auto-downloads dataset)\n│   ├── train_face_detect.sh   # Face detection training (auto-downloads WiderFace)\n│   └── export_onnx.sh         # PT → ONNX export (FP32 + FP16)\n└── docker/\n    └── Dockerfile             # GPU training container\n```\n\n## Technical Details\n\n### Why YOLO26?\n\n| Feature | Benefit |\n|---|---|\n| **NMS-free (end-to-end)** | No post-processing, consistent latency |\n| **RLE keypoints** | More accurate keypoint localization |\n| **DFL removal** | Cleaner ONNX, better DirectML/TensorRT compatibility |\n| **43% faster on CPU** | Better fallback on weak GPUs |\n| **Non-human keypoint support** | Better for hand keypoints (no human body bias) |\n\n### ONNX Compatibility\n\n| | |\n|---|---|\n| **Opset** | 17 |\n| **FP16** | Supported natively by DirectML, TensorRT, CoreML |\n| **Input** | `(1, 3, 640, 640)` NCHW, RGB, normalized [0, 1] |\n| **Tested on** | ONNX Runtime 1.24 + DirectML (Windows), CPU (Linux) |\n\n### FP16 vs FP32\n\n| | FP16 | FP32 |\n|---|---|---|\n| **Size** | ~50% smaller | Full size |\n| **Speed** | Faster on GPU (native FP16 compute) | Standard |\n| **Accuracy** | \u003c0.1% difference | Baseline |\n| **Recommended** | Deployment | Debugging / fine-tuning |\n\n## Datasets\n\n| Dataset | Images | Annotations | Source |\n|---|---|---|---|\n| **Hand Keypoints** | 26,768 | 21 keypoints/hand (MediaPipe) | [Ultralytics](https://docs.ultralytics.com/datasets/pose/hand-keypoints/) |\n| **WiderFace** | 32,203 | 393,703 face bboxes | [CUHK](http://shuoyang1213.me/WIDERFACE/) via [HuggingFace](https://huggingface.co/datasets/CUHK-CSE/wider_face) |\n\n## License\n\n- **Training code**: MIT\n- **Base models**: [Ultralytics YOLO26](https://docs.ultralytics.com/models/yolo26/) — AGPL-3.0 (or [Enterprise License](https://www.ultralytics.com/license))\n- **Hand Keypoints dataset**: See [Ultralytics docs](https://docs.ultralytics.com/datasets/pose/hand-keypoints/)\n- **WiderFace dataset**: See [WiderFace terms](http://shuoyang1213.me/WIDERFACE/)\n\n---\n\nTrained on April 3, 2026 using [Ultralytics](https://ultralytics.com) 8.4.33 + PyTorch 2.8.0 + CUDA 12.8 on [RunPod](https://runpod.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarceloeatworld%2Fyolo26-training","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarceloeatworld%2Fyolo26-training","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarceloeatworld%2Fyolo26-training/lists"}