Skip to content

Unusual behavior of performance metrics #988

Open
@Josephts1

Description

Search before asking

Question

I recently created a new discussion exposing the behavior of the performance graphs thrown by model.train (see image 1, see large decrease in the first epochs). I was advised to increase my dataset and review the quality of my labels. I did and increased the number of images to 256. I was also more detailed with the labels (see image 2) and this is what the predictions from model.train look like (see image 3). Even with all this, I do not understand the behavior of the mAP50 and mAP50-95 performance metrics. Could you explain to me why this is and if possible, provide me with a solution?
I appreciate your help

I attach the code used

from google.colab import
drive.mount('/content/drive')

import yaml

data={ 'path': '/content/drive/MyDrive/Proyecto_de_grado/data', 'train': 'images/train', 'val': 'images/val', 'names': { 0: 'fruta' } }

with open('/content/drive/MyDrive/Proyecto_de_grado/data/data.yaml', 'w') as file:
yaml.dump(data, file,default_flow_style=False,sort_keys=False)

pip install -U ultralytics

from ultralytics import YOLO

model=YOLO('yolo11s.pt')

Frez_layers=24
freeze = [f"model.{x}." for x in range(0,Frez_layers)]
print(freeze)
frozen_params={}
for k, v in model.named_parameters():
#print(k)
v.requires_grad = True # train all layers
frozen_params[k] = v.data.clone()
if any(x in k for x in freeze):
print(f"freezing {k}")
v.requires_grad = False

result=model.train(data="/content/drive/MyDrive/Proyecto_de_grado/data/data.yaml", epochs=100,patience=50,batch=8,plots=True,optimizer="auto",lr0=1e- 4,seed=42,project="/content/drive/MyDrive/Proyecto_de_grado/runs/freeze_layers/todo_congelado_11s")

Image
Image
Image

Additional

No response

Metadata

Assignees

No one assigned

    Labels

    detectObject Detection issues, PR'squestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions