Browse Source

initial import

Olivier Courtin 4 months ago
1 changed files with 104 additions and 0 deletions
  1. +104

+ 104
- 0
docs/ View File

@@ -0,0 +1,104 @@
# Neat-EO Quality Analysis

Check installation and GPU
neo info

Configuration file
echo '''

### Inputs
name = "images"
bands = [1, 2, 3]

### Outputs
title = "Background"
color = "transparent"

title = "Building"
color = "deeppink"

### AI stuff
nn = "Albunet"
encoder = "resnet50"
loader = "SemSeg"

bs = 4
da = {name="RGB", p=0.5}
loss = "Lovasz"
optimizer = {name="Adam", lr=0.000025}
metrics = ["QoD"]

''' > gl/config.toml

export NEO_CONFIG=gl/config.toml

Define our area of interest
neo cover --bbox 4.795,45.628,4.935,45.853 --zoom 18 --out gl/cover.csv

Retrieve Imagery
neo download --rate 20 --type WMS --url "{xmin},{ymin},{xmax},{ymax}&FORMAT=image/jpeg" --cover gl/cover.csv --out gl/images

Retrieve and generate labels
wget -nc -O gl/lyon_roofprint.json "; subtype=geojson"

neo rasterize --type Building --geojson gl/lyon_roofprint.json --cover gl/cover.csv --out gl/labels

Train a model, check metrics and perform prediction
neo train --dataset gl --epochs 3 --out gl/model
neo eval --checkpoint gl/model/checkpoint-00003.pth --dataset gl
neo predict --metatiles --checkpoint gl/model/checkpoint-00003.pth --dataset gl --out gl/masks
neo cover --dir gl/masks --out gl/cover.csv

Quality Analysis compare between model prediction and so-called GroundTruth
neo compare --cover cover.csv --mode stack --images gl/images gl/labels gl/masks --out gl/compare
neo compare --cover cover.csv --mode list --labels gl/labels --masks gl/masks --max Building QoD 0.80 --out gl/outliers.cover.csv
neo cover --cover gl/outliers.cover.csv --type geojson --out gl/compare/tiles.geojson
neo compare --cover gl/outliers.cover.csv --mode side --images gl/images gl/compare --out gl/compare_outliers

Filter training DataSet by removing unwanted outliers
wget -O gl/remove.cover.csv
neo subset --dir gl/images --cover gl/cover.csv --out gl/filter/images
neo subset --dir gl/labels --cover gl/cover.csv --out gl/filter/labels
neo subset --dir gl/filter/images --delete --cover gl/remove.cover.csv
neo subset --dir gl/filter/labels --delete --cover gl/remove.cover.csv

Relaunch a train on a filtered DataSet and display QA results
neo train --dataset gl/filter --epochs 25 --out gl/filter/model
neo eval --checkpoint gl/filter/model/checkpoint-00025.pth --dataset gl/filter
neo predict --metatiles --checkpoint gl/filter/model/checkpoint-00025.pth --dataset gl --out gl/filter/masks
neo compare --cover gl/cover.csv --mode stack --images gl/images gl/labels gl/filter/masks --out gl/filter/compare
neo compare --cover gl/cover.csv --mode list --labels gl/labels --masks gl/filter/masks --max Building QoD 0.80 --geojson --out gl/filter/compare/tiles.json