Questions tagged [yolov5]

YOLOv5 is a family of object detection architectures and models pretrained on the COCO dataset.

It is a product of Ultralytics open-source research.

643 questions
1
vote
2 answers

How to do inference with YOLOv5 and ONNX

I've trained a YOLOv5 model and it works well on new images with yolo detect.py I've exported the model to ONNX and now i'm trying to load the ONNX model and do inference on a new image. My code works but I don't get the correct bounding boxes. I…
Timothee W
  • 149
  • 7
1
vote
1 answer

Python: Return tuple value to function and calling a specfic value. TypeError: 'NoneType' object is not subscriptable

Hello this is my first Post ever so if I can do anything to improve please tell me. So I am returning to variables x, y to a function. When I output the Tuple value in my main function with print(coords()) it works perfectly fine. It just returns 2…
1
vote
0 answers

TypeError: transpose() received an invalid combination of arguments - got (tuple), but expected one of: (int dim0, int dim1) or (name dim0, name dim1)

I am trying to generate adversarial images using the FastGradientMethod attack in the ART library on a YOLOv5 object detection model. However, I am running into an error when attempting to generate the adversarial image using the fgm.generate()…
Mark Truss
  • 11
  • 1
1
vote
1 answer

yaml.scanner.ScannerError, YOLOv5 error in colab

I faced an error while running YOLOv5 on Google Colab. I think the issue is with the content of the data.yaml file (attached below), and despite trying various concepts, it's still not working. How can I resolve this? !python…
박경덕
  • 13
  • 5
1
vote
1 answer

Jetson nano poor performance with yolov5n and cuda activated

I'm testing Yolov5n with a Jetson nano B01 device (4GB). For this purpose I'm using a docker version from this repo: repo FROM nvcr.io/nvidia/l4t-base:r32.7.1 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y \ git…
Martín Alcubierre
  • 4,341
  • 1
  • 27
  • 27
1
vote
2 answers

how to print model summary of yolov5 model

How to print model summary of yolov5 model for a .pt file? # Model model = torch.hub.load('ultralytics/yolov5', 'yolov5s', device='cpu') from torchstat import stat #try 1 stat(model, (3,640,640)) from torchsummary import summary #try 2 from…
user3303020
  • 933
  • 2
  • 12
  • 26
1
vote
1 answer

How YOLO handles the input images of different sizes?

I am working on custom object detection with YOLOv5. We can provide different input image sizes to the network. How can a DNN network accept different sizes of input? Does YOLO has different backbones for different input sizes? When I give the…
1
vote
1 answer

yolov8 predict show=True - Iamge kills notebook kernel

I am testing yolov8 prediction using the following code: from ultralytics import YOLO # Load a model model = YOLO("yolov8n.pt") # Use the model model.predict(source= "bus.jpg",show=True) # predict on an image This works perfectly in the…
Alan Johnstone
  • 455
  • 1
  • 7
  • 24
1
vote
0 answers

torch hub error for yolov5 in ubuntu aws ec2 instance

I install torch and open cv like this pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu pip install opencv-python then I run this code in ubuntu aws ec2 instance import torch # Model model =…
1
vote
0 answers

how to resolve the issue of [W NNPACK.cpp:79] Could not initialize NNPACK! Reason: Unsupported hardware

I am trying to predict image classes using yolov5 model in m1 chip while loading and calling the model, i am getting this error tried these sources:…
Rishabh Vatsa
  • 21
  • 1
  • 4
1
vote
1 answer

TypeError: No loop matching the specified signature and casting was found for ufunc greater

I'm a beginner to python and machine learning. When I ran the train.py of a project based on the yolov5 (The link of the project is https://github.com/DocF/multispectral-object-detection), I get below error: Traceback (most recent call last): File…
1
vote
0 answers

yolov7 pose estimation RuntimeError: Sizes of tensors must match except in dimension 2. Got 24 and 23

I used the code to test yolov7 pose estimation. import matplotlib.pyplot as plt import torch import cv2 from torchvision import transforms import numpy as np from utils.datasets import letterbox from utils.general import non_max_suppression_kpt from…
CR7
  • 125
  • 7
1
vote
0 answers

Object detection and tracking with zed-2i camera

i am new to the zed camera and my goal is to find and track the objects within the scene using zed-2i camera.also objects has to have a unique id and and their distance from the camera. can someone suggest me to right approach how it can be solved?…
1
vote
0 answers

how to change label font, bounding box color and thickness with custom yolov5

I need to change the label font and bounding box color, in the inference i have assigned a variable for torch hub model and pass it to running the inference but coudnt change the bounding box color and and text font model =…
1
vote
1 answer

How to load a yolov7 model in real time detection application?

I was using yolov5 to do object detection with my customed object and used to load the model like that : model = torch.hub.load("/Users/macbook/Documents/Objection-Detection/yolov5", "custom", source="local", …
Tinho
  • 29
  • 3