Clone github repo and install the necessary requirements
git clone https://github.com/trainyolo/segment
cd segment
pip install -r requirements.txt
python train.py --dataset_path /path/to/dataset
python predict.py --source input.jpg --weights /path/to/best_miou_model.pt
path/
path/*.jpg