🌐
GitHub
github.com › ultralytics › yolov5 › issues › 10967
AttributeError: 'list' object has no attribute 'shape' · Issue #10967 · ultralytics/yolov5
February 13, 2023 - Search before asking I have searched the YOLOv5 issues and found no similar bug report. YOLOv5 Component Training Bug Environment No response Minimal Reproducible Example No response Additional No ...
Author   XL634663985
🌐
Stack Overflow
stackoverflow.com › questions › 75946725 › yolov5-attributeerror-list-object-has-no-attribute-shape
computer vision - YOLOV5 AttributeError: 'list' object has no attribute 'shape' - Stack Overflow
I have the same problem when (re)training a yolov5 model with the instructions provided: ... anchors, shape = self.anchors[i], p[i].shape AttributeError: 'list' object has no attribute 'shape' using the command python train.py --img 640 --epochs 3 --data data.yaml --weights yolov5s-seg.pt no changes to the loss.py or the repo in general
🌐
GitHub
github.com › ultralytics › yolov5 › issues › 11342
yolov5/utils/loss.py/line 198 AttributeError: 'list' object has no attribute 'shape' · Issue #11342 · ultralytics/yolov5
April 13, 2023 - File "yolov5/utils/loss.py", line 198, in build_targets anchors, shape = self.anchors[i], p[i].shape AttributeError: 'list' object has no attribute 'shape' The parameters are set as follows: parser.add_argument('--weights', type=str, default=ROOT / 'yolov5s-seg.pt', help='initial weights path') parser.add_argument('--cfg', type=str, default=ROOT / 'models/segment/yolov5s-seg.yaml', help='model.yaml path') parser.add_argument('--data', type=str, default=ROOT / 'data/coco128-seg.yaml', help='dataset.yaml path') and the rest remain at default settings.
Author   PhilCuriosity
🌐
PyTorch Forums
discuss.pytorch.org › t › attributeerror-list-object-has-no-attribute-shape › 124100
AttributeError: 'list' object has no attribute 'shape' - PyTorch Forums
June 14, 2021 - Based on the error messages it seems that feats is a list, while you are trying to use it as a tensor. You could thus make sure that the forward method of your model returns a tensor or convert the list to a tensor using e.g. torch.stack · Yes, Python lists don’t have the clone() or shape ...
🌐
GitHub
github.com › ultralytics › yolov5 › issues › 13125
'list' object has no attribute 'shape' · Issue #13125 · ultralytics/yolov5
June 24, 2024 - Search before asking I have searched the YOLOv5 issues and found no similar bug report. YOLOv5 Component Training Bug Traceback (most recent call last): File "/home/hounl/Data/yolov5/train.py", line 848, in main(opt) File "/home/hounl/Da...
🌐
GitHub
github.com › WongKinYiu › yolov9 › issues › 528
Segmentation detect error: c, mh, mw = protos.shape # CHW AttributeError: 'list' object has no attribute 'shape' · Issue #528 · WongKinYiu/yolov9
July 2, 2024 - Segmentation detect error: c, mh, mw = protos.shape # CHW AttributeError: 'list' object has no attribute 'shape'#528
Author   bcnbruno
🌐
PyTorch Forums
discuss.pytorch.org › t › problems-with-yolov5s-from-hub › 171952
Problems with yolov5s from hub - PyTorch Forums
February 6, 2023 - I hoped that I can use yolov5s from hub as plug in play in my standard code that works with pytorch resnet model, but somehow it does not work and I cannot figure out what’s the issue. I need to train a model first. Here is the link The standard training piece of code looks like for i, (imgs, annotations) in enumerate(data_loader): imgs = list(img.to(device) for img in imgs) annotations = [{k: v.to(device) for k, v in t.items()} for t in annotations] ...
🌐
GitHub
github.com › ultralytics › yolov5 › issues › 9366
when export model file,report an error · Issue #9366 · ultralytics/yolov5
September 11, 2022 - Traceback (most recent call last): File "export.py", line 595, in <module> main(opt) File "export.py", line 590, in main run(**vars(opt)) File "/root/anaconda3/envs/yolov5/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "export.py", line 499, in run shape = tuple((y[0] if isinstance(y, tuple) else y).shape) # model output shape AttributeError: 'list' object has no attribute 'shape'
Author   jobsjiang
🌐
DeepLearning.AI
community.deeplearning.ai › course q&a › machine learning specialization › supervised ml: regression and classification
Error: list object has no attribute shape - Supervised ML: Regression and Classification - DeepLearning.AI
June 16, 2023 - Just trying to run the week 1 optional lab code of cost function in a jupyter notebook where this error pops out “list” object has no shape attribute. AttributeError Traceback (most recent call last) Cell In[52], line 2 1 plt.close(‘all’) ----> 2 fig, ax, dyn_items = plt_stationary(x_train, y_train) 3 updater = plt_update_onclick(fig, ax, x_train, y_train, dyn_items) File ~\OneDrive\Desktop\Jupyter\lab_ml\lab_utils_uni.py:124, in plt_stationary(x_train, y_train) ...
🌐
GitHub
github.com › WongKinYiu › yolov9 › issues › 331
yolov9 AttributeError: 'list' object has no attribute 'shape' · Issue #331 · WongKinYiu/yolov9
April 8, 2024 - Traceback (most recent call last): File "c:\Users\10124\Desktop\yolov9\yolov9-main\COUNT_V8_V9.PY", line 48, in total = points_cap_yolo(path) ^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\10124\Desktop\yolov9\yolov9-main\COUNT_V8_V9.PY", line 29, in points_cap_yolo results = model(frame, iou=0.3, device=0, conf=0.3) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\envs\yolov9\Lib\site-packages\ultralytics\engine\model.py", line 176, in call return self.predict(source, stream, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\envs\yolov9\Lib\site-packages\ultralytics\engine\m
Author   linccc666
Find elsewhere
🌐
GitHub
github.com › WongKinYiu › yolov7 › issues › 1259
u7-seg error: AttributeError: 'list' object has no attribute 'shape' · Issue #1259 · WongKinYiu/yolov7
December 14, 2022 - Getting an error: Traceback (most recent call last): File "seg/train.py", line 630, in <module> main(opt) File "seg/train.py", line 526, in main train(opt.hyp, opt, device, callbacks) File "seg/train.py", line 308, in train loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size File "/home/jupyter/yolov7/seg/utils/loss.py", line 125, in __call__ tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets File "/home/jupyter/yolov7/seg/utils/loss.py", line 198, in build_targets anchors, shape = self.anchors[i], p[i].shape AttributeError: 'list' object has no attribute 'shape'
Author   Robotatron
🌐
GitHub
github.com › ultralytics › yolov5 › issues › 6916
AttributeError: 'NoneType' object has no attribute 'shape'. · Issue #6916 · ultralytics/yolov5
March 9, 2022 - I am trying to get YOLOV5 (with --source 0) working on my Raspberry PI. If I provide a folder or .jpg files as the source, the code runs with the expected output. Here is my input: python detect.py --weights best.pt --source 0 Here is th...
Author   Hrrsmjd
🌐
Roboflow
discuss.roboflow.com › 🤝 community help
Error when training Object Detection model - 🤝 Community Help - Roboflow
April 27, 2022 - When I get to the training step for my object detection model in Google Colab, I get the following error: Traceback (most recent call last): File "./pytorch-YOLOv4/train.py", line 447, in <module> device=device, )…
🌐
GitHub
github.com › ultralytics › yolov5 › issues › 10811
Unable to run epochs · Issue #10811 · ultralytics/yolov5
January 22, 2023 - Traceback (most recent call last): File "/content/yolov5/train.py", line 634, in main(opt) File "/content/yolov5/train.py", line 528, in main train(opt.hyp, opt, device, callbacks) File "/content/yolov5/train.py", line 310, in train loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size File "/content/yolov5/utils/loss.py", line 125, in call tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets File "/content/yolov5/utils/loss.py", line 198, in build_targets anchors, shape = self.anchors[i], p[i].shape AttributeError: 'list' object has no attribute 'shape' Can you help me with this?
Author   prabjotbali
🌐
GitHub
github.com › ultralytics › yolov5 › issues › 13311
AttributeError: 'str' object has no attribute 'shape' · Issue #13311 · ultralytics/yolov5
September 13, 2024 - Traceback (most recent call last): File "inference_segmentation.py", line 10, in <module> results = model('res.jpg') File "/home/bilal/Downloads/YOLOv5/v5yolo/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/bilal/Downloads/YOLOv5/v5yolo/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "./models/common.py", line 659, in forward b, ch, h, w = im.shape # batch, channel, height, width AttributeError: 'str' object has no attribute 'shape'
Author   MuhammadBilal848
🌐
Bobby Hadz
bobbyhadz.com › blog › python-attributeerror-list-object-has-no-attribute-shape
AttributeError: 'list' object has no attribute 'shape' | bobbyhadz
April 8, 2024 - The Python "AttributeError: 'list' object has no attribute 'shape'" occurs when we try to access the shape attribute on a list.
🌐
GitHub
github.com › WongKinYiu › yolov9 › issues › 274
AttributeError in YOLOv9 Segmentation Model · Issue #274 · WongKinYiu/yolov9
March 21, 2024 - File "/content/drive/MyDrive/YoloV9_Segmentation/yolov9/utils/segment/general.py", line 54, in process_mask c, mh, mw = protos.shape # CHW AttributeError: 'list' object has no attribute 'shape'
Author   tnmk1701
🌐
GitHub
github.com › ultralytics › yolov5 › issues › 3183
'ScreenShot' object has no attribute 'shape' · Issue #3183 · ultralytics/yolov5
May 16, 2021 - File "E:\YoloV5\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "E:\YoloV5\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\Users\Андрей/.cache\torch\hub\ultralytics_yolov5_master\models\common.py", line 267, in forward if im.shape[0] < 5: # image in CHW AttributeError: 'ScreenShot' object has no attribute 'shape'