How to tracking multiple vehicle (e.g car and motorcycle) using haar cascade classifier?
I make a detection of a vehicle running a red light using Viola Jones. however, I was confused when doing training, did I produce just 1 xml file for two types of vehicles or one 1 xml vehicle? Thank you
no, you cannot train a cascade for 2 different object types
please also note, that the tools to train cascades are no more available in recent opencv
in the end -- rather look at cnn based object detection, opencv supports a lot of pretrained models with various vehicle types.
If you are trying to detect vehicles, your training set should contain multiple images of different vehicles. After training, you get one model for the vehicle class that should be able to detect different types of vehicles.
@berak By recent OpenCV, are you referring to version 3.x or 4.x? The tools to train Haar cascades still seem to exist in the 3.x version.
no, not with cascades. yes, with a cnn.
3.x still has the tools, 4.x not so.