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
2
votes
2 answers

RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same

I just start to learn about the YOLO v5 PyTorch version and I was able to build a model, so then I tried to implement a flask application for real-time prediction using this trained model. class for load model and predict class Model(object): …
Dulanga Heshan
  • 1,335
  • 1
  • 19
  • 36
1
vote
1 answer

Warning message using yolov5

i am trying using yolov5 but recently i got warning message like this: WARNING 'ultralytics.yolo.v8' is deprecated since '8.0.136' and will be removed in '8.1.0'. Please use 'ultralytics.models.yolo' instead. WARNING 'ultralytics.yolo.utils' is…
Mr. x
  • 15
  • 5
1
vote
0 answers

Model is not using the weights I trained

I made a synthetic dataset that functions as it should with .png images and annotations in correct format . The yolov5s.pt model is in the same folder I try to run the model from. I trained it…
1
vote
1 answer

ModuleNotFoundError: No module named 'ultralytics'

Im trying to deploy a YOLOV5 model to streamlit, everything works fine when I run this Locally, however when deployed I get this error ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data…
1
vote
1 answer

Load trained YoloV5 model using torch

I followed this tutorial to build ANPR with YoloV5 and EasyOCR. After I trained my model I wanted to load it using torch, using this code snippet: import torch yolo = torch.hub.load( 'ultralytics/yolov5', 'custom', …
Ahmed Adel
  • 49
  • 6
1
vote
0 answers

Generate adversarial patch on GPU

When trying to generate adversarial patch on a GPU server I get this error: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument tensors in method…
William
  • 11
  • 2
1
vote
0 answers

Why isn't the image appearing on my Flask app with YOLOV5 model after clicking upload?

I'm trying to build an app that can detect cavities in oral images using the YOLOV5 algorithm. I have an error when the user clicks upload it doesn't show the image in the browser, however, I can see the image saved in my app. I tried tO print the…
Shad
  • 41
  • 2
1
vote
0 answers

TFLite model gives totally wrong predictions in kotlin app

I converted a YOLOv5 model to TFLite and integrated it into a kotlin Android app for object detection. Before deploying the TFLite model in the app, it performed exceptionally well during testing and development. However, in the app there are the…
1
vote
0 answers

Error when using Yolov5 & Opencv, onnx(-215:Assertion failed)

Error when using Yolov5 & Opencv, onnx(-215:Assertion failed) I'm going to perform sleep recognition detection using Yolov5 & Opencv, onnx. It receives the video in real time through the webcam and outputs whether you close your eyes. I converted…
CW K
  • 19
  • 1
1
vote
1 answer

YOLO label format, when images doesn't have bounding box

If an image (abc.jpg) doesn't have any bounding box, how should look its corresponding label file (abc.txt)? The regular label format is: label x_center/width y_center/height width/image_width, height/image_height.
Michael D
  • 1,711
  • 4
  • 23
  • 38
1
vote
1 answer

YOLOv5: does best.pt control for overfitting?

After each YOLOv5 training, two model files are saved: last.pt and best.pt. I'm aware that: last.pt is the latest saved checkpoint of the model. This will be updated after each epoch. best.pt is the checkpoint that has the best validation loss so…
1
vote
0 answers

My tflite model give totally wrong predictions

I'm trying to convert a YOLOv5 model to a TFLite model for mobile devices, but I'm having issues with the generated file. The TFLite model is so large in size and is giving completely wrong predictions compared to the original YOLOv5 model. the…
1
vote
1 answer

Convert YoloV8 to Tflite

I have trained a custom model using Yolov8. I want to implement this model in my flutter app through the "google_mlkit_object_detection: ^0.6.0" package, for that I must convert it to tflite. But when I run !yolo export model=best.pt…
1
vote
0 answers

opencv c++ yolov5 custom

I used the custom data of yolov5 The code used a copy of the contents of learnopencv Changing the version of onnnx to 12 and opening the model is a problem that occurred after solving it There is a problem with 'float confidence = data[4];' in the…
chaseongyo
  • 11
  • 1
1
vote
0 answers

Opencv calls the onnx model and reports an exception

I use yolov5 to train a data set myself, and then get an error through opencv: C:\Users\admin\.conda\envs\yolov5\python.exe D:\Demo\yolov5\test_onnx.py [ERROR:0@0.012] global onnx_importer.cpp:1054 cv::dnn::dnn4_v20221220::ONNXImporter::handleNode…