ChildPose / README.md
Resurgammm's picture
Update ChildPose project and code links
db24d20 verified
|
Raw History Blame Contribute Delete
5.98 kB
---
license: cc-by-nc-4.0
library_name: pytorch
pipeline_tag: keypoint-detection
tags:
- pose-estimation
- human-pose-estimation
- video
- children
---
# ChildPose
Model weights and inference code for **ChildPose: Foundation for Children Pose Modeling** (NeurIPS 2026).
<p align="center">
<a href="https://pediamed.ai/ChildPose/">🌐 Project Page</a> •
<a href="https://github.com/PediaMedAI/ChildPose">💻 Code Repository</a>
</p>
ChildPose estimates COCO-17 2D keypoints of a child in video. It is a top-down model: each frame is cropped
around the child's bounding box, encoded by an image backbone, conditioned on a memory of the child's
previous frames, and decoded into keypoint heatmaps. The memory only looks back a fixed number of frames,
so videos of any length are processed frame by frame.
## Files
| Variant | Backbone | Input (H x W) | Parameters | Checkpoint |
|---|---|---|---|---|
| `hrnet_w48` | HRNet-W48 | 288 x 384 | 102.5M | `checkpoints/childpose_hrnet_w48.safetensors` (0.41 GB) |
| `hrformer_base` | HRFormer-B | 288 x 384 | 82.1M | `checkpoints/childpose_hrformer_base.safetensors` (0.33 GB) |
| `vitpose_base` | ViTPose-B | 256 x 192 | 108.2M | `checkpoints/childpose_vitpose_base.safetensors` (0.43 GB) |
| `sapiens_0.3b` | Sapiens-0.3B | 1024 x 1024 | 346.1M | `checkpoints/childpose_sapiens_0.3b.safetensors` (1.38 GB) |
| `sapiens_0.6b` | Sapiens-0.6B | 1024 x 1024 | 696.3M | `checkpoints/childpose_sapiens_0.6b.safetensors` (2.79 GB) |
| `sapiens_1b` | Sapiens-1B | 1024 x 1024 | 1227.3M | `checkpoints/childpose_sapiens_1b.safetensors` (4.91 GB) |
Each checkpoint is a `safetensors` file with float32 weights; the model configuration is stored in its
metadata. The inference code (`childpose/`, `scripts/`) is included in this repository and is the same as
in the code repository.
## Usage
```bash
git clone https://huggingface.co/PediaMedAI/ChildPose # needs git-lfs; or download single files
pip install -r requirements.txt
```
```python
from childpose import ChildPosePredictor
predictor = ChildPosePredictor("checkpoints/childpose_vitpose_base.safetensors")
# or ChildPosePredictor("vitpose_base"): downloads only that checkpoint from this repository
# frames: any iterable of PIL images or RGB uint8 arrays (a generator is fine for long videos)
# boxes: per-frame child box [x1, y1, x2, y2] in pixels, as a list or {frame_index: box}; None = not visible
results = predictor.predict_video(frames, boxes, fps=30)
# results[i]: None, or {"keypoints": (17, 2) image pixels, "scores": (17,), "score": float, "crop_box": [...]}
```
Command line, for a video and a JSON file of per-frame boxes for each tracked child:
```bash
python scripts/run_video.py --checkpoint checkpoints/childpose_vitpose_base.safetensors \
--video clip.mp4 --boxes boxes.json --out poses.json --vis poses.mp4
```
```json
{"child_0": {"0": [100, 50, 300, 450], "1": [102, 51, 301, 452]},
"child_1": {"0": [500, 80, 640, 400]}}
```
### Input
- **Boxes**: tight `[x1, y1, x2, y2]` boxes around the child in each frame; the model enlarges them by 10%
before cropping. ChildPose does not detect or track children; use any person detector / tracker.
- **Frame rate**: the models were trained on frames sampled at about 5 fps; each frame attends to up to 6
earlier frames, about 0.2 s apart in training. The video is processed in one pass in frame order and the
memory runs over the whole video. For `fps=F`, `mode` sets how frames reach the memory, with
`step = round(F / 5)`: `"interleave"` (default) predicts every frame, frame `i` remembering frames
`i - step`, `i - 2*step`, ... (about 0.2 s, 0.4 s, ... earlier); `"downsample"` predicts only every
`step`-th frame (the video at about 5 fps); `"sequential"` predicts every frame with a memory of the
immediately preceding frames. Leave `fps=None` for input that is already at about 5 fps.
- `use_memory=False` predicts every frame on its own; `predict_images` handles single images.
### Output
COCO-17 keypoints in image pixels (order in `childpose.COCO_KEYPOINTS`), with a per-keypoint score (the
heatmap peak value).
## License
The weights and code are released under **CC BY-NC 4.0** (see `LICENSE`), the most restrictive license among
the components they build on (Meta's Sapiens is CC BY-NC 4.0). Third-party code and weight notices
(ViTPose, MMPretrain: Apache-2.0; HRNet, HRFormer, openseg.pytorch: MIT) are in `THIRD_PARTY_NOTICES.md`.
### Responsible use
Use of the code and weights is subject to the [ChildPose Responsible Use Policy](RESPONSIBLE_USE.md).
In short:
- **Intended use**: non-commercial research on children's pose and movement, on lawfully recorded video
with the consent of the children's parents or legal guardians, under human oversight.
- **Prohibited**: re-identification or identity linkage (including from body shape or gait); covert
surveillance or monitoring of children; use on its own for clinical diagnosis, screening, treatment
or any other high-stakes decision about a child; commercial use; any use that violates the law.
- **Not a medical device**: not clinically validated or approved by any regulatory authority.
Predictions can be wrong, and performance across skin tone, body habitus, clinical condition and
capture setting has not been validated. Deployment in medical, educational or monitoring settings
needs its own validation, fairness evaluation, privacy safeguards and human oversight.
- **No warranty, no liability**: the models are provided "as is"; the authors and their institutions
are not liable for any use of them or of their outputs (see `LICENSE` and the policy).
## Citation
```bibtex
@inproceedings{chen2026childpose,
title = {ChildPose: Foundation for Children Pose Modeling},
author = {Chen, Jiakai and Shen, Yifan and Li, Boyi and Dong, Chuanmiao and Cao, Xu},
booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
year = {2026}
}
```