using yolox+deepsort for object-tracker

Overview

YOLOX_deepsort_tracker

yolox+deepsort实现目标跟踪

最新的yolox尝尝鲜~~(yolox正处在频繁更新阶段,因此直接链接yolox仓库作为子模块)

Install

  1. Clone the repository recursively:

    git clone --recurse-submodules https://github.com/pmj110119/YOLOX_deepsort_tracker.git

    If you already cloned and forgot to use --recurse-submodules you can run git submodule update --init(clone最新的YOLOX仓库)

  2. Make sure that you fulfill all the requirements: Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install, run:

    pip install -r requirements.txt

Select a YOLOX family model

  1. train your own model or just download pretrained models from https://github.com/Megvii-BaseDetection/YOLOX

  2. update the type and path of model in detector.py

    for example:

    class Detector(BaseDetector):
    	""" 
    	YOLO family: yolox-s, yolox-m, yolox-l, yolox-x, yolox-tiny, yolox-nano, yolov3
    	"""
        def init_model(self):
            self.yolox_name = 'yolox-m' 
            self.weights = 'weights/yolox_m.pth'
            
        """ """

Run demo

Track the video:

python demo.py

Detect the image:

coming soon...

Filter tracked classes

coming soon...

Train your own model

coming soon...

Comments
  • Some error occurs while running the demo.

    Some error occurs while running the demo.

    Traceback (most recent call last): File "demo.py", line 52, in track_cap(args.path) File "demo.py", line 34, in track_cap image,_ = tracker.update(im) File "G:\YOLOX_deepsort_tracker-master\tracker.py", line 27, in update info = self.detector.detect(image, visual=False) File "G:\YOLOX_deepsort_tracker-master\detector.py", line 55, in detect info['boxes'] = outputs[:, 0:4]/ratio TypeError: 'NoneType' object is not subscriptable

    bug 
    opened by dianzai 1
  • Could not install requirements

    Could not install requirements

    I create a new anaconda environment based on python 3.9.6.

    Then I simply run pip install -r requirements.txt I got the error message:

    ERROR: Could not find a version that satisfies the requirement torchvision==0.10.0+cu111 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.8.2, 0.9.0, 0.9.1, 0.10.0) ERROR: No matching distribution found for torchvision==0.10.0+cu111

    My system has the following specs: CPU: Core I5, 11500 GPU: GTX1080 Nvidia driver version: 470.57.02, CUDA version: 11.4

    opened by GiorgosBetsos 1
  • Update detector.py

    Update detector.py

    https://github.com/pmj110119/YOLOX_deepsort_tracker/blob/d7dd53b41d71e6bf182d83591b0aee1b543bbf6b/detector.py#L9

    running demo.py // im facing this error.. from YOLOX.yolox.exp import get_exp_by_name ImportError: cannot import name 'get_exp_by_name' from 'YOLOX.yolox.exp'

    opened by bharath5673 1
  • While running the demo.py, the following error occurs.

    While running the demo.py, the following error occurs.

    (YOLOX_deepsort_tracker) sumyatnoe@MSI:/mnt/d/PycharmProjects/YOLOX_deepsort_tracker$ python demo.py --path=test.mp4 /mnt/d/PycharmProjects/YOLOX_deepsort_tracker/deep_sort/utils/parser.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.update(yaml.load(fo.read())) /home/sumyatnoe/.local/lib/python3.8/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Trigge red internally at ../aten/src/ATen/native/TensorShape.cpp:2157.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]

    opened by ImSuMyatNoe 0
  •  super(type, obj): obj must be an instance or subtype of type

    super(type, obj): obj must be an instance or subtype of type

    .\YOLOX_deepsort_tracker\detector.py", line 24, in init super(Detector, self).init()

    TypeError: super(type, obj): obj must be an instance or subtype of type

    How can i fix this error ?

    opened by Comodor-64 0
  • AttributeError: 'NoneType' object has no attribute 'cpu'

    AttributeError: 'NoneType' object has no attribute 'cpu'

    hi , please can you help me I was doing every step , but i face this problem in detector.py : YOLOX_deepsort_tracker/detector.py", line 51, in detect outputs = postprocess( AttributeError: 'NoneType' object has no attribute 'cpu'

    the code in detecto.py is : with torch.no_grad(): outputs = self.model(img) outputs = postprocess( outputs, self.exp.num_classes, self.exp.test_conf, self.exp.nmsthre # TODO:用户可更改 )[0].cpu().numpy()

    opened by Peac12 0
  • load() missing 1 required positional argument: 'Loader'

    load() missing 1 required positional argument: 'Loader'

    Traceback (most recent call last): File "/home/kerwin/KeTrack/demo.py", line 59, in track_images(args.path) File "/home/kerwin/KeTrack/demo.py", line 10, in track_images tracker = Tracker(model='yolox-s', ckpt='weights/yolox_s.pth',filter_class=['person']) File "/home/kerwin/KeTrack/tracker.py", line 18, in init cfg.merge_from_file("deep_sort/configs/deep_sort.yaml") File "/home/kerwin/KeTrack/deep_sort/utils/parser.py", line 23, in merge_from_file self.update(yaml.load(fo.read())) TypeError: load() missing 1 required positional argument: 'Loader'

    opened by Kerwin0621 2
  • Bounding box not align with the actual object

    Bounding box not align with the actual object

    visualize的时候我额外输出了一些信息,但是deepsort和yolox的代码我没改,我是每秒track一次,视频fps是25,可以看 到以下连续两次track(frame475和frame500),第二次画出来的框其实是前一次那辆车所在的位置,请问为什么会这样呢?有没有什么方法可以修正?谢谢。 475 500

    opened by coranholmes 0
Owner
null
YOLOX-Paddle - A reproduction of YOLOX by PaddlePaddle

YOLOX-Paddle A reproduction of YOLOX by PaddlePaddle 数据集准备 下载COCO数据集,准备为如下路径 /ho

QuanHao Guo 6 Dec 18, 2022
YOLOX-CondInst - Implement CondInst which is a instances segmentation method on YOLOX

YOLOX CondInst -- YOLOX 实例分割 前言 本项目是自己学习实例分割时,复现的代码. 通过自己编程,让自己对实例分割有更进一步的了解。 若想

DDGRCF 16 Nov 18, 2022
Object tracking implemented with YOLOv4, DeepSort, and TensorFlow.

Object tracking implemented with YOLOv4, DeepSort, and TensorFlow. YOLOv4 is a state of the art algorithm that uses deep convolutional neural networks to perform object detections. We can take the output of YOLOv4 feed these object detections into Deep SORT (Simple Online and Realtime Tracking with a Deep Association Metric) in order to create a highly accurate object tracker.

The AI Guy 1.1k Dec 29, 2022
AI-Fitness-Tracker - AI Fitness Tracker With Python

AI-Fitness-Tracker We have build a AI based Fitness Tracker using OpenCV and Pyt

Sharvari Mangale 5 Feb 9, 2022
Vehicles Counting using YOLOv4 + DeepSORT + Flask + Ngrok

A project for counting vehicles using YOLOv4 + DeepSORT + Flask + Ngrok

Duong Tran Thanh 37 Dec 16, 2022
Yolov5 deepsort inference,使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中

使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中。

null 813 Dec 31, 2022
yolov5 deepsort 行人 车辆 跟踪 检测 计数

yolov5 deepsort 行人 车辆 跟踪 检测 计数 实现了 出/入 分别计数。 默认是 南/北 方向检测,若要检测不同位置和方向,可在 main.py 文件第13行和21行,修改2个polygon的点。 默认检测类别:行人、自行车、小汽车、摩托车、公交车、卡车。 检测类别可在 detect

null 554 Dec 30, 2022
StrongSORT: Make DeepSORT Great Again

StrongSORT StrongSORT: Make DeepSORT Great Again StrongSORT: Make DeepSORT Great Again Yunhao Du, Yang Song, Bo Yang, Yanyun Zhao arxiv 2202.13514 Abs

null 369 Jan 4, 2023
YOLOX + ROS(1, 2) object detection package

YOLOX + ROS(1, 2) object detection package

Ar-Ray 158 Dec 21, 2022
Real-time multi-object tracker using YOLO v5 and deep sort

This repository contains a two-stage-tracker. The detections generated by YOLOv5, a family of object detection architectures and models pretrained on the COCO dataset, are passed to a Deep Sort algorithm which tracks the objects. It can track any object that your Yolov5 model was trained to detect.

Mike 3.6k Jan 5, 2023
Object tracking using YOLO and a tracker(KCF, MOSSE, CSRT) in openCV

Object tracking using YOLO and a tracker(KCF, MOSSE, CSRT) in openCV File YOLOv3 weight can be downloaded

Ngoc Quyen Ngo 2 Mar 27, 2022
FairMOT for Multi-Class MOT using YOLOX as Detector

FairMOT-X Project Overview FairMOT-X is a multi-class multi object tracker, which has been tailored for training on the BDD100K MOT Dataset. It makes

Jonathan Tan 33 Dec 28, 2022
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with ONNX, TensorRT, ncnn, and OpenVINO supported.

Introduction YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and ind

null 7.7k Jan 3, 2023
MegEngine implementation of YOLOX

Introduction YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and ind

旷视天元 MegEngine 77 Nov 22, 2022
yolox_backbone is a deep-learning library and is a collection of YOLOX Backbone models.

YOLOX-Backbone yolox-backbone is a deep-learning library and is a collection of YOLOX backbone models. Install pip install yolox-backbone Load a Pret

Yonghye Kwon 21 Dec 28, 2022
a Pytorch easy re-implement of "YOLOX: Exceeding YOLO Series in 2021"

A pytorch easy re-implement of "YOLOX: Exceeding YOLO Series in 2021" 1. Notes This is a pytorch easy re-implement of "YOLOX: Exceeding YOLO Series in

null 91 Dec 26, 2022
load .txt to train YOLOX, same as Yolo others

YOLOX train your data you need generate data.txt like follow format (per line-> one image). prepare one data.txt like this: img_path1 x1,y1,x2,y2,clas

LiMingf 18 Aug 18, 2022
A set of tools for converting a darknet dataset to COCO format working with YOLOX

darknet格式数据→COCO darknet训练数据目录结构(详情参见dataset/darknet): darknet ├── class.names ├── gen_config.data ├── gen_train.txt ├── gen_valid.txt └── images

RapidAI-NG 148 Jan 3, 2023
YOLOX Win10 Project

Introduction 这是一个用于Windows训练YOLOX的项目,相比于官方项目,做了一些适配和修改: 1、解决了Windows下import yolox失败,No such file or directory: 'xxx.xml'等路径问题 2、CUDA out of memory等显存不

null 5 Jun 8, 2022