You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
model=YOLO('yolo11s.pt')
#CONGELAR CAPAS
Frez_layers=24 #Cantidad de capas a congelar máx 23. Capas backbone hasta la 9. Capas neck de la 10 a la 22.
freeze = [f"model.{x}." for x in range(0,Frez_layers)] # capas "module" congeladas
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()
#print(v.data.clone())
#print(v.requires_grad)
if any(x in k for x in freeze): #Si uno de los elementos en freeze es una subcadena del texto k, entra al bucle
print(f"freezing {k}")
v.requires_grad = False
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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
drive.mount('/content/drive')
CORRER UNA ÚNICA VEZ EN UNCA CUENTA DE GOOGLE DRIVE
archivo .yaml para indicar la ubicación de los datos
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
#Ref: https://docs.ultralytics.com/yolov5/tutorials/transfer_learning_with_frozen_layers/#before-you-start
from ultralytics import YOLO
model=YOLO('yolo11s.pt')
#CONGELAR CAPAS
Frez_layers=24 #Cantidad de capas a congelar máx 23. Capas backbone hasta la 9. Capas neck de la 10 a la 22.
freeze = [f"model.{x}." for x in range(0,Frez_layers)] # capas "module" congeladas
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()
#print(v.data.clone())
#print(v.requires_grad)
if any(x in k for x in freeze): #Si uno de los elementos en freeze es una subcadena del texto k, entra al bucle
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")
`
Beta Was this translation helpful? Give feedback.
All reactions