DS 6.4

I’m trying to understand, why nvtracker sometimes declares one and the same object as two distinct objects. I think, I understand, that this is possible, because it is detection, not recognition.

I’m having a video feed, from which I count cars, which are passing by from right to left. I further limit the detection area by a virtual fence applied to the detections.

I occasionally observe instances of double detections, where only one car is present but two are being counted. I have the video display adjacent, allowing me to confirm this discrepancy.

I was able to break down the cause to the fact, that DS reports me two different objects (trackingIDs).

Here the raw data. Showing frame number and a string, combining trackingID, boundingBox.left, right, width and height, probability and type.

8267, "678|1212|408|68|77|0.68|car",          
8268, "678|1198|407|82|80|0.59|car",
8269, "678|1195|408|85|93|0.54|car",

8275, "679|1139|402|141|119|0.70|car",
8276, "679|1130|401|150|121|0.70|car",
8277, "679|1130|401|150|121|0.77|car",      !! same coords, different prob
8278, "679|1118|402|162|121|0.72|car",
8279, "679|1106|399|174|125|0.64|car",
8280, "679|1096|397|184|128|0.67|car",
8281, "679|1084|398|196|126|0.61|car",
8282, "679|1070|397|206|129|0.61|car",
8283, "679|1070|397|206|129|0.71|car",      !! same coords, different prob
8284, "679|1058|398|207|127|0.71|car",
8285, "679|1041|397|218|128|0.61|car",
8286, "679|1031|397|212|129|0.68|car",
8287, "679|1014|395|216|131|0.66|car",
8288, "679|1003|394|220|131|0.65|car"
8289, "679|1002|394|220|131|0.73|car"
8290, "679|987|395|227|132|0.66|car"
8291, "679|971|394|248|133|0.66|car",
8292, "679|959|394|238|134|0.60|car",
8293, "679|945|395|244|133|0.59|car"
8294, "679|931|393|239|135|0.52|car",

I visualized the detections:

First the three 678 detections in red, which are then overlapped by a - seemingly - new object 679. The car was moving from right to left, so the detections itself do make sense. I’m wondering, if the “pop-up” of the bounding box made the nvtracker decide to treat it as two objects?

No idea so far how to deal with this…

Seems the BBoxes have big change between red and blue BBoxes. It will cause ID switch in nvtracker. Is it possible to improve detector?

The detector is nvinfer running a yolov7-tiny model. What ways to improve do you have in mind?

OK, here we have yet another case of double detections. Maybe this could be filtered, but I’m not sure, if the filter produces new question marks…

There is a car 497, which in the first detection is tagged as 496. Only for one detection in one frame.

Here it comes into the scene, not yet tagged:

In the next frame it is tagged as 496:

Then the detection disappears for 4-5 frames and returns as 497 for a longer time.

Since I’m not filtering this car is counted twice.

Maybe these are the edge cases, which make AI a promise, not a working technology nowadays …

For interested readers: I’m observing a street in Romania (I guess), I’m using this life feed. WATCH LIVE - Promenada Codlea | Live gallery | CamStreamer

I have chosen this, because it is narrow and there are not too much cars to count at a time. The “virtual fence/hotzone”, which needs to be passed is shown here:

I’m not sure by what means this can be solved

Here is the screen recording of the case. Beeps are detections. Just a few seconds

Can you have a try with TrafficCamNet + NvDCF: Gst-nvtracker — DeepStream documentation 6.4 documentation?

Thar should be doable, but I don’t expect better results

Also here double detections.

Do you mean the issue which object id changed from 496 to 497 in above picture? Can below nvtracker configure help?

enableBboxUnClipping: 1

Tried that already, didn’t seem to change that for me.

If objects gradually show up to FOV, it inherently has partial-occlusion until the object is fully visible. Under such partial occlusions, the bbox characteristics (size, aspect ratio, etc) changes rapidly and the visual appearance also changes within the bbox. So, it is expected that there could be some ID switch happens until the object is fully visible.

So, I would recommend to set your ROI toward the center of the bbox. Your current ROI is too close to the edge of the image border.

This is exactly what I did intuitively already and it worked. Thanks