(yolov5_new) PS E:\YOLO\ultralytics-yolo11-main> python train.py
WARNING ⚠️ no model scale passed. Assuming scale='n'.
New https://pypi.org/project/ultralytics/8.3.225 available 😃 Update with 'pip install -U ultralytics'
Ultralytics 8.3.9 🚀 Python-3.8.18 torch-2.0.1+cu117 CUDA:0 (NVIDIA GeForce RTX 4060 Laptop GPU, 8188MiB)
engine\trainer: task=detect, mode=train, model=ultralytics/cfg/models/11/yolo11-HGNetV2_1.yaml, data=datase
t/data.yaml, epochs=2, time=None, patience=100, batch=32, imgsz=640, save=True, save_period=-1, cache=False
, device=None, workers=0, project=runs/train, name=exp3, exist_ok=False, pretrained=True, optimizer=SGD, ve
rbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=0, 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, sa
ve_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_wid
th=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=True, opset=N
one, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, wa
rmup_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\train\exp3
Overriding model.yaml nc=80 with nc=3
WARNING ⚠️ no model scale passed. Assuming scale='n'.
from n params module arguments
0 -1 1 1840 ultralytics.nn.modules.block.HGStem [3, 8, 16]
1 -1 3 5784 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[16, 16, 32, 3, 3]
2 -1 1 352 ultralytics.nn.modules.conv.DWConv [32, 32, 3, 2, 1, False]
3 -1 3 24916 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[32, 24, 128, 3, 3]
4 -1 1 1408 ultralytics.nn.modules.conv.DWConv [128, 128, 3, 2, 1, False]
5 -1 3 80640 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[128, 48, 256, 5, 3, 3, False]
6 -1 3 106624 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[256, 48, 256, 5, 3, 3, True]
7 -1 3 106624 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[256, 48, 256, 5, 3, 3, True]
8 -1 1 2816 ultralytics.nn.modules.conv.DWConv [256, 256, 3, 2, 1, False]
9 -1 3 127744 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[256, 96, 256, 5, 3, 3, False]
10 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5]
11 -1 1 249728 ultralytics.nn.modules.block.C2PSA [256, 256, 1]
12 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
13 [-1, 7] 1 0 ultralytics.nn.modules.conv.Concat [1]
14 -1 1 127680 ultralytics.nn.modules.block.C3k2 [512, 128, 1, False]
15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
16 [-1, 3] 1 0 ultralytics.nn.modules.conv.Concat [1]
17 -1 1 32096 ultralytics.nn.modules.block.C3k2 [256, 64, 1, False]
18 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2]
19 [-1, 14] 1 0 ultralytics.nn.modules.conv.Concat [1]
20 -1 1 86720 ultralytics.nn.modules.block.C3k2 [192, 128, 1, False]
21 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2]
22 [-1, 11] 1 0 ultralytics.nn.modules.conv.Concat [1]
23 -1 1 378880 ultralytics.nn.modules.block.C3k2 [384, 256, 1, True]
24 [17, 20, 23] 1 431257 ultralytics.nn.modules.head.Detect [3, [64, 128, 256]]
YOLO11-HGNetV2_1 summary: 368 layers, 2,114,421 parameters, 2,114,405 gradients, 5.6 GFLOPs
TensorBoard: Start with 'tensorboard --logdir runs\train\exp3', view at http://localhost:6006/
Freezing layer 'model.24.dfl.conv.weight'
AMP: running Automatic Mixed Precision (AMP) checks with YOLO11n...
Traceback (most recent call last):
File "train.py", line 32, in <module>
model.train(data='dataset/data.yaml',
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\model.py", line 802, in train
self.trainer.train()
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\trainer.py", line 208, in train
self._do_train(world_size)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\trainer.py", line 328, in _do_train
self._setup_train(world_size)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\trainer.py", line 265, in _setup_train
self.amp = torch.tensor(check_amp(self.model), device=self.device)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\utils\checks.py", line 695, in check_amp
assert amp_allclose(YOLO("yolo11n.pt"), im)
return self.predict(source, stream, **kwargs)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\model.py", line 554, in predict
return self.predictor.predict_cli(source=source) if is_cli else self.predictor(source=source, stream=stream)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\predictor.py", line 168, in __call__
return list(self.stream_inference(source, model, *args, **kwargs)) # merge list of Result into one
File "C:\Users\JJCHAN\.conda\envs\yolov5_new\lib\site-packages\torch\utils\_contextlib.py", line 35, in generator_context
response = gen.send(None)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\predictor.py", line 261, in stream_inference
self.results = self.postprocess(preds, im, im0s)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\models\yolo\detect\predict.py", line 25, in postprocess preds = ops.non_max_suppression(
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\utils\ops.py", line 378, in non_max_suppression
x = x[xc[xi]] # confidence
IndexError: The shape of the mask [32, 24] at index 0 does not match the shape of the indexed tensor [64, 24, 32] at index 0
(yolov5_new) PS E:\YOLO\ultralytics-yolo11-main> python train.py
WARNING ⚠️ no model scale passed. Assuming scale='n'.
New https://pypi.org/project/ultralytics/8.3.225 available 😃 Update with 'pip install -U ultralytics'
Ultralytics 8.3.9 🚀 Python-3.8.18 torch-2.0.1+cu117 CUDA:0 (NVIDIA GeForce RTX 4060 Laptop GPU, 8188MiB)
engine\trainer: task=detect, mode=train, model=ultralytics/cfg/models/11/yolo11-HGNetV2_1.yaml, data=dataset/data.yaml, epochs=2, time=None, patience=100, batch=32, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=0, project=runs/train, name=exp4, exist_ok=False, pretrained=True, opti
mizer=SGD, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=0, 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=No
ne, 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, sh
ow_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\train\exp4
Overriding model.yaml nc=80 with nc=3
WARNING ⚠️ no model scale passed. Assuming scale='n'.
from n params module arguments
0 -1 1 1840 ultralytics.nn.modules.block.HGStem [3, 8, 16]
1 -1 3 5784 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[16, 16, 32, 3, 3]
2 -1 1 352 ultralytics.nn.modules.conv.DWConv [32, 32, 3, 2, 1, False]
3 -1 3 24916 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[32, 24, 128, 3, 3]
4 -1 1 1408 ultralytics.nn.modules.conv.DWConv [128, 128, 3, 2, 1, False]
5 -1 3 80640 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[128, 48, 256, 5, 3, 3, False]
6 -1 3 106624 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[256, 48, 256, 5, 3, 3, True]
7 -1 3 106624 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[256, 48, 256, 5, 3, 3, True]
8 -1 1 2816 ultralytics.nn.modules.conv.DWConv [256, 256, 3, 2, 1, False]
9 -1 3 127744 ultralytics.nn.modules.Light_HGNet.Light_HGBlock[256, 96, 256, 5, 3, 3, False]
10 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5]
11 -1 1 249728 ultralytics.nn.modules.block.C2PSA [256, 256, 1]
12 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
13 [-1, 7] 1 0 ultralytics.nn.modules.conv.Concat [1]
14 -1 1 127680 ultralytics.nn.modules.block.C3k2 [512, 128, 1, False]
15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
16 [-1, 3] 1 0 ultralytics.nn.modules.conv.Concat [1]
17 -1 1 32096 ultralytics.nn.modules.block.C3k2 [256, 64, 1, False]
18 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2]
19 [-1, 14] 1 0 ultralytics.nn.modules.conv.Concat [1]
20 -1 1 86720 ultralytics.nn.modules.block.C3k2 [192, 128, 1, False]
21 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2]
22 [-1, 11] 1 0 ultralytics.nn.modules.conv.Concat [1]
23 -1 1 378880 ultralytics.nn.modules.block.C3k2 [384, 256, 1, True]
24 [17, 20, 23] 1 431257 ultralytics.nn.modules.head.Detect [3, [64, 128, 256]]
YOLO11-HGNetV2_1 summary: 368 layers, 2,114,421 parameters, 2,114,405 gradients, 5.6 GFLOPs
TensorBoard: Start with 'tensorboard --logdir runs\train\exp4', view at http://localhost:6006/
Freezing layer 'model.24.dfl.conv.weight'
AMP: running Automatic Mixed Precision (AMP) checks with YOLO11n...
Traceback (most recent call last):
File "train.py", line 32, in <module>
model.train(data='dataset/data.yaml',
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\model.py", line 802, in train
self.trainer.train()
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\trainer.py", line 208, in train
self._do_train(world_size)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\trainer.py", line 328, in _do_train
self._setup_train(world_size)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\trainer.py", line 265, in _setup_train
self.amp = torch.tensor(check_amp(self.model), device=self.device)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\utils\checks.py", line 695, in check_amp
assert amp_allclose(YOLO("yolo11n.pt"), im)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\utils\checks.py", line 682, in amp_allclose
a = m(batch, imgsz=imgsz, device=device, verbose=False)[0].boxes.data # FP32 inference
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\model.py", line 176, in __call__
return self.predict(source, stream, **kwargs)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\model.py", line 554, in predict
return self.predictor.predict_cli(source=source) if is_cli else self.predictor(source=source, stream=stream)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\predictor.py", line 168, in __call__
return list(self.stream_inference(source, model, *args, **kwargs)) # merge list of Result into one
File "C:\Users\JJCHAN\.conda\envs\yolov5_new\lib\site-packages\torch\utils\_contextlib.py", line 35, in generator_context
response = gen.send(None)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\engine\predictor.py", line 261, in stream_inference
self.results = self.postprocess(preds, im, im0s)
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\models\yolo\detect\predict.py", line 25, in postprocess
preds = ops.non_max_suppression(
File "E:\YOLO\ultralytics-yolo11-main\ultralytics\utils\ops.py", line 378, in non_max_suppression
x = x[xc[xi]] # confidence
IndexError: The shape of the mask [32, 24] at index 0 does not match the shape of the indexed tensor [64, 24, 32] at index 0
最新发布