Yolov8 segmentation dataset not formatted correctly?

I’ve been testing out a few different segmentation models and been constantly adding new labelled images, for some reason now my dataset seems to not be formatted correctly all of a sudden? It worked on every other version of my dataset, however now seems to no longer work after adding a few new labelled images and generating new dataset. I don’t get it.

I’m using this guys’ model weights to start: finloop/yolov8s-seg-solar-panels · Hugging Face, I don’t believe this causes the problem.

Did anyone ever run into this problem? How can I fix this? Is my dataset actually formatted incorrectly?

!yolo task=segment \
mode=train \
model=/content/yolov8s-seg-solar-panels/best.pt \
data={dataset.location}/data.yaml \
epochs= 50 \
imgsz=640 \

ERROR Message:

TypeError('ERROR ❌ segment dataset incorrectly formatted or not a segment dataset.\n'
TypeError: ERROR ❌ segment dataset incorrectly formatted or not a segment dataset.
This error can occur when incorrectly training a 'segment' model on a 'detect' dataset, i.e. 'yolo train model=yolov8n-seg.pt data=coco128.yaml'.
Verify your dataset is a correctly formatted 'segment' dataset using 'data=coco128-seg.yaml' as an example.

Hi @wodank

Sorry to hear you’re having issues. Are you using our notebook on this or following our YOLOv8 instance segmentation guide?

The error message suggests that you might be using a detection dataset on the segmentation training. Could you make sure you are using the correct dataset?