Daphnia tracking system using YOLO

Hi there, I’m a highschool student trying to create a tracking software with YOLO AI for daphnia movement. Currently I’m testing my program with a datapool of 60 pictures from a 1 min video. (1 picture per 1 second) However, I can’t seem to get the YOLO program to recognize the labels. Can anyone suggest ideas on what to do? I’ve already tried to troubleshoot by checking the labels to see if they have the correct information, checking if the names of the images match the labels and checking if my YAML files are correct.

This is my files setup:

C:/Daphnia_Project/Dataset_Images/

├── daphnia.yaml

├── Images/

│ ├── train/

│ │ ├── xxx.jpg

│ └── val/

│ ├── xxx.jpg

├── Labels/

│ ├── train/

│ │ ├── xxx.txt

│ └── val/

│ ├── xxx.txt

“train” has 48 images and texts while “val” has 12.

This is my YAML file:

train: C:/Daphnia_Project/Dataset_Images/Images/train

val: C:/Daphnia_Project/Dataset_Images/Images/val

names:

0: daphnia

This is my python code to fun YOLO training:

from ultralytics import YOLO

# Loading small pretrained model

model = YOLO(“yolov8n.pt”)

# Training the model

model.train(

data=“C:/Daphnia_Project/Dataset_Images/daphnia.yaml”, #path to YAML

epochs=100,

imgsz=1536,

batch=8,

#Small object tuning

degrees=0.0,

scale=0.5,

mosaic=1.0,

close_mosaic=10,

hsv_h=0.015,

hsv_s=0.7,

hsv_v=0.4,

# Save settings

project=“C:/Daphnia_Project/runs”,

name=“daphnia_model”,

pretrained=True

)

This is the error that constantly appears:
WARNING no labels found in detect set, cannot compute metrics without labels

The I and L in the folders should not capitalized. They should be all lowercase

images and labels

Update the YAML file path to also lowercase after renaming the folders

You are amazing!!! Thank you so much :D. Could I get a short explanation on why i cant name the files Images and Labels tho? I thought it wouldn’t seem to be a big problem as my YAML files direct the YOLO algorithems to the file.

YAML only points to the images. It would find images, but not labels because labels are found but replacing images in the path with labels, but it doesn’t work in your case because it’s capitalized. It’s case sensitive.

Oh i see, thank you very much for the quick responses!

Glad that fixed it! You’re very close now — if anything else comes up with Ultralytics YOLO training, just share your updated folder structure and one sample .txt label and we can help check it quickly.

Will do! Thank you very much for your time.