From 2e213014ba6b14579e35c4d072fad8058a867f93 Mon Sep 17 00:00:00 2001 From: Clemence Herny Date: Tue, 23 Jan 2024 12:32:06 +0000 Subject: [PATCH] Check config template is working --- config/config_det.template.yaml | 26 +++++++++++--------------- config/config_det.yaml | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/config/config_det.template.yaml b/config/config_det.template.yaml index 43305f9..5251267 100644 --- a/config/config_det.template.yaml +++ b/config/config_det.template.yaml @@ -7,23 +7,19 @@ prepare_data.py: srs: "EPSG:2056" # Projection of the input file datasets: - shapefile: ./input/input_det/AoI/[AoI_YEAR_Shapefile] - output_folder: ./output/output_det/[YEAR] + shapefile: ./input/input_det/AoI/swissimage_footprint_SWISSIMAGE_YEAR.shp + output_folder: ./output/output_det/SWISSIMAGE_YEAR zoom_level: 16 # z, keep between 15 and 18 # 2-Request tiles according to the provided AOI and tiles parameters generate_tilesets.py: debug_mode: False datasets: - aoi_tiles_geojson: ./output/output_det/[YEAR]/tiles.geojson + aoi_tiles_geojson: ./output/output_det/SWISSIMAGE_YEAR/tiles.geojson orthophotos_web_service: - # type: WMS # supported values: 1. MIL = Map Image Layer 2. WMS - # url: https://wms.geo.admin.ch/service - # layers: ch.swisstopo.swissimage - # srs: "EPSG:2056" type: XYZ # supported values: 1. MIL = Map Image Layer 2. WMS 3. XYZ - url: https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.swissimage-product/default/[YEAR]/3857/{z}/{x}/{y}.jpeg - output_folder: ./output/output_det/[YEAR] + url: https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.swissimage-product/default/SWISSIMAGE_YEAR/3857/{z}/{x}/{y}.jpeg + output_folder: ./output/output_det/SWISSIMAGE_YEAR tile_size: 256 # per side, in pixels overwrite: True n_jobs: 10 @@ -42,7 +38,7 @@ generate_tilesets.py: # 3-Perform the object detection based on the optimized trained model make_detections.py: - working_folder: ./output/output_det/[YEAR] + working_folder: ./output/output_det/SWISSIMAGE_YEAR log_subfolder: logs sample_tagged_img_subfolder: sample_tagged_images COCO_files: # relative paths, w/ respect to the working_folder @@ -52,7 +48,7 @@ make_detections.py: pth_file: '../../../input/input_det/logs/model_0002999.pth' # trained model minimizing the validation loss curve, # monitoring of the training process via tensorboard (tensorboard --logdir ) # for the provided parameters model_0002999.pth is chosen - image_metadata_json: './output/output_det/[YEAR]/img_metadata.json' + image_metadata_json: './output/output_det/SWISSIMAGE_YEAR/img_metadata.json' rdp_simplification: # rdp = Ramer-Douglas-Peucker enabled: True epsilon: 2.0 # cf. https://rdp.readthedocs.io/en/latest/ @@ -60,12 +56,12 @@ make_detections.py: # 4-Filtering and merging detection polygons to improve results filter_detections.py: - year: [YEAR] - input: ./output/output_det/[YEAR]/oth_detections_at_0dot3_threshold.gpkg - shapefile: ./input/input_det/AoI/swissimage_footprint_[YEAR].shp + year: SWISSIMAGE_YEAR + detections: ./output/output_det/SWISSIMAGE_YEAR/oth_detections_at_0dot3_threshold.gpkg + shapefile: ./input/input_det/AoI/swissimage_footprint_SWISSIMAGE_YEAR.shp dem: ./input/input_det/DEM/switzerland_dem_EPSG2056.tif elevation: 1200.0 # m, altitude threshold score: 0.95 # detection score (from 0 to 1) provided by detectron2 distance: 10 # m, distance use as a buffer to merge close polygons (likely to belong to the same object) together area: 5000.0 # m2, area threshold under which polygons are discarded - output: ./output/output_det/[YEAR]/oth_detections_at_0dot3_threshold_year-{year}_score-{score}_area-{area}_elevation-{elevation}_distance-{distance}.geojson \ No newline at end of file + output: ./output/output_det/SWISSIMAGE_YEAR/oth_detections_at_0dot3_threshold_year-{year}_score-{score}_area-{area}_elevation-{elevation}_distance-{distance}.geojson \ No newline at end of file diff --git a/config/config_det.yaml b/config/config_det.yaml index d1e0a7f..9cd8c75 100644 --- a/config/config_det.yaml +++ b/config/config_det.yaml @@ -1,5 +1,5 @@ ################################### -####### Inference detection ####### +##### Detection by inference ##### # Automatic detection of Quarries and Mineral Extraction Sites (MES) in images # 1-Produce tiles geometry according to the AoI extent and zoom level