This project provides a web application for detecting lanes in videos using OpenCV and Streamlit. The application allows users to upload video files, processes the video to detect lanes, and then enables users to download the processed video.
- Detects lanes in video frames.
- Uses OpenCV for image processing and lane detection.
- Simple web interface built with Streamlit.
- Supports video file formats such as MP4.
- Clone the repository:
git clone https://github.com/gauravyadav016-png/Lane_Detection.git cd Lane_Detection
-
Run the Streamlit application:
streamlit run app.py
-
Open your web browser and navigate to
http://localhost:8501
. -
Upload your video file using the provided interface.
-
Click the "Process Video" button to detect lanes in the video and then download the processed video.
app.py
: The main application file that sets up the Streamlit interface and handles file uploads and video processing.LaneDetection
: A class that provides methods to process video frames and detect lanes.LaneLineHistory
: A class to keep track of lane lines history for more stable lane detection.
streamlit
: For building the web application interface.numpy
: For numerical operations.opencv-python
: For image processing and lane detection.moviepy
: For handling video file operations.tempfile
: For handling temporary file storage.
lane.mp4
output.mp4
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE
file for more details.