XAI4GEO / Tree_Classification

This repository contains the workflow for tree-species similarity classification using a siamese network.
Apache License 2.0
0 stars 0 forks source link

From UAV orthomosaic and geojson data labels to training data #16

Open CGevaert opened 3 months ago

CGevaert commented 3 months ago

Add preparation step to the workflow so the user can start from just an orthomosaic and vector data for labels.

This would include: tiling the orthomosaic, automatically discarding tiles that contain only nodata (i.e. the orthomosaic isn't square so some tiles will only be back, don't need to be classified)

If Geojson provided as points, then some bounding box calculation would need to be done? ...also happy to hear suggestiosn here.

rogerkuou commented 3 months ago

Try using rioxarray to load big image and split in chunks

CGevaert commented 3 months ago

Some additional clarification:

Input: large orthomosaic and shapefile.

1) create regular grid over the study area with a tile size that we will use for training / or for inference 2) remove nodata tiles (many orthomosaics are not exactly square so tiles along edges that have no data should be removed) 3) take into account: a) overlap between tiles to identify objects along borders b) save coordinate information so you can stitch together the results after inference 4) if training - save image + labels as tiles in format to be used for training 5) if inference - apply model to each tile and allow stitching of results when done. Need to account for overlap again here.