File size: 2,927 Bytes
84c318c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# 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**
   ```bash

   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**
   ```bash

   git commit -m "Add: brief description of changes"

   ```

6. **Push and create a Pull Request**
   ```bash

   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

```python

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.