Abs6187's picture
Upload 11 files
84c318c verified

A newer version of the Gradio SDK is available: 6.2.0

Upgrade

Contributing to Vehicle Speed Estimation System

Thank you for your interest in contributing to this project!

Development Team

This project was developed by:

  • Abhay Gupta (0205CC221005)
  • Aditi Lakhera (0205CC221011)
  • Balraj Patel (0205CC221049)
  • Bhumika Patel (0205CC221050)

How to Contribute

Reporting Issues

If you find a bug or have a suggestion:

  1. Check if the issue already exists
  2. Create a new issue with:
    • Clear description
    • Steps to reproduce (for bugs)
    • Expected vs actual behavior
    • System information (OS, Python version, etc.)

Code Contributions

  1. Fork the repository

  2. Create a feature branch

    git checkout -b feature/your-feature-name
    
  3. Make your changes

    • Follow the existing code style
    • Add docstrings to new functions/classes
    • Include type hints where appropriate
    • Add error handling
  4. Test your changes

    • Ensure existing functionality still works
    • Test edge cases
    • Verify error handling
  5. Commit your changes

    git commit -m "Add: brief description of changes"
    
  6. Push and create a Pull Request

    git push origin feature/your-feature-name
    

Code Style Guidelines

Python Style

  • Follow PEP 8 guidelines
  • Use meaningful variable names
  • Maximum line length: 100 characters
  • Use type hints for function parameters and returns

Documentation

  • Add docstrings to all functions and classes
  • Use Google-style docstrings
  • Include examples where helpful
  • Update README.md for new features

Example Docstring

def calculate_speed(distance: float, time: float) -> float:
    """
    Calculate speed from distance and time.
    
    Args:
        distance: Distance traveled in meters
        time: Time elapsed in seconds
        
    Returns:
        Speed in meters per second
        
    Raises:
        ValueError: If time is zero or negative
        
    Example:
        >>> calculate_speed(100, 10)
        10.0
    """
    if time <= 0:
        raise ValueError("Time must be positive")
    return distance / time

Project Structure

src/
β”œβ”€β”€ __init__.py          # Package initialization
β”œβ”€β”€ annotator.py         # Frame annotation
β”œβ”€β”€ speed_estimator.py   # Speed calculation
β”œβ”€β”€ view_transformer.py  # Perspective transformation
└── exceptions.py        # Custom exceptions

Testing

Before submitting:

  1. Test with different video inputs
  2. Verify error handling works
  3. Check that configuration changes work
  4. Ensure Gradio interface functions properly

Questions?

Feel free to open an issue for any questions or clarifications.

License

By contributing, you agree that your contributions will be licensed under the MIT License.