Replies: 1 comment 6 replies
-
👋 hi, thanks for letting us know about this possible problem with YOLOv5 🚀. We've created a few short guidelines below to help users provide what we need in order to start investigating a possible problem. How to create a Minimal, Reproducible ExampleWhen asking a question, people will be better able to provide help if you provide code that they can easily understand and use to reproduce the problem. This is referred to by community members as creating a minimum reproducible example. Your code that reproduces the problem should be:
For Ultralytics to provide assistance your code should also be:
If you believe your problem meets all the above criteria, please close this issue and raise a new one using the 🐛 Bug Report template with a minimum reproducible example to help us better understand and diagnose your problem. Thank you! 😃 |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have used your repo for Yolov5 on Jetson Orin. I created a program around your repo and basically just added a consumer/producer pattern and XML output.
Then I re-downloaded your repo and ran inference on two images using the test program.
import torch
#Model
#model = torch.hub.load('Models/YoloV5', 'custom') # or yolov5n - yolov5x6, custom
model = torch.hub.load('.', 'custom', 'best.pt', source='local')
#Images
#img = 'https://ultralytics.com/images/zidane.jpg' # or file, Path, PIL, OpenCV, numpy, list
img = '/mnt/MyBook/Images/TestRun221129_Selection/ID0_AI_Image_104_1000508050.jpg' # or file, Path, PIL, OpenCV, numpy, list
#Inference
results = model(img)
#Results
results.show() #print() # or .show(), .save(), .crop(), .pandas(), etc.
So I use same model as in "my" first program as in the latest downloaded repo. The result is different, in the "old" version I get a detection on both images, but on the latter I only get one hit.
Why is that? The same parameters is used, I did the same thing with the detect.py and
all parameters should be the same, such as
conf_thres=0.25, # confidence threshold
iou_thres=0.45, # NMS IOU threshold
max_det=1000, # maximum detections per image
Any ideas? I can try to post the code here too. I need to clean it first :-|
I saw this, and will check it out but I use Pillow.Image to read the image..
#7627
Your code to read image:
else:
Read image
self.count += 1
im0 = cv2.imread(path) # BGR
assert im0 is not None, f'Image Not Found {path}'
Whereas I
Image.open(fname)
Any pointers to where to start looking would be appreciated. I am sorry for the formatting, its just not going my way..
Beta Was this translation helpful? Give feedback.
All reactions