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 can I detect only person #165

Open
joohyung0809 opened this issue Nov 4, 2023 · 0 comments
Open

How can I detect only person #165

joohyung0809 opened this issue Nov 4, 2023 · 0 comments

Comments

@joohyung0809
Copy link

joohyung0809 commented Nov 4, 2023

I used deepsort_yolov4 and yolov4 weights to detect and tracking object in my personal video.
I could see many bounding boxes named people, truck, car etc.
But I would like to see only people's bounding box.
How fix code? help me.... (Below code is mine) + I did from Google Colab Thank you

!git clone https://github.com/theAIGuysCode/yolov4-deepsort
%cd yolov4-deepsort
!python save_model.py --model yolov4
!python object_tracker.py --video /content/drive/MyDrive/(my personal video) --output /content/yolov4-deepsort/outputs/tracker.avi --model yolov4 --dont_show --info

import io
from IPython.display import HTML
from base64 import b64encode
def show_video(file_name, width=640):
# show resulting deepsort video
mp4 = open(file_name,'rb').read()
data_url = "data:video/mp4;base64," + b64encode(mp4).decode()
return HTML("""

""".format(width, data_url))
# transform result to mp4 and play
import os
path_video = os.path.join("outputs","tracker.avi")
%cd outputs/
!ffmpeg -y -loglevel panic -i tracker.avi output.mp4
%cd ..

# output object tracking video
path_output = os.path.join("outputs","output.mp4")
show_video(path_output, width=960)

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

1 participant