How hukenovs/hagrid works
Project type and purpose
• This is a Python-based machine-learning pipeline for hand-gesture recognition. It bundles:
• A massive image dataset (HaGRIDv2) with downloader and converter scripts
• Model definitions for classification and object detection (PyTorch)
• Training, testing and inference/demo entrypoints
• Configuration-driven experiments with multi-GPU support
File structure
• Top-level scripts:
• download.py – fetches and unpacks the raw dataset
• run.py – unified CLI for train/test based on YAML configs
• demo.py / demo_ff.py – real-time inference demos (detector vs full-frame classifier)
• ddp_run.sh – wrapper for PyTorch DDP multi-GPU runs
• configs/ – YAML config files per backbone (ResNet, ViT, MobileNet, SSD-Lite, etc.)
• dataset/ – Dataset class (dataset.py) exposing PyTorch DataLoader API
• models/
• classifiers/ – full-frame classification architectures
• detectors/ – SSD-based gesture detectors
• model.py – unifying interface
• converters/ – scripts to transform COCO→YOLO formats and back
• custom_utils/ – reusable utilities: distributed training (ddp_utils.py), common training loops (train_utils.py), generic helpers (utils.py)
• constants.py – global constants (e.g., class lists)
• requirements.txt / pyproject.toml – dependency declarations
README highlights
• Dataset hosting (1.5 TB HaGRIDv2), JSON annotations (COCO), metadata
• Pretrained model zoo for detectors (YOLOv10x/n, SSDLiteMobileNetV3) and classifiers (ResNet, ViT, ConvNeXt)
• Training/testing commands (single vs multi-GPU) with TensorBoard logging
• Conversion tools to export annotations to YOLO or COCO formats