Detecting moving objects


I would like to detect moving objects like cars on highways in contrast to cars parked along a road or in a parking lot using non-video imagery. Would this be possible if I define bounding boxes much larger than the car itself? Having a road surface part of object of interest might not identify parked cars since there would not be a road surface all around the car. Naturally this approach would not work for highway scenes with heavy traffic since sufficient open road surfaces would not be available.

Would there be anything else applicable for single images (non-video)?


The context of a “moving” car is key here. A car moving at 1mph at the time of the photo vs. a completely parked car? A car moving at 10mph at the time of the photo vs. a completely parked car?

It sounds like you’re talking about a few different projects here, one for road type classification to say whether cars the present cars in images are moving or stationary and another project for classifying whether detected cars in images are stationary or moving.

In terms of a direct approach to accomplish this, I’m not sure about still images. Object detection and tracking on video sounds like your best bet, but you could also look at successive frame comparisons on single images?

What are the actionable goals of the project, and is there a technical constraint resulting in photo vs. video?


Thank you for your response. I guess I did not state my question very well. My interest is not knowing if the object is moving but if anything is around the object. I chose an example of a car as the object. A car on a isolated road will have nothing around it in contrast to a car in a parking lot, regardless the the speed.

The general guidance for bounding box size is to make it no larger than the object itself. If a bounding box is place around an isolated care on a road but having the bounding box larger that the car, will detection occur when a car is next to other cars or other objects? Does having a larger bounding box with no other structure between the car and the bounding box make it an unique object and different when the bounding box is next to the car?

Your thoughts?


The general guidance for bounding box size is to make it no larger than the object itself.
This is the guidance as object detection is classification + localization. You are not only detecting the object’s class but locating it spatially (and the outputted detection point is the center of the bounding box).

If you are creating bounding boxes larger than the cars, then you will be teaching your model that a car has other features, in this case: the road is a car feature, other items on the ground within the bounding box as car features - we would not want this as we are creating a car detector.

Having the larger bounding boxes will just result in more skewed training results and unreliable detections.

I recommend trying one of these:

  1. Bounding box object detection project with 2 classes: “stationary car” and “moving car” (label each and every car in every image by class)
  2. Bounding box object detection project with 1 class: “car” (label each and every car in every image) – perform post-processing to look at the blur level of pixels within cropped bounding box detection frames to see if this metric can be used for differentiating “still” vs. “moving” cars. Just note the high amount of variability in results if the camera ever shakes when capturing the image, or the pole the camera is attached to shakes (stationary cars could “look” like moving ones!)