First off - thanks for considering contributing! This repo went from 233 stars on TF 1.13 code to a modern PyTorch rewrite, and your contributions can keep it relevant.
Be cool. Don't be a jerk. That's it.
The repo currently has no pre-trained weights on Stanford 40. This is the #1 contribution opportunity:
# Train on Stanford 40
python -m hac.training.train \
--data_dir stanford40/ \
--model_name mobilenetv3_small_100 \
--epochs 50
# Upload to HuggingFace Hub
# Submit PR with download linkAdd loaders for other action recognition datasets:
- NTU RGB+D
- Kinetics-400/700
- UCF-101
- HMDB-51
- AVA (for AV applications)
Current implementation is single-frame. Add:
- SlowFast networks
- X3D models
- Video transformers (VideoMAE, TimeSformer)
- LSTM/GRU on pose sequences
- ONNX export scripts
- TensorRT optimization
- Quantization (INT8)
- Mobile deployment (CoreML, TFLite)
- Benchmark on Jetson/Pi
- More example notebooks
- Video tutorials
- API documentation (Sphinx)
- Performance benchmarks
We're at like 10% test coverage. Help us get to 80%:
- Unit tests
- Integration tests
- Benchmark tests
- Edge case handling
# Clone repo
git clone https://github.com/dronefreak/human-action-classification.git
cd human-action-classification
# Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install in dev mode
pip install -e ".[dev,demo,train]"
# Install pre-commit hooks (optional)
pip install pre-commit
pre-commit installsrc/hac/
├── models/ # Add new architectures here
├── inference/ # Inference pipeline
├── data/ # Dataset loaders
├── training/ # Training utilities
└── utils/ # Helper functions
tests/ # Add tests here
examples/ # Add notebooks here
scripts/ # Utility scripts
configs/ # Hydra configs (coming soon)
-
Fork the repo and create your branch from
maingit checkout -b feature/awesome-feature
-
Make your changes
- Write clean, readable code
- Add docstrings
- Update README if needed
-
Test your changes
# Run tests pytest tests/ -v # Check formatting black src/ isort src/ # Type checking mypy src/ --ignore-missing-imports
-
Commit with clear messages
git commit -m "Add SlowFast model for temporal action recognition" -
Push and create PR
git push origin feature/awesome-feature
-
Fill out PR template with:
- What you changed
- Why you changed it
- How to test it
- Screenshots/benchmarks if applicable
We mostly follow Black with:
- Line length: 100
- Type hints where appropriate
- Docstrings for public functions
def predict_action(
image: np.ndarray,
model: nn.Module,
device: str = "cuda"
) -> Dict[str, Any]:
"""
Predict action from image.
Args:
image: Input image in BGR format
model: PyTorch model
device: Device to run inference on
Returns:
Dictionary with predictions
"""
# Implementation
passFollow Conventional Commits:
feat: add SlowFast model support
fix: correct pose classification threshold
docs: update installation instructions
test: add unit tests for pose extractor
perf: optimize MediaPipe inference
refactor: simplify training loop- Docstrings: Google style
- README: Keep it concise, move details to docs/
- Comments: Explain WHY, not WHAT
- Pre-trained weights on Stanford 40
- Temporal models (SlowFast, X3D)
- ONNX/TensorRT export
- More comprehensive tests
- Additional dataset loaders
- Hydra config integration
- Training on more datasets
- Pedestrian prediction for AVs
- Web UI improvements
- More example notebooks
- Performance optimizations
- Edge deployment examples
- Breaking changes without discussion
- Dependencies on deprecated packages
- Code without tests
- PRs that don't follow style guide
- Questions: Open a Discussion
- Bugs: Open an Issue
- Features: Open an Issue to discuss first
Contributors get:
- Listed in README
- Shoutout in releases
- Good karma
- Street cred in the CV community
By contributing, you agree that your contributions will be licensed under the Apache License.
Thanks for making this repo better! 🚀