Closed DongWan0285 closed 1 year ago
It's hard to say why real-time processing is not achieved as it varies from case to case. Try to do a speed analysis to see where your chokepoint is at, most likely the detection inference step. This repo simply provides a library to fit multi-object tracking into a video analytics pipeline designed to take in real-time video streams.
Hi, First of all, thank you for sharing the code. I am trying to use this library in ROS. Below is my code, but real-time processing is not achieved.
from deep_sort_realtime.deepsort_tracker import DeepSort import numpy as np from datetime import datetime
today = datetime.now().date() os.environ["OMP_NUM_THREADS"] = "1" os.environ["OPENBLAS_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" os.environ["VECLIB_MAXIMUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1"
class ImageProcessor: def init(self, max_age, embedder): self.bridge = CvBridge() self.tracker = DeepSort(max_age=max_age, embedder=embedder) self.current_frame = None # Variable to store the most recent frame
def main(max_age,embedder): rospy.init_node('image_processor', anonymous=True) ip = ImageProcessor(max_age, embedder) try: rospy.spin() except KeyboardInterrupt: print("Shutting down")
if name == 'main':
Initialize your max_age here