The dataset used in this tutorial can be downloaded here
A Yolov8 pre-trained model (YOLOv8n) was used to detect vehicles.
The model was trained on Tesla T4 provided by Google Collab and the vehicle segmentation model can be found here
- Make an environment with python=3.8 using the following command
conda create --prefix ./env python==3.8 -y
- Install the project dependencies using the following command
pip install -r requirements.txt
- Run the following command to start training the pre-trained segmentation model.
yolo segment train data=data.yaml model='yolov8n-seg.pt' epochs=100 imgsz=640
- Finally run predict.py to get the segmentation masks.
python predict.py