El código está funcionando correctamente. Se arreglaron todos los elementos deprecados del código, todos los archivos están en carpeta, y para usar el código con un video en específico, se aplica la siguiente línea en la terminal:
- Clonar proyecto
git clone https://github.com/SamuelEPradoT/YOLOv8-DeepSORT-Object-Tracking.git
- Ir a la carpeta de proyecto
cd YOLOv8-DeepSORT-Object-Tracking
- Instalar dependencias
pip install -e '.[dev]'
pip install torch
- Identificar carpeta del código en cuestión (ahí se dejan los videos input).
cd ultralytics/yolo/v8/detect
- Aplicar código (Video: video_traffic_2.mp4).
python predict.py model=yolov8l.pt source="video_traffic_2.mp4" show=True
El output queda en la carpeta: YOLOv8-DeepSORT-Object-Tracking\runs\detect
- Modificar código para que la línea sea proporcional al tamaño de los frames del video
- Implementar FLASK para que el output sea redirigido a la API.
The google colab file link for yolov8 object detection and tracking is provided below, you can check the implementation in Google Colab, and its a single click implementation, you just need to select the Run Time as GPU, and click on Run All.
- Clone the repository (Proyecto clonado)
git clone https://github.com/SamuelEPradoT/YOLOv8-DeepSORT-Object-Tracking.git
- Goto the cloned folder.
cd YOLOv8-DeepSORT-Object-Tracking
- Install the dependecies
pip install -e '.[dev]'
- Setting the Directory.
cd ultralytics/yolo/v8/detect
- Downloading the DeepSORT Files From The Google Drive (Ya descargado)
https://drive.google.com/drive/folders/1kna8eWGrSfzaR6DtNJ8_GchGgPMv3VC8?usp=sharing
-
After downloading the DeepSORT Zip file from the drive, unzip it go into the subfolders and place the deep_sort_pytorch folder into the yolo/v8/detect folder (Ya descargado)
-
Downloading a Sample Video from the Google Drive (Ya descargado)
gdown "https://drive.google.com/uc?id=1rjBn8Fl1E_9d0EMVtL24S9aNQOJAveR5&confirm=t"
-
Run the code with mentioned command below.
-
For yolov8 object detection + Tracking
python predict.py model=yolov8l.pt source="test3.mp4" show=True
- For yolov8 object detection + Tracking + Vehicle Counting (Esto falta por hacer)
- Download the updated predict.py file from the Google Drive and place it into ultralytics/yolo/v8/detect folder
- Google Drive Link
https://drive.google.com/drive/folders/1awlzTGHBBAn_2pKCkLFADMd1EN_rJETW?usp=sharing
- For yolov8 object detection + Tracking + Vehicle Counting
python predict.py model=yolov8l.pt source="test3.mp4" show=True
- Video Tutorial Link
YouTube Link