Commit 8602609517896d8fc54aedc6031564909143fcec

Authored by Louis Baetens
1 parent 9b6be80b
Exists in master

UPDATE

Showing 1 changed file with 34 additions and 32 deletions   Show diff stats
ALCD/readme.md
... ... @@ -7,63 +7,64 @@ This readme describes quickly the use of each python file, the general use of th
7 7 ## Description of each file
8 8 - [all_run_alcd.py](all_run_alcd.py)
9 9 main file, calls the other files. Run the full ALCD code.
10   -Called by: /
  10 +\Called by: /
11 11  
12 12 - [L1C_band_composition.py](L1C_band_composition.py)
13 13 creates the features of the full image, taking into account the original image, the cloud-free one and the DEM.
14   -Called by: all_run_alcd.py, layers_creation.py
  14 +\Called by: all_run_alcd.py, layers_creation.py
15 15  
16   -- [OTB_workflow.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/OTB_workflow.py)
  16 +- [OTB_workflow.py](OTB_workflow.py)
17 17 core of the program, relies heavily on OTB. Computes statistics on the image, trains a Random Forest, classifies the image.
18   -Called by: all_run_alcd.py
  18 +\Called by: all_run_alcd.py
19 19  
20   -- [confidence_map_exploitation.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/confidence_map_exploitation.py)
  20 +- [confidence_map_exploitation.py](confidence_map_exploitation.py)
21 21 creates the enhanced version of the confidence map. Also computes the evolution of the confidence and of the samples number across the iterations.
22   -Called by: all_run_alcd.py, OTB_workflow.py
  22 +\Called by: all_run_alcd.py, OTB_workflow.py
23 23  
24   -- [contour_from_labeled.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/contour_from_labeled.py)
  24 +- [contour_from_labeled.py](contour_from_labeled.py)
25 25 creates the contours of the classes from the classification map.
26   -Called by: OTB_workflow.py
  26 +\Called by: OTB_workflow.py
27 27  
28   -- [expand_point_region.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/expand_point_region.py)
  28 +- [expand_point_region.py](expand_point_region.py)
29 29 increases the number of samples by taking their neighborhood.
30   -Called by: masks_preprocessing.py
  30 +\Called by: masks_preprocessing.py
31 31  
32   -- [find_directory_names.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/find_directory_names.py)
  32 +- [find_directory_names.py](find_directory_names.py)
33 33 gets the path of the L1C directory, and check if the dates given by the user are valid.
34   -Called by: all_run_alcd.py, L1C_band_composition.py
  34 +\Called by: all_run_alcd.py, L1C_band_composition.py
35 35  
36   -- [layers_creation.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/layers_creation.py)
  36 +- [layers_creation.py](layers_creation.py)
37 37 generates empty shapefiles layer, one for each class, so the user can populate them afterwards.
38   -Called by: all_run_alcd.py
  38 +\Called by: all_run_alcd.py
39 39  
40   -- [masks_preprocessing.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/masks_preprocessing.py)
  40 +- [masks_preprocessing.py](masks_preprocessing.py)
41 41 calls other codes to augment the samples quantity and merge them into one shapefile, and split them between a training and validation set.
42   -Called by: all_run_alcd.py
  42 +\Called by: all_run_alcd.py
43 43  
44   -- [merge_shapefiles.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/merge_shapefiles.py)
  44 +- [merge_shapefiles.py](merge_shapefiles.py)
45 45 merge multiple shapefiles into one, and gives a class number to each point based on the shapefile it comes from.
46   -Called by: confidence_map_exploitation.py, masks_preprocessing.py
  46 +\Called by: confidence_map_exploitation.py, masks_preprocessing.py
47 47  
48   -- [metrics_exploitation.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/metrics_exploitation.py)
  48 +- [metrics_exploitation.py](metrics_exploitation.py)
49 49 computes various metrics, including accuracy and f1-score for the k-fold.
50   -Called by: all_run_alcd.py
  50 +\Called by: all_run_alcd.py
51 51  
52   -- [quicklook_generator.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/quicklook_generator.py)
  52 +- [quicklook_generator.py](quicklook_generator.py)
53 53 generates quicklooks of all the dates in the L1C directory for given locations.
54   -Called by: /
  54 +\Called by: /
55 55  
56   -- [split_samples.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/split_samples.py)
57   -separates point from a shapefile in two different shapefiles (training and validation sets). Also used to split into k different sets, for the k-fold cross-validation.
58   -Called by: masks_preprocessing.py
  56 +- [split_samples.py](split_samples.py)
  57 +separates point from a shapefile in two different shapefiles (training and validation sets).
  58 +Also used to split into k different sets, for the k-fold cross-validation.
  59 +\Called by: masks_preprocessing.py
59 60  
60   -- [synthese_alcd_runs.py](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD/synthese_alcd_runs.py)
  61 +- [synthese_alcd_runs.py](synthese_alcd_runs.py)
61 62 makes a synthesis of the scenes proceeded with ALCD.
62   -Called by: /
  63 +\Called by: /
63 64  
64 65  
65 66 ## Getting Started
66   -You need to set the parameters as described in the [user manual](http://tully.ups-tlse.fr/baetensl/clouds_detection/blob/master/ALCD_user_manual.pdf).
  67 +You need to set the parameters as described in the [user manual](ALCD_user_manual.pdf).
67 68 Then you can simply run
68 69 ```
69 70 python all_run_alcd.py -f true -s 0 -l Arles -d 20171002 -c 20171005
... ... @@ -84,12 +85,13 @@ python all_run_alcd.py -f false -s 1
84 85 ```
85 86  
86 87 ## Outputs
87   -For each scene, a `root_scene` output dir will be created.
  88 +For each scene, a `root_scene/` output dir will be created.
88 89 In this directory you will find after having run ALCD, among other things:
89   -- `root_scene/In_data/Image` --- the original image and the composition of all the bands serving as features
90   -- `root_scene/In_data/Masks` --- the layers with the samples you placed manually
91   -- `root_scene/Model` --- the model you trained on your samples
  90 +- `root_scene/In_data/Image/` --- the original image and the composition of all the bands serving as features
  91 +- `root_scene/In_data/Masks/` --- the layers with the samples you placed manually
  92 +- `root_scene/Model/` --- the model you trained on your samples
92 93 - `root_scene/Out/confidence_enhanced.tif` --- the modified confidence map that helps you understand where the confidence is low
93 94 - `root_scene/Out/labeled_img_regular.tif` --- the current classification map,
94 95 with the following classes: 0: null value, 1: background, 2: low_clouds, 3: high_clouds, 4: clouds_shadows, 5: land, 6: water, 7: snow
95 96 - `root_scene/Out/contours_lables.tif` --- the contours from the classes of the labeled_img_regular.tif
  97 +- `root_scene/Statistics/` --- contains the various statistics, such as the one from the K-fold if you ran it, or the confusion matrix
... ...