File size: 545 Bytes
a985b94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from ultralytics import YOLO

def evaluate_model():
    print("Loading your custom-trained wafer brain for official grading...")
    # Pointing to your exact model path
    model_path = 'middleware/best.pt'
    model = YOLO(model_path)

    print("Running official validation...")
    # model.val() automatically uses dataset.yaml to find the images AND the answer keys!
    metrics = model.val()
    
    print("\nGrading complete! Check the new 'runs/detect/val' folder for your fresh graphs.")

if __name__ == '__main__':
    evaluate_model()