What is the best way to detect new cars on video frame and track them?
Im trying to write an app to detect, classify cars (with dnn) and track them in the video frames. Clasification works fine for now, but I need to know when new objects appear on the frame so I could track them and which are the old one.
I was thinking about using dnn to get location of the objects so I could track them, but I have no idea how to distinguish new object from the old one, especially that the classification takes about 150 milliseconds per image. Classifying could work in background only on actual frame (it could lose some frames, but it doesn't matter), and tracking could work on images without this 150 ms delay. Every car must have a unique id from beginning to end. It is important for me to get first location of the new object and the last one of the same object.
What would be the best way in your opinion to do such tracking?