Depending on your surrounding it might be possible.
You could use a cascade object detector and train it to recognize motorcycles from a specific angle. therefor you would need thousands of motorcycle pictures from that specific angle. The same goes for cars, train another detector for cars in the same specific angle.
If you now take a video in said angle you can use those detectors to find and track the cars/motorcycles. Thats just a general idea, i also might not work, but with enough time and training those detectors are really useful for such things.