Smorodov / Multitarget-tracker

Multiple Object Tracker, Based on Hungarian algorithm + Kalman filter.
Apache License 2.0
2.2k stars 652 forks source link

Flickering after adding new detector #107

Open deimsdeutsch opened 6 years ago

deimsdeutsch commented 6 years ago

Hi,

I have integrated a custom face detector in your code but i have noticed that the video is flickering.

Tracker Settings

        TrackerSettings settings;
        settings.m_useLocalTracking = m_useLocalTracking;
        settings.m_distType = tracking::DistJaccard;
        settings.m_kalmanType = tracking::KalmanUnscented;
        settings.m_filterGoal = tracking::FilterRect;
        settings.m_lostTrackType = tracking::TrackKCF;    // Use KCF tracker for collisions resolving
        settings.m_matchType = tracking::MatchHungrian;
        settings.m_dt = 0.3f;                             // Delta time for Kalman filter
        settings.m_accelNoiseMag = 0.1f;                  // Accel noise magnitude for Kalman filter
        settings.m_distThres = 0.8f;           // Distance threshold between region and object on two frames
        settings.m_maximumAllowedSkippedFrames = m_fps;   // Maximum allowed skipped frames
        settings.m_maxTraceLength = 5 * m_fps;            // Maximum trace length

Also flickering increased if i change m_lostTrackType to TrackNone Also the response time is below 30 ms

Frame 189: tracks = 16, time = 27
Frame 190: tracks = 18, time = 28
Frame 191: tracks = 19, time = 26
Frame 192: tracks = 19, time = 27
Frame 193: tracks = 19, time = 28
Frame 194: tracks = 17, time = 28
Frame 195: tracks = 17, time = 28
Frame 196: tracks = 17, time = 28
Frame 197: tracks = 18, time = 27
Frame 198: tracks = 18, time = 28
Frame 199: tracks = 18, time = 28
Frame 200: tracks = 17, time = 27
Frame 201: tracks = 16, time = 27
Frame 202: tracks = 13, time = 28
Frame 203: tracks = 12, time = 28
Frame 204: tracks = 12, time = 27
Frame 205: tracks = 12, time = 28
Frame 206: tracks = 12, time = 28
Frame 207: tracks = 12, time = 28
Frame 208: tracks = 12, time = 28
Frame 209: tracks = 12, time = 28
Frame 210: tracks = 15, time = 28
Frame 211: tracks = 15, time = 28
Frame 212: tracks = 15, time = 28
Frame 213: tracks = 15, time = 27
Frame 214: tracks = 17, time = 28
Frame 215: tracks = 17, time = 28
Frame 216: tracks = 17, time = 28
Frame 217: tracks = 17, time = 28
Frame 218: tracks = 16, time = 28
Frame 219: tracks = 15, time = 28
Frame 220: tracks = 15, time = 28
Frame 221: tracks = 13, time = 28
Frame 222: tracks = 14, time = 28
Frame 223: tracks = 15, time = 28
Frame 224: tracks = 16, time = 28
Frame 225: tracks = 15, time = 28
Frame 226: tracks = 15, time = 28
Frame 227: tracks = 16, time = 29
Frame 228: tracks = 17, time = 28
Frame 229: tracks = 17, time = 28
Frame 230: tracks = 17, time = 29
Frame 231: tracks = 17, time = 28
Frame 232: tracks = 17, time = 30
Frame 233: tracks = 17, time = 29
Frame 234: tracks = 18, time = 29
Frame 235: tracks = 18, time = 29
Frame 236: tracks = 18, time = 29
Frame 237: tracks = 19, time = 29
Frame 238: tracks = 19, time = 29
Frame 239: tracks = 20, time = 29
Frame 240: tracks = 20, time = 29
Frame 241: tracks = 21, time = 28
Frame 242: tracks = 21, time = 29
Frame 243: tracks = 21, time = 28
Frame 244: tracks = 22, time = 29
Frame 245: tracks = 22, time = 28
Frame 246: tracks = 25, time = 29
Frame 247: tracks = 27, time = 28
Frame 248: tracks = 27, time = 28
Frame 249: tracks = 27, time = 27
Frame 250: tracks = 26, time = 28
Frame 251: tracks = 25, time = 28
Frame 252: tracks = 24, time = 27
Frame 253: tracks = 26, time = 28
Frame 254: tracks = 26, time = 28

Any idea why it is flickering ?

Nuzhny007 commented 6 years ago

I need more information: Linux or Windows? Backend for highgui: GTK, Qt, Qt+OpenGL, Win GDI? Your face detector uses GPU or not? If you use another detector than...

deimsdeutsch commented 6 years ago

On Windows. OpenGL. Face Detector uses CPU.

But when i run the normal HaarCascade Face Detector it does not flicker. Also i have noticed when i use trackers which are slow it does not flicker. May be it is unable to work with faster response times from the detector.

deimsdeutsch commented 6 years ago

@Nuzhny007 Any resolution or do you need more info ?

Nuzhny007 commented 6 years ago

I don't have windows desktop now. I think you can use random generator for the faces rectangles. Or OpenVINO face detector. I try reproduce your bug in the near time (in 2-3 days).

Nuzhny007 commented 6 years ago

Unfortunately, I could not repeat this problem.

dexception commented 6 years ago

Checked the same on Ubuntu. This is definitely an issue.

Nuzhny007 commented 6 years ago

Hmm. Do you can show video with this effect?