Open CGevaert opened 3 months ago
Try using rioxarray
to load big image and split in chunks
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.
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.