Before training we need to convert annoation data from standard coco format of yolo format.
This was done by JSON2YOLO with bit of modification. (Dataset in yolo format are provided in google drive (see email)).
Training process was done in Jupyter Notebook seg_groceries_yolov8.ipynb
- Download pre-trained YOLOv8 model (google drive)
yolov8x-seg.pt
. Download it to the root directory of this project (same level as this README.me). - Download groceries dataset in yolo format (google drive) and place them in root directory of this project.
- In
./ultralytic/datasets/groceries.yaml
groceries.yaml adjust paths training and validation dataset. - In file seg_groceries_yolov8.ipynb adjust path for pre trained model.
- In same file seg_groceries_yolov8.ipynb one more adjusment need to be made and it is setting path to the groceries.yaml file.
Evaluation of trained model is done in eval_yolov8_seg_groceries.ipynb
- Download trained and exported YOLOv8 segment model (google drive).
- In second cell of notebook adjust path of download model.
- In third cell adjust paths to dataset (yolo formated dataset).
- Run it.
Intresting pictures of training process can be found here.
Package requirements are in requirements folder. Same requirements are for Mask RCNN seg groceries