🏊 Lifeguard Drone: swimmer pose checkpoints
The pose model used by the Lifeguard Drone runtime, together with the project's four pose-training experiments.
Operator dashboard with the ADOPTED checkpoint, clip demo_06 frame 66: detector boxes with risk labels (from the detector and risk engine) and the pose skeleton on the tracked swimmer.
⚠️ Research component, not a safety device. Pose estimation alone cannot determine drowning. In the Lifeguard system pose is display and recording only: the risk engine never reads keypoints, and pose cannot raise an alert. It does not replace human lifeguards.
Checkpoints at a glance
| Status | Checkpoint | File | Trained by |
|---|---|---|---|
| ✅ ADOPTED (runtime) | Official Ultralytics YOLO11s-pose, COCO-Pose | weights/runtime/yolo11s-pose.pt | Ultralytics, not this project |
| ⛔ EXPERIMENTAL, NOT ADOPTED | Distillation | weights/experiments/distilled/best.pt | This project |
| ⛔ EXPERIMENTAL, NOT ADOPTED | E1: ignore-aware loss | weights/experiments/e1_ignore/best.pt | This project |
| ⛔ EXPERIMENTAL, NOT ADOPTED | E1b: unknown points at box centre | weights/experiments/e1b_centre/best.pt | This project |
| ⛔ EXPERIMENTAL, NOT ADOPTED | E2: soft confidence targets | weights/experiments/e2_softconf/best.pt | This project |
Only the ADOPTED checkpoint is used by the Lifeguard runtime. The four experimental checkpoints are published for research transparency and reproducibility. None of them passed its acceptance criteria, none is production-ready, and none is recommended as a replacement for the runtime model.
How the decision was made. The quantitative keypoint comparisons used AI-generated reference keypoints, from a ViTPose teacher model and from AI-assisted visual keypoint placement. No human-annotated ground truth was used. The experiments were reviewed by the project owner (tarekmhmd): the training runs, overlays and comparison tables were inspected, the checkpoints compared, and the final model-selection decision made. The agreement numbers below are therefore not human-verified or real-world accuracy.
Project overview
The Lifeguard Drone project is a swimming-pool lifeguard assistant: video → swimmer detection and tracking → temporal risk assessment → alerts for a human lifeguard → optional, simulation-only drone response. It raises suspected incidents for people to check and never declares a drowning on its own. The project targets pool surveillance cameras, primarily overhead views. Underwater pose integration is a possible future extension.
The pose component runs YOLO11s-pose on a crop of each swimmer ByteTrack is tracking. It returns 17 body keypoints, which the dashboard draws as a skeleton and records with the track.
frame ─► pool detector ─► ByteTrack ─► crops of tracked swimmers ─► YOLO11s-pose (ADOPTED) ─► keypoints on the track
│ │
└──► risk engine (ignores keypoints) ─► alerts dashboard skeleton + recording
Current integration: pose is enabled only in configs/ai_z5cc_pose.yaml, which pairs it with the side-view Z5CC
detector. No overhead (DDT) configuration enables pose.
Adopted runtime checkpoint
| Item | Value |
|---|---|
| Status | ✅ ADOPTED: the only pose checkpoint the Lifeguard runtime loads |
| File | weights/runtime/yolo11s-pose.pt |
| Source in the project | models/yolo11s-pose.pt, registry entry pose_yolo11s_coco_v1; byte-identical copy |
| SHA-256 / size | 1060bda4a27012060eca246f9b2adeea22eabb045a1e58f8d229be29b7ebc2ba / 20,373,161 bytes |
| Trained by | Ultralytics, on COCO-Pose. Official yolo11s-pose.pt, unmodified: not trained or fine-tuned by this project |
| Upstream | https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt |
| Checkpoint metadata | Ultralytics 8.2.100, 2024-09-25; data: coco-pose.yaml, imgsz: 640; licence field "AGPL-3.0 License" |
| Role | Swimmer skeleton display and keypoint recording. Risk weight 0 |
| Runtime settings | Crops of tracked boxes + 15 % margin, 320 px, person conf 0.25, ≤ 8 tracks per frame, FP32 |
Why it was adopted. No experimental checkpoint showed a clear, robust improvement against a reference independent
of the teacher model. The pretrained model's keypoint confidence was the most informative (highest AUROC). It is an
official, checksum-verifiable file. And the project's own rule was "fine-tune only if pretrained keypoints fail", which
was not demonstrated. Source: docs/POSE_ESTIMATION_BLUEPRINT.md §13 and docs/POSE_SELF_SUPERVISED_RESEARCH.md
"Engineering decision (2026-11-27)" in the GitHub repo.
Architecture (all five checkpoints)
Ultralytics YOLO11s-pose: a single-stage detector with a keypoint head, one class (person), 17 COCO keypoints.
It has 9,918,238 parameters (9,902,940 after layer fusion), and needs 5.8 GFLOPs at 320 px and 23.1 GFLOPs at 640 px.
These values were read from the checkpoint files with Ultralytics 8.3.40. The four experimental checkpoints were
fine-tuned from the official COCO weights and keep the same architecture and parameter count.
Keypoint schema
| # | Keypoint | # | Keypoint | # | Keypoint |
|---|---|---|---|---|---|
| 0 | nose | 6 | right_shoulder | 12 | right_hip |
| 1 | left_eye | 7 | left_elbow | 13 | left_knee |
| 2 | right_eye | 8 | right_elbow | 14 | right_knee |
| 3 | left_ear | 9 | left_wrist | 15 | left_ankle |
| 4 | right_ear | 10 | right_wrist | 16 | right_ankle |
| 5 | left_shoulder | 11 | left_hip |
Skeleton (16 edges; dashboard colours): head 0–1, 0–2, 1–3, 2–4 (white). Torso 5–6, 5–11, 6–12, 11–12 (teal).
Swimmer's left arm and leg 5–7, 7–9, 11–13, 13–15 (blue). Swimmer's right arm and leg 6–8, 8–10, 12–14, 14–16 (amber).
A joint is drawn only at confidence ≥ 0.5, and a limb only when both of its joints pass. An undetected joint is
reported as (0, 0, 0).
Experimental checkpoints (not adopted)
Shared setup
- Footage: one underwater pool camera. The source dataset has 5,613 frames at 1920×1080, one or two swimmers, a few clips, and one person box per frame. It has no keypoint labels; its swimming / struggling / drowning class labels are not pose labels, and their provenance is unknown.
- Annotation strategy: no human keypoint labels. Training targets are pseudo-labels: predictions of a ViTPose-L model trained on the synthetic SwimXYZ dataset (the "teacher").
- Base model: every run fine-tuned the official COCO YOLO11s-pose (a copy stored on the project's Google Drive),
imgsz 960, batch 16, seed 42,
optimizer: auto, lr0 0.01, mosaic 1.0, fliplr 0.5, close_mosaic 10. Ultralytics 8.4.220. Exact settings:experiments/<run>/args.yaml. - Training-log metrics (
experiments/<run>/results.csv) measure agreement with each run's own teacher-derived validation labels. Those validation sets differ, so these metrics cannot be compared across runs.
Evaluation sets (none is human ground truth)
| Set | Frames | Reference keypoints | Notes |
|---|---|---|---|
| Test-27 (teacher) | 27 held-out test frames | ViTPose teacher predictions (AI model) | Partly measures how well a student copies the teacher |
| E3-14 | 14 most-disputed held-out frames (head-down descent, heavy splash) | Placed by an AI assistant through visual review (ai_visual_review_unverified), 130 points | Chosen because the models disagreed strongly, so gaps are not representative. The AI had seen overlays of two models on 12 of the frames |
| Ind-20 | 20 of the 27 test frames (7 too blurred) | Placed by an AI assistant from zoomed, gridded crops, independently of every model (ai_visual_review_unverified), 201 points | The most independent reference available. Small: differences under about 0.1 are noise |
PCK@t is the fraction of reference keypoints within t × the person-box size. Swap-tolerant PCK makes one left/right decision per frame. Confidence AUROC measures whether confidence separates hits from misses (0.5 = no information). Every number below is copied from the project's recorded CSVs. Numbers are compared only within the same set.
Distillation: weights/experiments/distilled/best.pt
| Item | Value |
|---|---|
| Run / source | runs_pose/yolo11s_pose_distill_960 / artifacts/pose/weights/experimental/yolo11s_pose_distill_960/best.pt |
| SHA-256 / size | 0cc0896e8145d421d91a09fdef2e3291ed2f78a76ca59e28651f2e819c707a92 / 20,198,472 bytes |
| Method | Knowledge distillation: fine-tune YOLO11s-pose on ViTPose teacher predictions |
| Data | 362-frame subset: 300 train, 35 validation, 27 test held out |
| Training | 100 epochs planned, stopped early at 67 (patience 30). Checkpoint saved 2026-11-27 |
| Recorded results | Test-27 (teacher): PCK@0.2 all 0.519 (pretrained 0.376); PCK@0.2 upper 0.617 (pretrained 0.400). E3-14: PCK@0.1 all 0.354, PCK@0.2 all swap-tolerant 0.785, confidence AUROC 0.686. Ind-20: PCK@0.1 all 0.328, PCK@0.2 all 0.632, PCK@0.2 all swap-tolerant 0.771, confidence AUROC 0.670 |
| Known issues | Overfitting: validation pose loss went 9.3 → 8.3 while training loss went 5.9 → 2.8. Lower-body confidence fell from about 0.75 to 0.45 (0.51 on the 76-frame check), because uncertain teacher points written as v=0 taught "this joint is absent" |
| Acceptance | No formal pass/fail rule was set for this run. Its lead on the teacher-based sets largely disappeared on Ind-20, where its PCK@0.1 and confidence AUROC were the lowest of the models evaluated. It served as the benchmark the later runs had to beat |
| Decision | ⛔ Experimental, not adopted |
E1: ignore-aware loss: weights/experiments/e1_ignore/best.pt
| Item | Value |
|---|---|
| Run / source | runs_pose/yolo11s_pose_e1_ignore_960 / artifacts/pose/weights/experimental/yolo11s_pose_e1_ignore_960/best.pt |
| SHA-256 / size | 23230614358e4e893ed54eafb21ac40ab63cf89399696e711cf9f28ae65efaa6 / 20,193,032 bytes |
| Method | Filtered pseudo-labels (teacher conf ≥ 0.7, flip error ≤ 0.05, jump ≤ 0.25, ≥ 3 points per frame). A loss that ignores unknown points |
| Data | 2,861 train / 762 validation frames (validation blocks 0, 1, 12, 14, 17; held-out blocks excluded) |
| Training | 40 epochs, about 1.0 h on a T4 |
| Recorded results | E3-14: PCK@0.1 all 0.269; PCK@0.2 all 0.454; swap-tolerant 0.562; frames with ≥ 3 confident upper-body joints 0.286. Test-27 (teacher): PCK@0.2 all 0.451. Lower-body mean confidence (76 held-out frames): 0.24. Not evaluated on Ind-20 |
| Known issues | Confidence collapse. Unknown points were stored at (0, 0), and mosaic/affine augmentation pushed them outside the image, where Ultralytics marks them "absent" again |
| Acceptance (set before the run) | Success only if it beat the distilled model on E3 (especially PCK@0.1 and swap-tolerant) and showed no lower-body confidence collapse. Failed both |
| Decision | ⛔ Experimental, rejected, not adopted |
E1b: unknown points at box centre: weights/experiments/e1b_centre/best.pt
| Item | Value |
|---|---|
| Run / source | runs_pose/yolo11s_pose_e1b_centre_960 / artifacts/pose/weights/experimental/yolo11s_pose_e1b_centre_960/best.pt |
| SHA-256 / size | 67c68e0b0e4d12e2ae6c77772dcbeeae6a1f1da92eacf0fa30b49d54eb99dddf / 20,193,032 bytes |
| Method | E1 with the fix: unknown points written at the box centre. An augmentation check (PASS) and a loss self-test (PASS) ran before training |
| Data | Same as E1 |
| Training | 40 epochs, about 1.0 h on a T4 |
| Recorded results | E3-14: PCK@0.1 all 0.292 / swap-tolerant 0.346; PCK@0.2 all 0.623 / swap-tolerant 0.669; frames better with left/right swapped 1 of 14; confidence AUROC 0.677. Test-27 (teacher): PCK@0.2 all 0.473; AUROC 0.758. Ind-20: PCK@0.1 all 0.443; PCK@0.2 all 0.701 / swap-tolerant 0.751; AUROC 0.694. Lower-body mean confidence: 0.87 |
| Known issues | The collapse was fixed but overshot: confidence became always high (nose 0.79 although faces are rarely visible), so it carries little information. Fewest left/right swaps |
| Acceptance (set before the run) | Same rule as E1. Failed. Only PCK@0.2 all was slightly higher on E3 (+0.03 on 14 frames, within noise); PCK@0.1, swap-tolerant and Test-27 were lower than the distilled model |
| Decision | ⛔ Experimental, rejected, not adopted. Training was to stop after this run |
E2: soft confidence targets: weights/experiments/e2_softconf/best.pt
| Item | Value |
|---|---|
| Run / source | runs_pose/yolo11s_pose_e2_softconf_960 / artifacts/pose/weights/experimental/yolo11s_pose_e2_softconf_960/best.pt |
| SHA-256 / size | 6fdd3a3eaa623550910eab7d96cd6913fef097ef7b69f9316c39edbdceb6a7d2 / 20,193,032 bytes |
| Method | Each point's confidence trained toward the teacher's own confidence (unknown points carry v = 1 + c). Positions still come only from filtered confident points |
| Data | Same frames as E1 |
| Training | 40 epochs, about 0.29 h on an A100 |
| Recorded results | E3-14: PCK@0.1 all 0.269; PCK@0.2 all 0.515 / swap-tolerant 0.615; confidence AUROC 0.637. Test-27 (teacher): PCK@0.2 all 0.447; AUROC 0.795. Ind-20: PCK@0.1 all 0.428; PCK@0.2 all 0.662 / swap-tolerant 0.711; AUROC 0.677. Lower-body mean confidence: 0.47 |
| Known issues | Confidence level sane (faces low), but positions worse than the distilled model and confidence not more informative. Duplicate person boxes visible in val_batch*_pred.jpg of the run |
| Acceptance (set before the run) | All must hold: (1) E3 PCK@0.1 all ≥ 0.354 and PCK@0.2 swap-tolerant ≥ 0.785; (2) Test-27 PCK@0.2 all ≥ 0.519; (3) AUROC above the distilled model on both sets and lower-body confidence ≥ 0.5. Failed 1, 2 and the lower-body and E3-AUROC parts of 3. Only the Test-27 AUROC beat the distilled model |
| Decision | ⛔ Experimental, rejected, not adopted. Pose training stopped |
Side-by-side, within each evaluation set
Ind-20 (AI-assisted visual reference, 20 frames, 201 points). E1 was not evaluated on this set.
| Metric | ✅ Pretrained (ADOPTED) | Distilled | E1b | E2 |
|---|---|---|---|---|
PCK@0.1 all / swap-tolerant | 0.423 / 0.522 | 0.328 / 0.453 | 0.443 / 0.498 | 0.428 / 0.483 |
PCK@0.2 all / swap-tolerant | 0.632 / 0.726 | 0.632 / 0.771 | 0.701 / 0.751 | 0.662 / 0.711 |
PCK@0.2 upper body, swap-tolerant | 0.700 | 0.820 | 0.740 | 0.720 |
| Frames with no detection | 2 | 0 | 0 | 0 |
| Confidence AUROC | 0.770 | 0.670 | 0.694 | 0.677 |
E3-14 (AI visual reference, 14 hardest frames, 130 points)
| Metric | ✅ Pretrained | Distilled | E1 | E1b | E2 |
|---|---|---|---|---|---|
PCK@0.1 all | 0.146 | 0.354 | 0.269 | 0.292 | 0.269 |
PCK@0.2 all / swap-tolerant | 0.315 / 0.608 | 0.592 / 0.785 | 0.454 / 0.562 | 0.623 / 0.669 | 0.515 / 0.615 |
| Frames better with left/right swapped | 10 | 4 | 3 | 1 | 2 |
| Confidence AUROC | 0.750 | 0.686 | — | 0.677 | 0.637 |
Test-27 (ViTPose teacher reference, 27 frames)
| Metric | ✅ Pretrained | Distilled | E1 | E1b | E2 |
|---|---|---|---|---|---|
PCK@0.2 all | 0.376 | 0.519 | 0.451 | 0.473 | 0.447 |
| Frames with no prediction | 5 | 0 | 2 | 1 | 1 |
| Confidence AUROC | 0.811 | 0.774 | — | 0.758 | 0.795 |
Lower-body mean confidence on 76 held-out frames: pretrained 0.72, distilled 0.51, E1 0.24, E1b 0.87, E2 0.47.
Evaluation of the adopted model in the Lifeguard pipeline
Human-verified accuracy has not been measured. Keypoint mAP, OKS AP and PCK against human-annotated pool frames do not exist. A CVAT labelling workflow and an evaluation notebook are prepared but have produced no results.
Per-joint coverage on clip demo_06 (574 frames): the share of pose observations in which each joint reaches the
0.5 drawing threshold is 0.13–0.29 (shoulders 0.29, ankles 0.15–0.16, ears 0.13–0.18).
Runtime, measured on a GTX 1650 4 GB laptop with Ultralytics 8.3.40, FP32 and 320 px crops:
| Clip | Max swimmers | Pose cost per frame | Pipeline FPS without → with pose | Tracked observations with a pose |
|---|---|---|---|---|
| demo_06 (near-drowning) | 3 | 20.9 ms | 56.5 → 24.8 | 70 % |
| demo_05 (swimming) | 3 | 21.6 ms | 55.5 → 24.1 | 65 % |
| demo_11 (near-drowning) | 2 | 19.7 ms | 55.3 → 25.5 | 46 % |
| demo_01 (swimming, first 600 frames) | 4 | 23.4 ms | 50.0 → 23.1 | 62 % |
In every run, tracks and risk events were identical with pose on and off, and there were no pose errors.
Limitations and safety
- Pose estimation alone cannot determine drowning. It is display and recording only (risk weight 0), and it is not a replacement for human lifeguards.
- No human ground truth. All quantitative comparisons use AI-generated references. They measure agreement, not human-verified or real-world accuracy.
- Underwater data, single camera. All pose training and evaluation footage came from one underwater pool camera, with low diversity (one or two swimmers, a few clips). Generalisation to other pools is unknown.
- No overhead or top-view evaluation was performed for any checkpoint. Overhead compatibility is not shown.
- Not validated as underwater pose support either. The experimental checkpoints were trained on underwater frames, but none passed its criteria and none is integrated. The adopted model is COCO-trained on everyday land images.
- Domain shift for the experimental checkpoints: they were trained at 960 px on underwater frames. Their behaviour at the runtime crop size (320 px) and on above-water footage was not evaluated.
- Known failure modes: occluded and submerged body parts, splash, refraction and glare, head-down or inverted bodies, and left/right swaps (the adopted model on 10 of the 14 hardest frames).
- Speed: on a GTX 1650 pose roughly halves processing FPS (about 23–25 FPS with pose on 30 fps clips).
- Using pose in risk decisions would need human-labelled data, a shadow-mode evaluation and an explicit configuration change. None of these exists.
Usage
pip install -r requirements.txt # ultralytics==8.3.40, huggingface_hub, opencv-python, pyyaml, numpy
python inference.py swimmer.jpg # ADOPTED runtime checkpoint (default)
python inference.py pool_clip.mp4 --frame 66 --box 349 215 551 459 # like the dashboard: one swimmer's crop
inference.py always uses the ADOPTED checkpoint unless another one is named. Each file is checked against its
SHA-256 in config.yaml before loading. The script writes <source>_pose.jpg and prints JSON with the checkpoint
name, its status, and per person box_xyxy, score and 17 keypoints as [x, y, confidence] in image pixels.
Experimental checkpoints, for research only. Name one explicitly; the script prints a warning:
python inference.py swimmer.jpg --checkpoint distilled # or e1_ignore, e1b_centre, e2_softconf
Download a single checkpoint without the rest of the repository:
hf download triq0/lifeguard-drone-pose weights/runtime/yolo11s-pose.pt --local-dir . # ADOPTED
hf download triq0/lifeguard-drone-pose weights/experiments/distilled/best.pt --local-dir . # experimental
hf download triq0/lifeguard-drone-pose weights/experiments/e1_ignore/best.pt --local-dir . # experimental
hf download triq0/lifeguard-drone-pose weights/experiments/e1b_centre/best.pt --local-dir . # experimental
hf download triq0/lifeguard-drone-pose weights/experiments/e2_softconf/best.pt --local-dir . # experimental
Each run's exact training configuration and logs are in experiments/<run>/ (args.yaml, results.csv,
results.png). The paths in args.yaml are the original Colab paths.
Example visualizations (ADOPTED checkpoint)
Frames rendered by the dashboard on the Z5CC detector's test clips (above-water side views of third-party footage).
For each clip, the recording script saved the frames with the most joints drawn (at least 30 frames apart), so they show
the model at its best on these clips, not typical output. Boxes and their LEVEL score labels come from the
detector and risk engine; the skeletons come from the pose model. "Swimming" and "near-drowning" are the categories of
the source clips.
Swimming, demo_01, frame 395 | Swimming, demo_01, frame 990 |
Swimming, demo_03, frame 228 | Near-drowning, demo_04, frame 53 |
Near-drowning, demo_04, frame 269 | Near-drowning, demo_06, frame 7 |
Near-drowning, demo_06, frame 105 |
Licensing and redistribution
| Artifact | Licence and conditions |
|---|---|
weights/runtime/yolo11s-pose.pt | AGPL-3.0 (Ultralytics). Redistributed unmodified with the full licence text in LICENSE. Commercial use outside AGPL-3.0 needs an Ultralytics Enterprise License |
weights/experiments/*/best.pt | Derivatives of the AGPL-3.0 Ultralytics weights, trained with the AGPL-3.0 Ultralytics code; their metadata states AGPL-3.0, so they are distributed under AGPL-3.0. Additional, unresolved data conditions: they were trained on frames of the project's underwater pool dataset, whose licence and provenance are not documented, using pseudo-labels from ViTPose-L SwimXYZ (model card: Apache-2.0; SwimXYZ data: CC BY 4.0). The training images are not redistributed. Use these checkpoints for non-commercial research only until the source dataset's terms are verified |
inference.py, config.yaml | AGPL-3.0 (they use Ultralytics) |
experiments/*/ logs | Training configuration and metrics produced by the project; same terms as the checkpoint they describe |
assets/examples/ | Frames of third-party YouTube pool videos (IDs in the file names) with project overlays. Not covered by AGPL-3.0; all rights to the footage stay with its owners |
Citation and acknowledgments
@misc{lifeguard_drone_pose,
title = {Lifeguard Drone: swimmer pose checkpoints},
author = {tarekmhmd},
year = {2026},
note = {Adopted model: unmodified Ultralytics YOLO11s-pose. Experimental checkpoints: project fine-tunes, not adopted},
url = {https://github.com/tarekmhmd/lifeguard-drone-dataset-analysis}
}
- Experiments, review and model selection: the project owner (tarekmhmd).
- Model and adopted weights: Ultralytics YOLO11, https://github.com/ultralytics/ultralytics (AGPL-3.0). Please cite Ultralytics as its repository describes.
- Keypoint format and pretraining data: COCO, Lin et al., Microsoft COCO: Common Objects in Context, ECCV 2014.
- Teacher for pseudo-labels: ViTPose (Xu et al., NeurIPS 2022), the ViTPose-L SwimXYZ model trained on SwimXYZ, a synthetic swimming dataset (CC BY 4.0).
- Reference keypoints for evaluation: AI-generated (teacher predictions and AI-assisted visual placement), not human annotation.
- Example footage: third-party YouTube pool videos. All rights stay with their owners.