Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simple Online Realtime Tracking with a Deep Association Metric (extended for 3D bounding boxes)

Notifications You must be signed in to change notification settings

faseelmo/deep_sort_3d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Forked from deep sort.

Changes made

  1. Added support for scipy 0.23 and above. (See issue)
  2. Extended the deep sort model to include height (z-axis) and rotation (yaw) of the bounding box.

Note: The Kalman filter has not been modified to account for rotation and height. Instead, these parameters are stored in the track object as a moving average over the last 10 frames.

Usage

from deep_sort_3d.src.tracker import Tracker as DeepSort3D
from deep_sort_3d.src.detection import Detection
from deep_sort_3d.src.nn_matching import NearestNeighborDistanceMetric

tracker = DeepSort3D(
    metric=NearestNeighborDistanceMetric("cosine", 0.2, 100),
    max_age=30,
    n_init=3
)

# your code here

detection_list = ...  # list[bbox]. bbox = (objectness, (x, y), (w, h), angle, height)

deep_sort_detection_list = []
rotation_list = []
height_list = []

dummy_feature = np.array([1,0]) # dummy feature

for box in detection_list:
  objectness, (x, y), (w, l), angle, height  = box

  deep_sort_detection = Detection((x,y,w,l), objectness, dummy_feature)
  deep_sort_detection_list.append(deep_sort_detection)

  rotation_list.append(angle)
  height_list.append(height)

tracker.predict()
tracker.update(deep_sort_detection_list, rotation_list, height_list)

# Access the tracks
for track in tracker.tracks:
  print(track.track_id)
  print(track.to_tlwh())
  print(track.get_angle())
  print(track.get_height())

About

Simple Online Realtime Tracking with a Deep Association Metric (extended for 3D bounding boxes)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%