-
Notifications
You must be signed in to change notification settings - Fork 754
Description
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)