A python implementation for Advanced Driving Assistant. (Now with GPU Support)
This model can:
- Detect lane lines and fit a curve on them with a polynomial mask.
- Detect objects like: cars, buses, persons, traffic lights, etc
- Firstly, clone the repository and change the directory to it.
- Run the following command inside
autodrive
directory in the terminal/command prompt.
python main.py
NOTE: This is a default run type for this model which uses the input video stored in test_videos
folder.
python main.py --input {path to the video}
python main.py --output {a file name.mkv}
NOTE: The output video file's extension must be .mkv
.
- Added GPU support to run object detection using cuda support for getting higher FPS ###Usage:
python main.py -g # -g for GPU
NOTE: The -g inclusion while running the model will allow the model to use GPU for faster inference and higher FPS
- Added support for using TINY YOLO Model to perform even more faster detection with smaller model. ###Usage:
python main.py -t # -t for TINY
NOTE: The -t inclusion while running the model will tell the model to use TINY Yolo model for running object detection.
You can also make changes inside the code to add more features in the models' output.Like:
-
To add labels in the top of every bounding box, pass a argument named
labels=True
inpipeline
function of main.pyif not lane_only: self.lane_mask_final = self.object_detector.draw_boxes(self.frame, self.lane_mask_final, labels=True)
-
If you only want to mask and detect the lanes and dont want to detect objects, you can make
lane_only`` argument in [main.py](https://github.com/ajeetkharel/autodrive/blob/master/main.py) to
True```
if __name__=='__main__':
...
#run the pipeline on specified video
pipeline.run_video(input_video, output_video, lane_only=True)
...
- Amit Kharel - Overall works - ajeetkharel
This project is licensed under the MIT License - see the LICENSE.md file for details