LeonLok / Multi-Camera-Live-Object-Tracking

Multi-camera live traffic and object counting with YOLO v4, Deep SORT, and Flask.
GNU General Public License v3.0
981 stars 285 forks source link

How to avoid same object being counted twice #41

Closed sparshgarg23 closed 2 years ago

sparshgarg23 commented 2 years ago

In readme,you have mentioned that each object is being counted once,how do you ensure that the object is counted only once,what if that same object was viewed from a different camera,wouldn't that result in being counted twice.

LeonLok commented 2 years ago

Yes, the object would be counted twice if the object was being viewed from a different camera. This app was meant for multiple cameras viewing different areas.

What I'm referring to in the README is this:

If a vehicle has stopped on the counting line, e.g. in a start-stop traffic scenario, it's possible for the vehicle's tracking point to hover over the counting line. This might make the tracking point cross the counting line multiple times. However, because the vehicle will have an object tracking ID, it will not be counted more than once. If the tracking model fails and gives the same vehicle a new tracking ID then it will count the vehicle again.