A newer version of the Gradio SDK is available:
6.2.0
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:
- Check if the issue already exists
- Create a new issue with:
- Clear description
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- System information (OS, Python version, etc.)
Code Contributions
Fork the repository
Create a feature branch
git checkout -b feature/your-feature-nameMake your changes
- Follow the existing code style
- Add docstrings to new functions/classes
- Include type hints where appropriate
- Add error handling
Test your changes
- Ensure existing functionality still works
- Test edge cases
- Verify error handling
Commit your changes
git commit -m "Add: brief description of changes"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:
- Test with different video inputs
- Verify error handling works
- Check that configuration changes work
- 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.