Git Product home page Git Product logo

sort-cpp's Introduction

Anurag's github stats

sort-cpp's People

Contributors

yasenh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sort-cpp's Issues

Infinity cycle

Reproduced on g++ 7.5.0, g++ 10.3.0, clang 11.0.0.

Sample leads to tracker.Run() infinity cycle:

#include <opencv2/core.hpp>

#include "tracker.h"

int main(int argc, const char *argv[]) {

    Tracker tracker;

    std::vector<std::vector<cv::Rect>> all_detections = {
        {cv::Rect(15, 4, 12, 2)},
        {cv::Rect(15, 4, 6, 2)},
        {cv::Rect(15, 4, 2, 2)},
        {cv::Rect(12, 5, 5, 2)},
    };

    for (auto det : all_detections) {
        tracker.Run(det); // On the last `det` munkers algorithm stucks in infinity cycle.
    }

}

Reason:

Kalman filter prediction hasn't zero bounds on width and height (in this code block problem in width, see logs below). So track object that is built from Kalman prediction can be with negative width/height.

Track area will be negative if one of the track's width/height is negative and other is positive. So it can be case (like in code block) when
formula in Tracker::CalculateIou float union_area = det_area + trk_area - intersection_area; equals zero and auto iou = intersection_area / union_area; got zero devision which leads iou==(+/-)nan.

Some logs:

1)
Track::ConvertStateToBbox rect:[12 x 2 from (15, 4)]
Tracker::CalculateIou det_area:12 trk_area:24 intersection_area:12 iou:0.5

2)
Track::ConvertStateToBbox rect:[0 x 2 from (15, 4)]
Tracker::CalculateIou det_area:4 trk_area:0 intersection_area:0 iou:0

3)
Track::ConvertStateToBbox rect:[-5 x 2 from (14, 4)]
Tracker::CalculateIou det_area:10 trk_area:-10 intersection_area:0 iou:-nan  << !!!!!

4)
Track::ConvertStateToBbox rect:[2 x 2 from (15, 4)]
Tracker::CalculateIou det_area:10 trk_area:4 intersection_area:2 iou:0.166667

Infinity cycle here because Munker's matrics have `-nan` from step 3.

Pull request with bugfix will be soon.

Python package for SORT algorithm

Hi
Thanks for your great work. I've written python bindings and a package for SORT algorithm using this repository. Other python packages which I had found were implemented in python and performed slowly, so I decided to use C++ behind and wrote this module. It also can be installed via pip.

https://github.com/MrGolden1/sort-python

If you wish, include the link in your README.

Thank you!

Performance results

@yasenh thanks for wonderful source code , i had few quereis

  1. the performance results are low compared to https://github.com/mcximing/sort-cpp
  2. is this the similar implementation or different
  3. what all fine tuning has to be done in the code
  4. will this work 3d object tracking also

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.