Open ebgoldstein opened 4 days ago
Sounds good Evan, I'll get started. I started looking through some of the YOLO documentation and noticed that YOLO v11 was just released. I was using YOLO v8. Do you think it would be better to switch to YOLO v11 if it is supposed to be more accurate?
I think a new model would be interesting. But regardless of the model this task will benefit from labeling
After doing some preliminary digging, here is what I have come up with so far:
Yes, the model can be retrained/fine tuned. I think it is possible to build a new model from a .yaml file and then load in a pretrained model to use for training. As far as what code to write, the YOLO documentation provides the following snippet example:
from ultralytics import YOLO
model = YOLO("yolo11n.yaml") # build a new model from YAML
model = YOLO("yolo11n.pt") # load a pretrained model (recommended for training)
model = YOLO("yolo11n.yaml").load("yolo11n.pt") # build from YAML and transfer weights
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
Where instead of using the coco8 dataset we would be using our training data. To generate training data, something like Roboflow could be used to annotate and label the images and then export the dataset in the YOLOv11 format. I believe this might be the file reference in the data=”coco8.yaml” line. It also looks like another potential tool used to run the code and train the model efficiently is Google Colab, so that might also be another area of potential investigation for the future.
I did also see a variation of code where only the pretrained model was used. I also saw some other code that looked like it was used to track model performance, but that might be an addition for later. Let me know if you think I am on the right track or should do additional digging elsewhere!
ok, great - so we need yolo formatted labels... I recommend using MakeSense since its easy, and browser based... https://www.makesense.ai/
maybe try labeling 3-5 images - using the labels you were using before (car, truck, etc..).. - and export the labels as a zip in Yolo format..
once that is done, ping me here and we can try to retrain the model for a few epochs with this very small dataset via google colab.
if it works without a hiccup, more images can eb labeled and the model will surely get better...
@Perri-Woodard - Does that sound good?
(cc: @anardek)
Sounds perfect- I'll get on it
I was able to generate this zip file: labels_water-quality-object-detection_2024-11-15-11-08-41.zip
awesome, can you email me a zip of those 5 images?
Images have been emailed
awesome - received, thank you
do you want to take a pass at trying to retrain the model?
Yes! Currently trying to figure out google colab and file structure stuff.
After attempting a first pass to retrain the model, I got the following output:
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True). Ultralytics 8.3.31 🚀 Python-3.10.12 torch-2.5.1+cu121 CUDA:0 (Tesla T4, 15102MiB) engine/trainer: task=detect, mode=train, model=yolo11x.pt, data=/data.yaml, epochs=3, time=None, patience=100, batch=16, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=8, project=None, name=train4, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=False, freeze=None, multi_scale=False, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, vid_stride=1, stream_buffer=False, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, embed=None, show=False, save_frames=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_width=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=True, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, bgr=0.0, mosaic=1.0, mixup=0.0, copy_paste=0.0, copy_paste_mode=flip, auto_augment=randaugment, erasing=0.4, crop_fraction=1.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/train4 Downloading https://ultralytics.com/assets/Arial.ttf to '/root/.config/Ultralytics/Arial.ttf'... 100% 755k/755k [00:00<00:00, 39.9MB/s] Overriding model.yaml nc=80 with nc=6
from n params module arguments
0 -1 1 2784 ultralytics.nn.modules.conv.Conv [3, 96, 3, 2]
1 -1 1 166272 ultralytics.nn.modules.conv.Conv [96, 192, 3, 2]
2 -1 2 389760 ultralytics.nn.modules.block.C3k2 [192, 384, 2, True, 0.25]
3 -1 1 1327872 ultralytics.nn.modules.conv.Conv [384, 384, 3, 2]
4 -1 2 1553664 ultralytics.nn.modules.block.C3k2 [384, 768, 2, True, 0.25]
5 -1 1 5309952 ultralytics.nn.modules.conv.Conv [768, 768, 3, 2]
6 -1 2 5022720 ultralytics.nn.modules.block.C3k2 [768, 768, 2, True]
7 -1 1 5309952 ultralytics.nn.modules.conv.Conv [768, 768, 3, 2]
8 -1 2 5022720 ultralytics.nn.modules.block.C3k2 [768, 768, 2, True]
9 -1 1 1476864 ultralytics.nn.modules.block.SPPF [768, 768, 5]
10 -1 2 3264768 ultralytics.nn.modules.block.C2PSA [768, 768, 2]
11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1]
13 -1 2 5612544 ultralytics.nn.modules.block.C3k2 [1536, 768, 2, True]
14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1]
16 -1 2 1700352 ultralytics.nn.modules.block.C3k2 [1536, 384, 2, True]
17 -1 1 1327872 ultralytics.nn.modules.conv.Conv [384, 384, 3, 2]
18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1]
19 -1 2 5317632 ultralytics.nn.modules.block.C3k2 [1152, 768, 2, True]
20 -1 1 5309952 ultralytics.nn.modules.conv.Conv [768, 768, 3, 2]
21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1]
22 -1 2 5612544 ultralytics.nn.modules.block.C3k2 [1536, 768, 2, True]
23 [16, 19, 22] 1 3152482 ultralytics.nn.modules.head.Detect [6, [384, 768, 768]]
YOLO11x summary: 631 layers, 56,880,706 parameters, 56,880,690 gradients, 195.5 GFLOPs
Transferred 1009/1015 items from pretrained weights COMET WARNING: To get all data logged automatically, import comet_ml before the following modules: torch. COMET INFO: Experiment is live on comet.com https://www.comet.com/perri-woodard/general/0fffc91592bd4fde8d846b2ab87ad115
COMET INFO: Couldn't find a Git repository in '/content' nor in any parent directory. Set COMET_GIT_DIRECTORY
if your Git Repository is elsewhere.
TensorBoard: Start with 'tensorboard --logdir runs/detect/train4', view at http://localhost:6006/
Freezing layer 'model.23.dfl.conv.weight'
AMP: running Automatic Mixed Precision (AMP) checks...
Downloading https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt to 'yolo11n.pt'...
100%|██████████| 5.35M/5.35M [00:00<00:00, 173MB/s]
AMP: checks passed ✅
train: Scanning /content/dataset/labels/train... 5 images, 0 backgrounds, 0 corrupt: 100%|██████████| 5/5 [00:00<00:00, 182.32it/s]
train: New cache created: /content/dataset/labels/train.cache
/usr/local/lib/python3.10/dist-packages/albumentations/init.py:24: UserWarning: A new version of Albumentations is available: 1.4.21 (you have 1.4.20). Upgrade using: pip install -U albumentations. To disable automatic update checks, set the environment variable NO_ALBUMENTATIONS_UPDATE to 1.
check_for_updates()
albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01, num_output_channels=3, method='weighted_average'), CLAHE(p=0.01, clip_limit=(1.0, 4.0), tile_grid_size=(8, 8))
val: Scanning /content/dataset/labels/val... 0 images, 5 backgrounds, 0 corrupt: 100%|██████████| 5/5 [00:00<00:00, 851.22it/s]
val: WARNING ⚠️ No labels found in /content/dataset/labels/val.cache. See https://docs.ultralytics.com/datasets for dataset formatting guidance.
val: New cache created: /content/dataset/labels/val.cache
WARNING ⚠️ No labels found in /content/dataset/labels/val.cache, training may not work correctly. See https://docs.ultralytics.com/datasets for dataset formatting guidance.
Plotting labels to runs/detect/train4/labels.jpg...
optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically...
optimizer: AdamW(lr=0.001, momentum=0.9) with parameter groups 167 weight(decay=0.0), 174 weight(decay=0.0005), 173 bias(decay=0.0)
TensorBoard: model graph visualization added ✅
Image sizes 640 train, 640 val
Using 2 dataloader workers
Logging results to runs/detect/train4
Starting training for 3 epochs...
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/3 6.09G 2.576 3.782 1.486 41 640: 100%|██████████| 1/1 [00:01<00:00, 1.78s/it]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 2.90it/s]
all 5 0 0 0 0 0
WARNING ⚠️ no labels found in detect set, can not compute metrics without labels
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
2/3 5.47G 2.056 4.408 1.341 18 640: 100%|██████████| 1/1 [00:00<00:00, 1.87it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 4.66it/s]
all 5 0 0 0 0 0
WARNING ⚠️ no labels found in detect set, can not compute metrics without labels
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
3/3 5.47G 2.204 4.045 1.386 31 640: 100%|██████████| 1/1 [00:00<00:00, 1.63it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 4.40it/s]
all 5 0 0 0 0 0
WARNING ⚠️ no labels found in detect set, can not compute metrics without labels
3 epochs completed in 0.006 hours. Optimizer stripped from runs/detect/train4/weights/last.pt, 114.4MB Optimizer stripped from runs/detect/train4/weights/best.pt, 114.4MB
Validating runs/detect/train4/weights/best.pt... Ultralytics 8.3.31 🚀 Python-3.10.12 torch-2.5.1+cu121 CUDA:0 (Tesla T4, 15102MiB) YOLO11x summary (fused): 464 layers, 56,833,954 parameters, 0 gradients, 194.4 GFLOPs Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 4.72it/s] all 5 0 0 0 0 0 WARNING ⚠️ no labels found in detect set, can not compute metrics without labels Speed: 0.3ms preprocess, 35.0ms inference, 0.0ms loss, 3.5ms postprocess per image Results saved to runs/detect/train4 COMET ERROR: We failed to read file 'runs/detect/train4/F1_curve.png' for uploading. Please double-check the file path and permissions COMET ERROR: We failed to read file 'runs/detect/train4/P_curve.png' for uploading. Please double-check the file path and permissions COMET ERROR: We failed to read file 'runs/detect/train4/R_curve.png' for uploading. Please double-check the file path and permissions COMET ERROR: We failed to read file 'runs/detect/train4/PR_curve.png' for uploading. Please double-check the file path and permissions COMET INFO: --------------------------------------------------------------------------------------- COMET INFO: Comet.ml Experiment Summary COMET INFO: --------------------------------------------------------------------------------------- COMET INFO: Data: COMET INFO: display_summary_level : 1 COMET INFO: name : exciting_callable_3290 COMET INFO: url : https://www.comet.com/perri-woodard/general/0fffc91592bd4fde8d846b2ab87ad115 COMET INFO: Metrics [count] (min, max): COMET INFO: lr/pg0 [7] : (0.0, 6.8e-06) COMET INFO: lr/pg1 [7] : (0.0, 6.8e-06) COMET INFO: lr/pg2 [7] : (0.0, 6.8e-06) COMET INFO: metrics/mAP50(B) : 0.0 COMET INFO: metrics/mAP50-95(B) : 0.0 COMET INFO: metrics/precision(B) : 0.0 COMET INFO: metrics/recall(B) : 0.0 COMET INFO: model/GFLOPs : 195.481 COMET INFO: model/parameters : 56880706 COMET INFO: model/speed_PyTorch(ms) : 55.926 COMET INFO: train/box_loss [6] : (2.05594, 2.57588) COMET INFO: train/cls_loss [6] : (3.7816, 4.40751) COMET INFO: train/dfl_loss [6] : (1.34092, 1.48573) COMET INFO: val/box_loss : 0.0 COMET INFO: val/cls_loss [6] : (22.34375, 22.67188) COMET INFO: val/dfl_loss : 0.0 COMET INFO: Others: COMET INFO: eval_batch_logging_interval : 1 COMET INFO: log_confusion_matrix_on_eval : False COMET INFO: log_image_predictions : True COMET INFO: max_image_predictions : 100 COMET INFO: Parameters: COMET INFO: agnostic_nms : False COMET INFO: amp : True COMET INFO: augment : False COMET INFO: auto_augment : randaugment COMET INFO: batch : 16 COMET INFO: bgr : 0.0 COMET INFO: box : 7.5 COMET INFO: cache : False COMET INFO: cfg : None COMET INFO: classes : None COMET INFO: close_mosaic : 10 COMET INFO: cls : 0.5 COMET INFO: conf : None COMET INFO: copy_paste : 0.0 COMET INFO: copy_paste_mode : flip COMET INFO: cos_lr : False COMET INFO: crop_fraction : 1.0 COMET INFO: data : /data.yaml COMET INFO: degrees : 0.0 COMET INFO: deterministic : True COMET INFO: device : None COMET INFO: dfl : 1.5 COMET INFO: dnn : False COMET INFO: dropout : 0.0 COMET INFO: dynamic : False COMET INFO: embed : None COMET INFO: epochs : 3 COMET INFO: erasing : 0.4 COMET INFO: exist_ok : False COMET INFO: fliplr : 0.5 COMET INFO: flipud : 0.0 COMET INFO: format : torchscript COMET INFO: fraction : 1.0 COMET INFO: freeze : None COMET INFO: half : False COMET INFO: hsv_h : 0.015 COMET INFO: hsv_s : 0.7 COMET INFO: hsv_v : 0.4 COMET INFO: imgsz : 640 COMET INFO: int8 : False COMET INFO: iou : 0.7 COMET INFO: keras : False COMET INFO: kobj : 1.0 COMET INFO: label_smoothing : 0.0 COMET INFO: line_width : None COMET INFO: lr0 : 0.01 COMET INFO: lrf : 0.01 COMET INFO: mask_ratio : 4 COMET INFO: max_det : 300 COMET INFO: mixup : 0.0 COMET INFO: mode : train COMET INFO: model : yolo11x.pt COMET INFO: momentum : 0.937 COMET INFO: mosaic : 1.0 COMET INFO: multi_scale : False COMET INFO: name : train4 COMET INFO: nbs : 64 COMET INFO: nms : False COMET INFO: opset : None COMET INFO: optimize : False COMET INFO: optimizer : auto COMET INFO: overlap_mask : True COMET INFO: patience : 100 COMET INFO: perspective : 0.0 COMET INFO: plots : True COMET INFO: pose : 12.0 COMET INFO: pretrained : True COMET INFO: profile : False COMET INFO: project : None COMET INFO: rect : False COMET INFO: resume : False COMET INFO: retina_masks : False COMET INFO: save : True COMET INFO: save_conf : False COMET INFO: save_crop : False COMET INFO: save_dir : runs/detect/train4 COMET INFO: save_frames : False COMET INFO: save_hybrid : False COMET INFO: save_json : False COMET INFO: save_period : -1 COMET INFO: save_txt : False COMET INFO: scale : 0.5 COMET INFO: seed : 0 COMET INFO: shear : 0.0 COMET INFO: show : False COMET INFO: show_boxes : True COMET INFO: show_conf : True COMET INFO: show_labels : True COMET INFO: simplify : True COMET INFO: single_cls : False COMET INFO: source : None COMET INFO: split : val COMET INFO: stream_buffer : False COMET INFO: task : detect COMET INFO: time : None COMET INFO: tracker : botsort.yaml COMET INFO: translate : 0.1 COMET INFO: val : True COMET INFO: verbose : True COMET INFO: vid_stride : 1 COMET INFO: visualize : False COMET INFO: warmup_bias_lr : 0.1 COMET INFO: warmup_epochs : 3.0 COMET INFO: warmup_momentum : 0.8 COMET INFO: weight_decay : 0.0005 COMET INFO: workers : 8 COMET INFO: workspace : 4 COMET INFO: Uploads: COMET INFO: confusion-matrix : 1 COMET INFO: environment details : 1 COMET INFO: filename : 1 COMET INFO: images : 9 COMET INFO: installed packages : 1 COMET INFO: model-element : 1 (109.09 MB) COMET INFO: os packages : 1 COMET INFO: source_code : 2 (14.89 KB) COMET INFO: COMET WARNING: To get all data logged automatically, import comet_ml before the following modules: torch. COMET INFO: Please wait for assets to finish uploading (timeout is 10800 seconds) COMET INFO: Still uploading 9 file(s), remaining 110.70 MB/110.93 MB
I am now going to try to make sense out of what this all means. Addition: I realize I had a path wrong in my .yaml file.
For this set I did not use any test images because the sample so small- I might try and run it with all the images being the same but I am unsure if I am supposed to do that. I know that the recommended spread is something like 70%-train, 20% validate, and 10% test.
Here is attempt 2:
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True). Ultralytics 8.3.31 🚀 Python-3.10.12 torch-2.5.1+cu121 CUDA:0 (Tesla T4, 15102MiB) engine/trainer: task=detect, mode=train, model=yolo11x.pt, data=/data.yaml, epochs=3, time=None, patience=100, batch=16, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=8, project=None, name=train5, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=False, freeze=None, multi_scale=False, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, vid_stride=1, stream_buffer=False, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, embed=None, show=False, save_frames=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_width=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=True, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, bgr=0.0, mosaic=1.0, mixup=0.0, copy_paste=0.0, copy_paste_mode=flip, auto_augment=randaugment, erasing=0.4, crop_fraction=1.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/train5 Overriding model.yaml nc=80 with nc=6
from n params module arguments
0 -1 1 2784 ultralytics.nn.modules.conv.Conv [3, 96, 3, 2]
1 -1 1 166272 ultralytics.nn.modules.conv.Conv [96, 192, 3, 2]
2 -1 2 389760 ultralytics.nn.modules.block.C3k2 [192, 384, 2, True, 0.25]
3 -1 1 1327872 ultralytics.nn.modules.conv.Conv [384, 384, 3, 2]
4 -1 2 1553664 ultralytics.nn.modules.block.C3k2 [384, 768, 2, True, 0.25]
5 -1 1 5309952 ultralytics.nn.modules.conv.Conv [768, 768, 3, 2]
6 -1 2 5022720 ultralytics.nn.modules.block.C3k2 [768, 768, 2, True]
7 -1 1 5309952 ultralytics.nn.modules.conv.Conv [768, 768, 3, 2]
8 -1 2 5022720 ultralytics.nn.modules.block.C3k2 [768, 768, 2, True]
9 -1 1 1476864 ultralytics.nn.modules.block.SPPF [768, 768, 5]
10 -1 2 3264768 ultralytics.nn.modules.block.C2PSA [768, 768, 2]
11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1]
13 -1 2 5612544 ultralytics.nn.modules.block.C3k2 [1536, 768, 2, True]
14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1]
16 -1 2 1700352 ultralytics.nn.modules.block.C3k2 [1536, 384, 2, True]
17 -1 1 1327872 ultralytics.nn.modules.conv.Conv [384, 384, 3, 2]
18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1]
19 -1 2 5317632 ultralytics.nn.modules.block.C3k2 [1152, 768, 2, True]
20 -1 1 5309952 ultralytics.nn.modules.conv.Conv [768, 768, 3, 2]
21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1]
22 -1 2 5612544 ultralytics.nn.modules.block.C3k2 [1536, 768, 2, True]
23 [16, 19, 22] 1 3152482 ultralytics.nn.modules.head.Detect [6, [384, 768, 768]]
YOLO11x summary: 631 layers, 56,880,706 parameters, 56,880,690 gradients, 195.5 GFLOPs
Transferred 1009/1015 items from pretrained weights COMET WARNING: To get all data logged automatically, import comet_ml before the following modules: torch. COMET INFO: Experiment is live on comet.com https://www.comet.com/perri-woodard/general/fdf0da640b7e494fbf02645c083c1726
COMET INFO: Couldn't find a Git repository in '/content' nor in any parent directory. Set COMET_GIT_DIRECTORY
if your Git Repository is elsewhere.
TensorBoard: Start with 'tensorboard --logdir runs/detect/train5', view at http://localhost:6006/
Freezing layer 'model.23.dfl.conv.weight'
AMP: running Automatic Mixed Precision (AMP) checks...
AMP: checks passed ✅
train: Scanning /content/dataset/labels/train.cache... 5 images, 0 backgrounds, 0 corrupt: 100%|██████████| 5/5 [00:00<?, ?it/s]
/usr/local/lib/python3.10/dist-packages/albumentations/init.py:24: UserWarning: A new version of Albumentations is available: 1.4.21 (you have 1.4.20). Upgrade using: pip install -U albumentations. To disable automatic update checks, set the environment variable NO_ALBUMENTATIONS_UPDATE to 1.
check_for_updates()
albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01, num_output_channels=3, method='weighted_average'), CLAHE(p=0.01, clip_limit=(1.0, 4.0), tile_grid_size=(8, 8))
val: Scanning /content/dataset/labels/val... 5 images, 0 backgrounds, 0 corrupt: 100%|██████████| 5/5 [00:00<00:00, 167.18it/s]
val: New cache created: /content/dataset/labels/val.cache
Plotting labels to runs/detect/train5/labels.jpg...
optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically...
optimizer: AdamW(lr=0.001, momentum=0.9) with parameter groups 167 weight(decay=0.0), 174 weight(decay=0.0005), 173 bias(decay=0.0)
TensorBoard: model graph visualization added ✅
Image sizes 640 train, 640 val
Using 2 dataloader workers
Logging results to runs/detect/train5
Starting training for 3 epochs...
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/3 6.03G 2.576 3.782 1.486 41 640: 100%|██████████| 1/1 [00:01<00:00, 1.09s/it]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:01<00:00, 1.65s/it]
all 5 20 0.0086 0.3 0.0273 0.012
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
2/3 5.47G 2.056 4.408 1.341 18 640: 100%|██████████| 1/1 [00:00<00:00, 2.32it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 4.85it/s]
all 5 20 0.00845 0.3 0.0269 0.0119
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
3/3 5.5G 2.204 4.045 1.386 31 640: 100%|██████████| 1/1 [00:00<00:00, 1.83it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 3.24it/s]
all 5 20 0.00836 0.3 0.0267 0.0119
3 epochs completed in 0.006 hours. Optimizer stripped from runs/detect/train5/weights/last.pt, 114.4MB Optimizer stripped from runs/detect/train5/weights/best.pt, 114.4MB
Validating runs/detect/train5/weights/best.pt... Ultralytics 8.3.31 🚀 Python-3.10.12 torch-2.5.1+cu121 CUDA:0 (Tesla T4, 15102MiB) YOLO11x summary (fused): 464 layers, 56,833,954 parameters, 0 gradients, 194.4 GFLOPs Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 5.04it/s] all 5 20 0.00868 0.3 0.0274 0.012 truck 4 5 0.00222 0.2 0.00347 0.00277 car 3 5 0.00741 0.6 0.0735 0.0264 person 4 5 0.0133 0.2 0.0249 0.0174 garbage can 4 5 0.0118 0.2 0.00759 0.00152 Speed: 0.7ms preprocess, 31.1ms inference, 0.0ms loss, 3.2ms postprocess per image Results saved to runs/detect/train5 COMET INFO: --------------------------------------------------------------------------------------- COMET INFO: Comet.ml Experiment Summary COMET INFO: --------------------------------------------------------------------------------------- COMET INFO: Data: COMET INFO: display_summary_level : 1 COMET INFO: name : mathematical_degree_6942 COMET INFO: url : https://www.comet.com/perri-woodard/general/fdf0da640b7e494fbf02645c083c1726 COMET INFO: Metrics [count] (min, max): COMET INFO: lr/pg0 [7] : (0.0, 6.8e-06) COMET INFO: lr/pg1 [7] : (0.0, 6.8e-06) COMET INFO: lr/pg2 [7] : (0.0, 6.8e-06) COMET INFO: metrics/mAP50(B) [8] : (0.02672, 0.02737415155185538) COMET INFO: metrics/mAP50-95(B) [8] : (0.01186, 0.012031661097015103) COMET INFO: metrics/precision(B) [8] : (0.00836, 0.008681917211328976) COMET INFO: metrics/recall(B) : 0.3 COMET INFO: model/GFLOPs : 195.481 COMET INFO: model/parameters : 56880706 COMET INFO: model/speed_PyTorch(ms) : 45.182 COMET INFO: train/box_loss [6] : (2.05594, 2.57588) COMET INFO: train/cls_loss [6] : (3.7816, 4.40751) COMET INFO: train/dfl_loss [6] : (1.34092, 1.48573) COMET INFO: val/box_loss [6] : (2.34327, 2.34635) COMET INFO: val/cls_loss [6] : (3.71265, 3.72205) COMET INFO: val/dfl_loss [6] : (1.46954, 1.47224) COMET INFO: Others: COMET INFO: eval_batch_logging_interval : 1 COMET INFO: log_confusion_matrix_on_eval : False COMET INFO: log_image_predictions : True COMET INFO: max_image_predictions : 100 COMET INFO: Parameters: COMET INFO: agnostic_nms : False COMET INFO: amp : True COMET INFO: augment : False COMET INFO: auto_augment : randaugment COMET INFO: batch : 16 COMET INFO: bgr : 0.0 COMET INFO: box : 7.5 COMET INFO: cache : False COMET INFO: cfg : None COMET INFO: classes : None COMET INFO: close_mosaic : 10 COMET INFO: cls : 0.5 COMET INFO: conf : None COMET INFO: copy_paste : 0.0 COMET INFO: copy_paste_mode : flip COMET INFO: cos_lr : False COMET INFO: crop_fraction : 1.0 COMET INFO: data : /data.yaml COMET INFO: degrees : 0.0 COMET INFO: deterministic : True COMET INFO: device : None COMET INFO: dfl : 1.5 COMET INFO: dnn : False COMET INFO: dropout : 0.0 COMET INFO: dynamic : False COMET INFO: embed : None COMET INFO: epochs : 3 COMET INFO: erasing : 0.4 COMET INFO: exist_ok : False COMET INFO: fliplr : 0.5 COMET INFO: flipud : 0.0 COMET INFO: format : torchscript COMET INFO: fraction : 1.0 COMET INFO: freeze : None COMET INFO: half : False COMET INFO: hsv_h : 0.015 COMET INFO: hsv_s : 0.7 COMET INFO: hsv_v : 0.4 COMET INFO: imgsz : 640 COMET INFO: int8 : False COMET INFO: iou : 0.7 COMET INFO: keras : False COMET INFO: kobj : 1.0 COMET INFO: label_smoothing : 0.0 COMET INFO: line_width : None COMET INFO: lr0 : 0.01 COMET INFO: lrf : 0.01 COMET INFO: mask_ratio : 4 COMET INFO: max_det : 300 COMET INFO: mixup : 0.0 COMET INFO: mode : train COMET INFO: model : yolo11x.pt COMET INFO: momentum : 0.937 COMET INFO: mosaic : 1.0 COMET INFO: multi_scale : False COMET INFO: name : train5 COMET INFO: nbs : 64 COMET INFO: nms : False COMET INFO: opset : None COMET INFO: optimize : False COMET INFO: optimizer : auto COMET INFO: overlap_mask : True COMET INFO: patience : 100 COMET INFO: perspective : 0.0 COMET INFO: plots : True COMET INFO: pose : 12.0 COMET INFO: pretrained : True COMET INFO: profile : False COMET INFO: project : None COMET INFO: rect : False COMET INFO: resume : False COMET INFO: retina_masks : False COMET INFO: save : True COMET INFO: save_conf : False COMET INFO: save_crop : False COMET INFO: save_dir : runs/detect/train5 COMET INFO: save_frames : False COMET INFO: save_hybrid : False COMET INFO: save_json : False COMET INFO: save_period : -1 COMET INFO: save_txt : False COMET INFO: scale : 0.5 COMET INFO: seed : 0 COMET INFO: shear : 0.0 COMET INFO: show : False COMET INFO: show_boxes : True COMET INFO: show_conf : True COMET INFO: show_labels : True COMET INFO: simplify : True COMET INFO: single_cls : False COMET INFO: source : None COMET INFO: split : val COMET INFO: stream_buffer : False COMET INFO: task : detect COMET INFO: time : None COMET INFO: tracker : botsort.yaml COMET INFO: translate : 0.1 COMET INFO: val : True COMET INFO: verbose : True COMET INFO: vid_stride : 1 COMET INFO: visualize : False COMET INFO: warmup_bias_lr : 0.1 COMET INFO: warmup_epochs : 3.0 COMET INFO: warmup_momentum : 0.8 COMET INFO: weight_decay : 0.0005 COMET INFO: workers : 8 COMET INFO: workspace : 4 COMET INFO: Uploads: COMET INFO: confusion-matrix : 1 COMET INFO: environment details : 1 COMET INFO: filename : 1 COMET INFO: images : 13 COMET INFO: installed packages : 1 COMET INFO: model-element : 1 (109.09 MB) COMET INFO: os packages : 1 COMET INFO: source_code : 2 (14.89 KB) COMET INFO: COMET WARNING: To get all data logged automatically, import comet_ml before the following modules: torch. COMET INFO: Please wait for metadata to finish uploading (timeout is 3600 seconds) COMET INFO: Uploading 1 metrics, params and output messages COMET INFO: Please wait for assets to finish uploading (timeout is 10800 seconds) COMET INFO: Still uploading 5 file(s), remaining 109.40 MB/110.38 MB
Let me know if you think I should make any edits, or start labeling more images. Or, if I should try to see if I can export the model after training. I also shared the notebook itself with you as I think that might be more helpful than me just pasting the output here.
Let's set up a time to meet via email or Teams
Sounds good, I just pinged you on Teams.
2 highlighted areas where the model could be improved. The next steps are:
@Perri-Woodard , step 1 is to read the documentation and understand:
once that is determined, we can figure out the correct tool and start labeling data...