-
Notifications
You must be signed in to change notification settings - Fork 78
Description
Hi, thank you for providing a c++ implementation of DS. I am facing some issues with memory during the execution of the program. I am using opencv to read frames from the camera, pass it through a yolo object detector, then pass the bounding boxes to DS through UpdateAndGet.
However, sometimes while tracking, the program will crash out with the error msgs:
*** Error in `./DeepSort': free(): invalid next size (fast): 0x00000000021209b0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f63e050c7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f63e051537a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f63e051953c]
./DeepSort[0x42ac07]
./DeepSort[0x42e070]
./DeepSort[0x419c01]
./DeepSort[0x41a06d]
./DeepSort[0x41b8f6]
./DeepSort[0x41e0de]
./DeepSort[0x4361c4]
./DeepSort[0x411153]
./DeepSort[0x405f3d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f63e04b5830]
./DeepSort[0x406719]
........
I dumb-ed down the program by removing the object detection part, and just giving deep sort a random bounding box that jitters around with each incoming frame (such that the tracker would still initiate and track a track). In fact, at a jitter of 0 pixels, aka a random FIXED bounding box, the memory error will not occur even after a long time. However, given a large enough jitter (like 10+ pixels), after awhile the memory error will throw. We suspect it's because of a memory leak issue.
Tracing where the program throws through print statements: UpdateAndGet -> FDSSTTracker::init -> FDSSTTracker::dsstInit -> FDSSTTracker::train_scale, FDSSTTracker::get_scale_sample, fhog, and it throws around here.
Any ideas? Thanks!