ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.76k stars 16.35k forks source link

while iam training my custom data #1139

Closed chillum-codeX closed 3 years ago

chillum-codeX commented 4 years ago

TypeError: float() argument must be a string or a number, not 'tuple'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "train.py", line 455, in train(hyp, opt, device, tb_writer) File "train.py", line 166, in train dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt, File "/home/truppy/workspace/yolov5/utils/datasets.py", line 53, in create_dataloader dataset = LoadImagesAndLabels(path, imgsz, batch_size, File "/home/truppy/workspace/yolov5/utils/datasets.py", line 380, in init self.shapes = np.array(shapes, dtype=np.float64) ValueError: setting an array element with a sequence.

github-actions[bot] commented 4 years ago

Hello @chillum1718, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

For more information please visit https://www.ultralytics.com.

Polaris231 commented 4 years ago

TypeError: float() argument must be a string or a number, not 'tuple'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "train.py", line 455, in train(hyp, opt, device, tb_writer) File "train.py", line 166, in train dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt, File "/home/truppy/workspace/yolov5/utils/datasets.py", line 53, in create_dataloader dataset = LoadImagesAndLabels(path, imgsz, batch_size, File "/home/truppy/workspace/yolov5/utils/datasets.py", line 380, in init self.shapes = np.array(shapes, dtype=np.float64) ValueError: setting an array element with a sequence.

hi,I have the same error with you. Did you solve it? and could you tell me the solution? Thank you very much!

glenn-jocher commented 4 years ago

@chillum1718 @Polaris231 thank you for your interest in our work! This issue seems to lack the minimum requirements for a proper response, or is insufficiently detailed for us to help you. Please note that most technical problems are due to:

If none of these apply to you, we suggest you close this issue and raise a new one using the Bug Report template, providing screenshots and minimum viable code to reproduce your issue. Thank you!

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.6. To install run:

$ pip install -r requirements.txt

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are passing. These tests evaluate proper operation of basic YOLOv5 functionality, including training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu.

glenn-jocher commented 4 years ago

@chillum1718 @Polaris231 hi guys. Were you able to resolve this error? It appears multiple users may be seeing the same error. It would help us to debug if you could reproduce the error in our Colab notebook and link us to it: https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.