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

Counting the object in the detection #1661

Open
AJITKUMAR130012 opened this issue Aug 14, 2024 · 3 comments
Open

Counting the object in the detection #1661

AJITKUMAR130012 opened this issue Aug 14, 2024 · 3 comments

Comments

@AJITKUMAR130012
Copy link

Can you help me in the counting the object that are in the video by using yolov8 and tracking?

@mgoin
Copy link
Member

mgoin commented Aug 20, 2024

The simplest way would be to take the output from the object detection pipeline and count the number of boxes that have the class you are interested in.

@AJITKUMAR130012
Copy link
Author

When we have to count the from in the video then need tracking, But in the yolo pipeline there is no tracking id. That's the issue, even i run on the video.

@AJITKUMAR130012
Copy link
Author

import os
import time
print("Ajit")
st=time.time()
model_path="traffic_best_n.onnx"
output_path="out"
cmd=["deepsparse.yolov8.annotate", "--source", "People2.mp4", "--model_filepath", str(model_path), "--save_dir", output_path]
cmd = ' '.join(cmd)
os.system(cmd)
ed=time.time()
print(ed-st)

I have used the above code for the video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants