Skip to content

Latest commit

 

History

History
253 lines (178 loc) · 5.3 KB

File metadata and controls

253 lines (178 loc) · 5.3 KB

🤝 Contributing to Watch Classifier

Thank you for your interest in contributing to the Watch Classifier project! Contributions are welcome and appreciated.

🎯 How to Contribute

🐛 Reporting Bugs

If you find a bug, please:

  1. Check if the bug has already been reported in Issues
  2. Create a new issue with:
    • Descriptive title
    • Steps to reproduce the bug
    • Expected vs actual behavior
    • Screenshots (if applicable)
    • System information (OS, Python version, etc.)

💡 Proposing New Features

To propose new features:

  1. Open an issue with "enhancement" label
  2. Describe the feature in detail
  3. Explain why it would be useful
  4. Consider performance impact

🔧 Contributing Code

Prerequisites

  • Python 3.8+
  • Git
  • GitHub account

Local Setup

# 1. Fork the repository on GitHub

# 2. Clone your fork
git clone https://github.com/yourusername/watch-classifier.git
cd watch-classifier

# 3. Add the original repository as upstream
git remote add upstream https://github.com/toucdi/watch-classifier.git

# 4. Create a virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate     # Windows

# 5. Install dependencies
pip install -r requirements.txt

# 6. Test that everything works
python demo.py quick

Contribution Workflow

  1. Create a branch for your feature:

    git checkout -b feature/feature-name
  2. Develop the functionality:

    • Write clean and well-documented code
    • Add tests if necessary
    • Follow naming conventions
  3. Test your changes:

    # Basic test
    python demo.py
    
    # Classification test
    python classify_image.py sample_images/test_watch.jpg
    
    # If you modified training
    python train_watch_classifier.py
  4. Commit your changes:

    git add .
    git commit -m "feat: description of the feature"
  5. Push the branch:

    git push origin feature/feature-name
  6. Create a Pull Request on GitHub

📝 Code Conventions

🐍 Python Style

  • PEP 8 for code style
  • Docstrings for all public functions
  • Type hints where possible
  • Descriptive names for variables and functions
def preprocess_image(image_path: str) -> tuple[np.ndarray, bool]:
    """
    Preprocess an image for classification.
    
    Args:
        image_path: Path to the image to preprocess
        
    Returns:
        tuple: (processed_image, success_flag)
    """
    # Implementation...

💾 Commit Messages

Use Conventional Commits format:

  • feat: new feature
  • fix: bug fix
  • docs: documentation updates
  • style: style changes (non-functional)
  • refactor: code refactoring
  • test: add or modify tests
  • chore: maintenance tasks

Examples:

feat: add TensorFlow Lite conversion script
fix: resolve memory leak in image preprocessing
docs: update README with new installation steps

🎯 Contribution Areas

🚀 Performance

  • Model optimizations
  • Faster preprocessing algorithms
  • Memory usage reduction
  • Parallelization

📊 Features

  • New model architectures
  • Support for new image formats
  • Batch processing
  • Web interface
  • API REST

📱 Mobile/Edge

  • Mobile device optimizations
  • Support for other frameworks (CoreML, ONNX)
  • Advanced quantization
  • Edge computing

🔧 Developer Experience

  • Better setup scripts
  • Docker containers
  • CI/CD pipeline
  • Automated testing

📚 Documentation

  • Additional tutorials
  • Usage examples
  • Video guides
  • Translations

🧪 Testing

Manual Testing

Before submitting a PR, test:

# Complete demo
python demo.py

# Benchmark
python demo.py benchmark

# Single classification
python classify_image.py sample_images/test_watch.jpg

# Training (if you modified training)
python train_watch_classifier.py

📋 Pull Request Checklist

Before submitting a PR, ensure:

  • Code follows style conventions
  • All functions have docstrings
  • Existing tests pass
  • You have manually tested changes
  • Documentation is updated
  • Commit message follows conventions
  • PR has a clear description

🎉 Recognition

Contributors will be recognized in:

  • README.md in the Contributors section
  • Release notes for significant contributions
  • Issue/PR mentions for acknowledgments

📞 Questions?

📄 Code of Conduct

Our Values

  • Respect: Treat everyone with courtesy and respect
  • Inclusivity: Welcome contributors from all backgrounds
  • Collaboration: Work together toward common goals
  • Learning: Share knowledge and learn together

Unacceptable Behavior

  • Offensive or discriminatory language
  • Personal attacks or trolling
  • Spam or inappropriate content
  • Privacy violations

Enforcement

Unacceptable behavior may result in:

  1. Formal warning
  2. Temporary ban
  3. Permanent ban

For reports: open an issue or discussion.


Thank you for contributing to Watch Classifier! 🙏

Every contribution, big or small, is valuable for improving the project. ⭐