Efficient AI4EO OpenSource framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.


Neat-EO.pink 101

These tutorial allow you in about 2 hours to experiment basic neat-EO usages.
Nota: each image below can be clicked to switch on neat-EO web-ui.

Check Neat-EO.pink installation and GPU

neo info

Retrieve DataSet

(Subset of Open Cities AI Challenge 2020)

wget -nc https://datapink.net/neo/101/ds.tar
tar xf ds.tar

Configuration file:

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

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

  title = "Building"
  color = "deeppink"

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

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

' > 101.toml

export NEO_CONFIG=101.toml

Tile Imagery:

neo tile --zoom 19 --bands 1,2,3 --nodata_threshold 25 --rasters train/*/*[^-]/*tif --out train/images

Retrieve and tile labels accordingly:

neo cover --dir train/images --out train/cover.csv
neo rasterize --geojson train/*/*-labels/*.geojson --type Building --cover train/cover.csv --out train/labels

Launch training :

neo train --dataset train --epochs 5 --out model
neo eval --checkpoint model/checkpoint-00005.pth --dataset train

Retrieve, prepare and predict on a new imagery:

neo tile --zoom 19 --bands 1,2,3 --nodata_threshold 25 --rasters predict/*/*[^-]/*tif --out predict/images
neo predict --checkpoint model/checkpoint-00005.pth --dataset predict --metatiles --out predict/masks

Compare our trained model prediction against labels:

neo cover --dir predict/masks --out predict/cover.csv
neo rasterize --geojson predict/*/*-labels/*.geojson --type Building --cover predict/cover.csv --out predict/labels
neo compare --mode stack --images predict/images predict/labels predict/masks --cover predict/cover.csv --out predict/compare
neo compare --mode list --labels predict/labels --masks predict/masks --max Building QoD 0.80 --cover predict/cover.csv --geojson --out predict/compare/tiles.json

neo compare --mode side --images predict/images predict/compare --cover predict/cover.csv --out predict/compare_side

Vectorize results:

neo vectorize --masks predict/masks --type Building --out predict/building.json