Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to know what is the detection square values? #5989

Closed
1 task done
AvishayDev opened this issue Dec 15, 2021 · 2 comments
Closed
1 task done

How to know what is the detection square values? #5989

AvishayDev opened this issue Dec 15, 2021 · 2 comments
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@AvishayDev
Copy link

Search before asking

Question

Hello,
Thanks G-d i success to build a working object detector as i need.
however i need more information about the detection that the model found..

i run this command to detect-
!python detect.py --weights runs/train/exp/weights/best.pt --img 640 --conf 0.1 --source {dataset.location}/test/images

and i try this script too-
model = torch.hub.load('/content/yolov5', 'custom', path='/content/yolov5/runs/train/exp/weights/best.pt', force_reload=True, source='local')
img = '/content/datasets/final-hebrew-1/test/images/test.jpeg'
results = model(img)
results.print()
=> image 1/1: 640x640 1 Aleph
Speed: 23.9ms pre-process, 87.7ms inference, 2.6ms NMS per image at shape (1, 3, 640, 640)

i cant understand from this infoemation were the detection was in my image..
please help!!
Thanks

Additional

No response

@AvishayDev AvishayDev added the question Further information is requested label Dec 15, 2021
@glenn-jocher
Copy link
Member

glenn-jocher commented Dec 15, 2021

@AvishayDev

Simple Example

This example loads a pretrained YOLOv5s model from PyTorch Hub as model and passes an image for inference. 'yolov5s' is the lightest and fastest YOLOv5 model. For details on all available models please see the README.

import torch

# Model
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')

# Image
img = 'https://ultralytics.com/images/zidane.jpg'

# Inference
results = model(img)

results.pandas().xyxy[0]
#      xmin    ymin    xmax   ymax  confidence  class    name
# 0  749.50   43.50  1148.0  704.5    0.874023      0  person
# 1  433.50  433.50   517.5  714.5    0.687988     27     tie
# 2  114.75  195.75  1095.0  708.0    0.624512      0  person
# 3  986.00  304.00  1028.0  420.0    0.286865     27     tie

See YOLOv5 PyTorch Hub tutorial for details:

YOLOv5 Tutorials

Good luck 🍀 and let us know if you have any other questions!

@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2022

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants