NRCan / geo-deep-learning

Deep learning applied to georeferenced datasets
https://geo-deep-learning.readthedocs.io/en/latest/
MIT License
149 stars 49 forks source link

Avoid running models on void patches #488

Open micpilon opened 1 year ago

micpilon commented 1 year ago

The images that are passed to the models do not always have a uniform, quadrilateral shape. This causes that sometimes, patches completely void of data are passed to the model, which can considerably increase the execution time of the model. This is mainly the case for orthophoto mosaics, where the aggregation of multiple photos generates irregular shapes.

Here is an example, while the boundaries of the following image (red) virtually doubles the surface of the dataset compared to its actual valid extent (white)

image (14)

It would be interesting to develop a method to skip patches that contain only a unique value (i.e. 0) and no valuable information and thus save model execution time, in this case by nearly 50%.