200 epochs completed in 0.533 hours.
Optimizer stripped from runs/train/yolov8s_anti_overfitting/weights/last.pt, 23.0MB
Optimizer stripped from runs/train/yolov8s_anti_overfitting/weights/best.pt, 23.0MB
Validating runs/train/yolov8s_anti_overfitting/weights/best.pt...
Ultralytics 8.3.128 🚀 Python-3.10.17 torch-2.7.0+cu126 CUDA:3 (NVIDIA L40S, 45589MiB)
Model summary (fused): 72 layers, 11,283,093 parameters, 0 gradients, 29.3 GFLOPs
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 9/9 [00:02<00:00, 3.36it/s]
all 206 412 1 1 0.995 0.979
00000000 206 206 1 1 0.995 0.985
01011001 206 206 1 1 0.995 0.973
Speed: 0.2ms preprocess, 10.1ms inference, 0.0ms loss, 0.5ms postprocess per image
Results saved to runs/train/yolov8s_anti_overfitting
Ultralytics 8.3.128 🚀 Python-3.10.17 torch-2.7.0+cu126 CUDA:3 (NVIDIA L40S, 45589MiB)
Model summary (fused): 72 layers, 11,283,093 parameters, 0 gradients, 29.3 GFLOPs
val: Fast image access ✅ (ping: 0.0±0.0 ms, read: 6089.0±118.1 MB/s, size: 3121.2 KB)
val: Scanning /home/j-k12e102/sangyeok/fooddataset/yolo_format/valid/labels.cache... 206 images, 0 backgrounds, 0 corrupt: 100%|██████████| 206/206 [00:00<?, ?i
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 18/18 [00:03<00:00, 4.65it/s]
all 206 412 1 1 0.995 0.979
00000000 206 206 1 1 0.995 0.985
01011001 206 206 1 1 0.995 0.973
Speed: 0.9ms preprocess, 11.2ms inference, 0.0ms loss, 0.5ms postprocess per image
Results saved to runs/train/yolov8s_anti_overfitting2
mAP50-95: 0.9792178397860798
mAP50: 0.995
Traceback (most recent call last):
File "/home/j-k12e102/sangyeok/fooddataset/yolo_format/train_yolov8S_regularized.py", line 72, in <module>
print(f"Precision: {val_results.box.precision}")
File "/home/j-k12e102/.conda/envs/yolov8_env/lib/python3.10/site-packages/ultralytics/utils/__init__.py", line 241, in __getattr__
raise AttributeError(f"'{name}' object has no attribute '{attr}'. See valid attributes below.\n{self.__doc__}")
AttributeError: 'Metric' object has no attribute 'precision'. See valid attributes below.
Class for computing evaluation metrics for YOLOv8 model.
Attributes:
p (list): Precision for each class. Shape: (nc,).
r (list): Recall for each class. Shape: (nc,).
f1 (list): F1 score for each class. Shape: (nc,).
all_ap (list): AP scores for all classes and all IoU thresholds. Shape: (nc, 10).
ap_class_index (list): Index of class for each AP score. Shape: (nc,).
nc (int): Number of classes.
Methods:
ap50(): AP at IoU threshold of 0.5 for all classes. Returns: List of AP scores. Shape: (nc,) or [].
ap(): AP at IoU thresholds from 0.5 to 0.95 for all classes. Returns: List of AP scores. Shape: (nc,) or [].
mp(): Mean precision of all classes. Returns: Float.
mr(): Mean recall of all classes. Returns: Float.
map50(): Mean AP at IoU threshold of 0.5 for all classes. Returns: Float.
map75(): Mean AP at IoU threshold of 0.75 for all classes. Returns: Float.
map(): Mean AP at IoU thresholds from 0.5 to 0.95 for all classes. Returns: Float.
mean_results(): Mean of results, returns mp, mr, map50, map.
class_result(i): Class-aware result, returns p[i], r[i], ap50[i], ap[i].
maps(): mAP of each class. Returns: Array of mAP scores, shape: (nc,).
fitness(): Model fitness as a weighted combination of metrics. Returns: Float.
update(results): Update metric attributes with new evaluation results.
