How to build classic CV algorithm for detecting objects on the road from UAV images

I want to build an object detector based on a classic CV (in the sense that I don’t have the data for the trained algorithms). The objects that I want to detect are obstacles on the road, it’s anything that can block the path of a car. The obstacle must have volume (this is important because a sheet of cardboard can be recognized as an obstacle, but there is no obstacle). The background is always different, and so is the season. The road can be unpaved, sandy, gravel, paved, snow-covered, etc. Objects are both small and large, as many as none, they can both merge with the background and stand out. I also have a road mask that can be used to determine the intersection with an object to make sure that the object is in the way.

I am attaching examples of obstacles below, this is not a complete representation of what might be on the road, because anything can be.

a third dimension can be impossible to infer from pictures. best to assume that anything out of the ordinary requires humans to investigate.

wile-e-coyote-tunnel-illusion

if you know where “road” is, then you could flag anything “salient”, or deviating from the general texture. see OpenCV: Saliency API

if you don’t know where “road” is, but need the computer to infer that (vs. non-road such as shrubs, woods, buildings, …), then only machine learning even has a chance. that muddy mess with a tree across it cannot possibly be identified as “road” from its appearance.

you are going to have to involve AI.

if you’re lucky, there are trained models that work well enough. you could use that to label/classify data for you. you’ll still have to review that, but it’s less work than doing it all yourself.

the task sounds generally like a GIS task. research what programs are used for mapping and geo-referencing of imagery. I have seen GIS people apply machine learning to geo imagery for disaster response, search and rescue, etc. one such project is called https://www.zooniverse.org/

crosspost:

https://stackoverflow.com/questions/79695297/how-to-build-classic-cv-algorithm-for-detecting-objects-on-the-road-from-uav-ima

Thanks for the answer. I plan to search for the road using semantic segmentation, there is data for this. However, objects on the road are very rare and now it is almost impossible to collect enough of them to train a classifier. Therefore, I am exploring the possibilities of how this can be done without a large number of different objects on the road. You’re right to note that the muddy mess doesn’t look like a road, but unfortunately it does because the images are from a quarry. I also want to note that I went through all the data in the search for objects on the road, and if I took only those objects that are on the road, I would get less than 10 images.

research “defect detection”. that concept forms a model of “normal” and flags “abnormal”, without having an explicit model for “abnormal”.

thank you for advice