Vertical-Beach / ByteTrack-cpp

C++ implementation of ByteTrack that does not include an object detection algorithm.
MIT License
150 stars 29 forks source link

怀疑存在内存泄漏 #11

Open crazybill-first opened 2 years ago

crazybill-first commented 2 years ago

我尝试用该工程测试一组视频,检测器是yolov5s。该工程会有缓慢的内存泄漏,超过两个小时运行速度明显变慢,内存使用会不断增加

crazybill-first commented 2 years ago

我尝试用该工程测试一组视频,检测器是yolov5s。该工程会有缓慢的内存泄漏,超过两个小时运行速度明显变慢,内存使用会不断增加

当我不使用跟踪时,系统运行会很稳定

Pe4nutZz commented 2 years ago

请问这个问题后来有解决吗

lp6m commented 2 years ago

Please describe the detail

Pe4nutZz commented 2 years ago

就是上面这个同学描述的内存泄漏现象,我这边这使用该工程也发现了这种情况

lp6m commented 2 years ago

Please provide a detailed situation about what kind of memory leak occurred and under what circumstances. We welcome pull requests.

AliaChen commented 1 year ago

同样怀疑存在内存泄漏问题,请问各位大佬解决了吗?

gujiacheng commented 1 year ago

BYTETracker类中的变量 std::vector removedstracks; 在update方法中没有及时清理,导致随着update方法的不断被调用vector的size持续膨胀,不断占用内存,导致oom,在方法最后做了简单判断: if(removedstracks.size() > 500) { std::vector().swap(removedstracks); } 之后内存、帧率稳定,问题解决;当然这只是针对问题的临时解决方法,还需要了解bytetracker具体逻辑之后对removed_stracks_进行合理的维护

gujiacheng commented 1 year ago

Please provide a detailed situation about what kind of memory leak occurred and under what circumstances. We welcome pull requests.

notice that size of std::vector removedstracks in BYTETracker.h would keep on rising by keeping calling function update

yuanxmangel commented 1 year ago

请问在循环处理多个视频时,想要处理完一个视频就释放bytetrack算法占用的所有内存,具体应该如何做呢?

JUZXF commented 7 months ago

hello,请问 代码中的update 是每个box 都要运行一次的吗 。我现在是多目标所以,但是它只跟踪一个框