All Questions
Tagged with yolov5 object-detection
142 questions
0
votes
0
answers
47
views
adding attention mechanism to yolo algorithm
i'm trying to add Cbam attention mechanism to yolo architecture
this is my Cbam implementation added to common.py
class ChannelAttention(nn.Module):
def __init__(self, in_planes, ratio=16):
...
0
votes
1
answer
156
views
YOLOv5 Class Imbalance and Overfitting Issues
I’m working on a seat belt and mobile phone detection system using YOLOv5s to detect the windshield, driver, passenger, seat belt, and mobile phone. My dataset has a class imbalance issue since not ...
0
votes
1
answer
99
views
How do I work with the result of model.predict in yolov8 with a webcam?
I have my webcam set up to be the input for my model.predict() function and want to trigger some code if the function detects a certain object. The model.predict() function does not seem to ever ...
0
votes
0
answers
22
views
Mouse Movement and Clicks Not Working Correctly in Game Using YOLOv5 and PyWin32
I am working on an AI project to detect and shoot objects in the game Aimlabs using a YOLOv5 model. The code works fine when the game is paused, but it does not move the mouse accurately when the game ...
0
votes
0
answers
43
views
Run Yolov5 model in Max engine using Mojo
Issues in loading and compiling the yolov5s.torchscript model in MAX Engine using Mojo.
Referred the documents at https://docs.modular.com/max/mojo/get-started and https://docs.modular.com/max/model-...
0
votes
0
answers
41
views
Offsets and label creation for object detection training/inference
I am new to object detection. I know that in object detection anchors are used for detecting objects in the feature map using offsets instead of predicting actual location of the object w.r.t input ...
0
votes
1
answer
111
views
ModuleNotFound Error in Yolov5 using custom weights
I'm currently learning object detection using a custom trained module in YoloV5. I trained the dataset locally and that operation ran just fine but when i tried to implement the custom weights it gave ...
0
votes
0
answers
27
views
Image processing with YOLOv5
I'm working on an image processing project. I was working with the YOLO model, but the error I got was that the libraries in the requirements.txt file in YOLOv5 are conflicting with each other. Even ...
0
votes
0
answers
36
views
How to pass arguments to fine-tuned yolov5 model?
I have some fine tuned weights, and I am trying to apply the model to an image, but I want to hide the image label and confidence interval. When I am running the model from the command line I would ...
0
votes
0
answers
57
views
Yolov5 transfer learning - runs/train/exp and runs/val/exp problem
I did transfer learning with yolov5 and obtained weights and everything. The val_labels are marked with bounding box crtly but val_pred doesnt have a bounding box at all . nothing is present in ...
0
votes
0
answers
89
views
Yolov5 Custom Model Deployment in Raspberry Pi 3
I want to deploy my pre-trained Yolov5 Custom object detection model where my datasets had used. But I did not know how to deploy this model and test it into raspberry pi 3. I did not find any ...
0
votes
1
answer
244
views
I am using the YOLOv5 model provided by Ultralytics in PyTorch. How can I see which images the model is struggling with?
This is the YOLOv5 implementation I am talking about and this is the file I am using to test the model.
For some classes, it performing decently enough. However, for the rest of the classes, it is not ...
1
vote
0
answers
106
views
yolov5 running custom model, do I have a training problem?
I have this dataset from Roboflow and I want to train it and run it locally. I have trained it and all looks good but when I run the py script in terminal it gives me like errors.
It works when I
...
0
votes
0
answers
86
views
how can i integrate a WebSocket connection in a python code so that it does not interfere with the other loops and program statements in the code?
I am trying to integrate a WebSocket connection in the detect.py file of yolov5 so that the results that are captured by the webcam(I am detecting objects directly using a webcam) can be transmitted ...
1
vote
1
answer
1k
views
is it better to run yolov5 multiple times or with higher batch size
I need to process 6 images at once 10 times per second and i use yolov5 for this.
But I'm new in this topic and im a bit confused with batch sizes for Inference.
As far as I understood it, with higher ...
0
votes
1
answer
369
views
Calculate distance between objects in yolov5
I have used yolov5 for object detection and trained it on my own dataset, now it can detect my two objects. I want to calculate the distance between these two objects. how can I do that?
the command ...
0
votes
1
answer
599
views
YOLOv5 Not Detecting Custom Data
I'm facing an issue with YOLOv5, where it's not detecting objects in custom data even after training. I've tried running it on both Python 3.9 and Python 3.10 with the same result.
`%cd yolov5/
!...
1
vote
2
answers
1k
views
I can't load my YOLOv5 model in streamlit , this is the error
model = torch.hub.load('ultralytics/yolov5', 'custom', path='./best.pt', force_reload=True)
Exception: cannot instantiate 'PosixPath' on your system. Cache may be out of date, try force_reload=True ...
1
vote
1
answer
8k
views
size of input images of yolo v5
When training a YOLOv5s model by specifying the image size, the image size should be the actual size of the images in the dataset or the size to which you want to resize before inputting them to the ...
0
votes
1
answer
504
views
how to calculate Mean IoU in yoloV5 object detection model?
I want to evaluate an object detection model with the meanIoU metric with the yolov5 algorithm. Yolov5 doesn't have a meanIoU evaluation metric.
Is meanIoU a valid metric for object detection?
How can ...
0
votes
1
answer
551
views
Object detection to only assign unique ID
import cv2
import numpy as np
import os
import yaml
from yaml.loader import SafeLoader
class YOLO_Pred():
def __init__(self, onnx_model, data_yaml):
# load YAML
with open(...
0
votes
2
answers
3k
views
How to train Yolo model with GPU of 'NVIDIA GeForce RTX 3050 Laptop GPU
I'm newbie to object detection model, I'm trying to train yolo model in my device('NVIDIA GeForce RTX 3050 Laptop GPU), I am getting errors,
I have image size of (1365, 1024, 3) , I tried with image ...
0
votes
1
answer
449
views
How to show losses when running validation (val.py) on a testing dataset in Ultralytics YOLOv5?
I would like to show the classification and localization loss my model has when I evaluate it on my testing dataset using val.py. However, it seems that val.py only shows the object detection metrics. ...
0
votes
0
answers
667
views
how to use YOLOv5 object detection model to train a single class(e.g. bird) dataset?
1.I modified the data.yaml and yolov5.yaml files.
nc:1
class:bird.
2.after training from scratch about 10 epochs, i found that the class loss is o in every epoch.
I don't know which steps I might have ...
0
votes
1
answer
193
views
[ByteTrack]Tuple indices must be integers or slices, not tuple
I can't figure out how to pass detections to ByteTrack (https://github.com/ifzhang/ByteTrack)
I tried to follow the instructions given by the creator but nothing went as planned.
Here is my code:
#...
1
vote
0
answers
83
views
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 ...
0
votes
1
answer
337
views
Yolo version to run Oak D on CPU
In 2021 I was able to train a Yolov4-Tiny model to deploy on an Oak-D camera, and I was able to run the model on the camera on my PC using only CPU (I trained on Google Colab using GPU but for running ...
0
votes
0
answers
244
views
How to extract bounding box coordinates from a YolovV5 object detection model that has been converted to a CoreML model for use in an iOS app?
Here is my coreMl model prediction
I need something like that,
I need this kind of prediction
I have tried it for export
!python export.py --weights /content/drive/MyDrive/best.pt --include "...
0
votes
1
answer
942
views
Error loading Yolov5 Model to Local System
I am using Yolov5 ultralytics pytorch colab notebook to train over my custom dataset. I saved the model and wanted to use to make predictions over my local PC but encountered an error
Downloading: &...
0
votes
1
answer
287
views
Wrong classe names when Converting yolov5 to TFLite
when i convert my trained yolov5 custom model best.pt to best-fp16.tflite with the commande :
!python yolov5/export.py --weights best.pt --include tflite .I got my converted weights with no issue
...
0
votes
1
answer
781
views
How to modify output from TFLite exported Yolov5s model to work with an android app built with kotlin?
I want to load my TFLite exported Yolov5s model into my object detection android app. I followed this tutorial: https://www.youtube.com/watch?v=zs43IrWTzB0
However, my TFLite Yolov5 model outputs an ...
2
votes
1
answer
3k
views
YoloV8 Segmentation mask problem (masks looks 2 parts but outputs only first part)
My code is as shown below:
import numpy as np
from ultralytics import YOLO
from PIL import Image
import cv2
from google.colab.patches import cv2_imshow
model = YOLO("yolov8n-seg.pt")
...
1
vote
1
answer
1k
views
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 ...
0
votes
0
answers
166
views
When to use camera calibration in object detection?
I am trying to find the realistic location of an object using yolov5. but idk if I should use OpenCV camera calibration before running detect.py or use it after the model gave me center x and center y ...
1
vote
1
answer
1k
views
How to call yolov7 detect method from a python program
So far, I am using detect.py with appropiate arguments for the object detection tasks, using a custom trained model.
How can I call the detect method with the parameters(weights, source, conf, and ...
0
votes
0
answers
247
views
How to get coco metric for custom dataset on yolov5
I trained yolov5 on custom dataset having coco annotation file and got prediction.json file. My question is how I can get coco metric using custom dataset.
0
votes
1
answer
879
views
Issues in eliminate multiple bounding box in YoloV5 using C++ for custom model
I tried to perform object detection using the yolov5 model with c++. I have a custom-trained yolov5 model which is working perfectly fine in python but my whole complete setup is in c++ thereby I have ...
0
votes
1
answer
601
views
How to avoid False positives in yolov5 object detection?
I am training a yolov5 model for golf ball detection. I am facing serious issues with false detection as the color of golf ball is white. The model is detecting similar shapes with white color as golf ...
1
vote
0
answers
634
views
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 ...
-1
votes
1
answer
275
views
YOLOv5 Training Shift Bounding box to left
I'm trying to train my YOLOv5 to recognize car
That's a simple image in training folder
and inside my label i put this bounding box
i resize image and bounding box from 1000x750 to 640x640
and i ...
0
votes
1
answer
1k
views
Retrieve confidence value Yolov5
I'm using this code to load the yolov5 model model = torch.hub.load('ultralytics/yolov5', 'custom', 'C:\Object Detection\yolov5_object_detection\last.pt') and how can I retrieve the confidence value ...
-1
votes
1
answer
1k
views
how do we extract the xyxy coordinates of the yolov5 detection image and crop it?
import cv2
import numpy as np
import torch
import pandas
import os
# Load the trained model
model = torch.hub.load('ultralytics/yolov5', 'custom', path='C:/Users/ASUS/Desktop/yolov5-fastapi-main/...
0
votes
0
answers
789
views
Creating balanced dataset for YOLO v5 with each image having multiple annotations
Currently using the YOLO v5 code from this https://github.com/ultralytics/yolov5 in which each txt has a line referring to the <object-class> <x> <y> <width> <height> (...
1
vote
0
answers
784
views
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 ...
1
vote
1
answer
1k
views
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", "...
-1
votes
1
answer
495
views
Automatic image labelling for custom training YOLOv5
There are manual tools like Makesense.ai to create the labelled data for custom training YOLO, but is there any method for automatic labelling of multiple objects in an image so that the image ...
0
votes
0
answers
118
views
When detecting a brand logo Using 'Yolov7' how to label better results?
While using 'yolov7'
When labeling to detect the brand logo, is it good to label the letter logo in a large box format? Or is it better to label delicately according to the shape of the letters?
Logo ...
0
votes
0
answers
267
views
Can yolov7 detect very tiny objects from thermal images?
I was using yolov5 to detect animals on the sea surface.
but yolo had a difficult time doing it because the waves were also similar in shape and color to the birds (lots of false positives). And when ...
1
vote
1
answer
2k
views
Yolov5 with OpenCV
I trained a model using the Yolov5 Google Colab notebook with custom data and classes.
I used the detect.py script to do object detection on a video with no issues.
I downloaded the .pt file and ...
0
votes
1
answer
441
views
How to increase the accuracy of Obj detection yolov7 model trained on landscape or square images and tested on android camera imgs which are portrait?
I trained my object detection model on custom data downloaded from google and open-source data available and I am currently using this model for an android phone camera stream but the accuracy is low. ...