YOLOv5에 Deepsort 알고리즘을 적용한 코드를 Google Colab에서 실행시킬 수 있는 코드입니다.
  • 설치 명령어
!git clone --recurse-submodules https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch.git
cd Yolov5_DeepSort_Pytorch
!pip install -r requirements.txt

  • 실행 코드
# python track.py --source 0 # webcam
#                            img.jpg  # image
#                            vid.mp4  # video
#                            path/  # directorㄴy
#                            path/*.jpg  # glob
#                            'https://youtu.be/Zgi9g1ksQHc'  # YouTube
#                            'rtsp://example.com/media.mp4'  # RTSP, RTMP, HTTP stream
                        

!python track.py --source f1.mp4 --save-vid --strong-sort-weights osnet_x0_25_msmt17.pt

# by adding  --strong-sort-weights osnet_x0_25_msmt17.pt .this weight will get installed automatically in your current working directory.
# After this command, you will get run folder with the results

#!python track.py --source img.jpg
출처 :

카테고리:

업데이트:

댓글남기기