|
| 1 | +# 477_PGC |
| 2 | + |
| 3 | +[](https://doi.org/10.5281/zenodo.17564899)  [](https://deepwiki.com/PINTO0309/pgc) |
| 4 | + |
| 5 | +Ultrafast pointing gesture classification. Classify whether the finger is pointing near the center of the camera lens. |
| 6 | + |
| 7 | +A model that can only detect slow human gestures is completely worthless. A resolution of 32x32 is sufficient for human hand gesture classification. LSTM and 3DCNN are useless because they are not robust to environmental noise. |
| 8 | + |
| 9 | +https://github.com/user-attachments/assets/19268cf9-767c-441e-abc0-c3abd8dba57a |
| 10 | + |
| 11 | +|Variant|Size|F1|CPU<br>inference<br>latency|ONNX| |
| 12 | +|:-:|:-:|:-:|:-:|:-:| |
| 13 | +|S|494 KB|0.9524|0.43 ms|[Download](https://github.com/PINTO0309/PGC/releases/download/onnx/pgc_s_32x32.onnx)| |
| 14 | +|C|875 KB|0.9626|0.50 ms|[Download](https://github.com/PINTO0309/PGC/releases/download/onnx/pgc_c_32x32.onnx)| |
| 15 | +|M|1.7 MB|0.9714|0.59 ms|[Download](https://github.com/PINTO0309/PGC/releases/download/onnx/pgc_m_32x32.onnx)| |
| 16 | +|L|6.4 MB|0.9782|0.78 ms|[Download](https://github.com/PINTO0309/PGC/releases/download/onnx/pgc_l_32x32.onnx)| |
| 17 | + |
| 18 | +## Setup |
| 19 | + |
| 20 | +```bash |
| 21 | +git clone https://github.com/PINTO0309/PGC.git && cd PGC |
| 22 | +curl -LsSf https://astral.sh/uv/install.sh | sh |
| 23 | +uv sync |
| 24 | +source .venv/bin/activate |
| 25 | +``` |
| 26 | + |
| 27 | +## Inference |
| 28 | + |
| 29 | +```bash |
| 30 | +uv run python demo_pgc.py \ |
| 31 | +-pm pgc_l_32x32.onnx \ |
| 32 | +-v 0 \ |
| 33 | +-ep cuda \ |
| 34 | +-dlr |
| 35 | + |
| 36 | +uv run python demo_pgc.py \ |
| 37 | +-pm pgc_l_32x32.onnx \ |
| 38 | +-v 0 \ |
| 39 | +-ep tensorrt \ |
| 40 | +-dlr |
| 41 | +``` |
| 42 | + |
| 43 | +## Arch |
| 44 | + |
| 45 | +<img width="300" alt="pgc_s_32x32" src="https://github.com/user-attachments/assets/f6a6efcc-0b05-4cbe-b578-1c72312c1b61" /> |
| 46 | + |
| 47 | +## Citation |
| 48 | + |
| 49 | +If you find this project useful, please consider citing: |
| 50 | + |
| 51 | +```bibtex |
| 52 | +@software{hyodo2025pgc, |
| 53 | + author = {Katsuya Hyodo}, |
| 54 | + title = {PINTO0309/PGC}, |
| 55 | + month = {11}, |
| 56 | + year = {2025}, |
| 57 | + publisher = {Zenodo}, |
| 58 | + doi = {10.5281/zenodo.17564899}, |
| 59 | + url = {https://github.com/PINTO0309/pgc}, |
| 60 | + abstract = {Ultrafast pointing gesture classification.}, |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +## Acknowledgements |
| 65 | +- https://gibranbenitez.github.io/IPN_Hand/: CC BY 4.0 License |
| 66 | + ```bibtex |
| 67 | + @inproceedings{bega2020IPNhand, |
| 68 | + title={IPN Hand: A Video Dataset and Benchmark for Real-Time Continuous Hand Gesture Recognition}, |
| 69 | + author={Benitez-Garcia, Gibran and Olivares-Mercado, Jesus and Sanchez-Perez, Gabriel and Yanai, Keiji}, |
| 70 | + booktitle={25th International Conference on Pattern Recognition, {ICPR 2020}, Milan, Italy, Jan 10--15, 2021}, |
| 71 | + pages={4340--4347}, |
| 72 | + year={2021}, |
| 73 | + organization={IEEE} |
| 74 | + } |
| 75 | + ``` |
| 76 | +- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/472_DEIMv2-Wholebody34: Apache 2.0 License |
| 77 | + ```bibtex |
| 78 | + @software{DEIMv2-Wholebody34, |
| 79 | + author={Katsuya Hyodo}, |
| 80 | + title={Lightweight human detection models generated on high-quality human data sets. It can detect objects with high accuracy and speed in a total of 28 classes: body, adult, child, male, female, body_with_wheelchair, body_with_crutches, head, front, right-front, right-side, right-back, back, left-back, left-side, left-front, face, eye, nose, mouth, ear, collarbone, shoulder, solar_plexus, elbow, wrist, hand, hand_left, hand_right, abdomen, hip_joint, knee, ankle, foot.}, |
| 81 | + url={https://github.com/PINTO0309/PINTO_model_zoo/tree/main/472_DEIMv2-Wholebody34}, |
| 82 | + year={2025}, |
| 83 | + month={10}, |
| 84 | + doi={10.5281/zenodo.10229410} |
| 85 | + } |
| 86 | + ``` |
| 87 | +- https://github.com/PINTO0309/bbalg: MIT License |
| 88 | +- https://github.com/PINTO0309/PGC: MIT License |
0 commit comments