Get gdal development libraries:
$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev
$ sudo apt-get install python3-dev
$ sudo apt-get install gdal-bin python3-gdal
$ sudo apt-get install virtualenv
$ virtualenv env -p python3
$ source env/bin/activate
Install Others Requirements
(env) $ pip3 install -r requirements.txt
(env) $ pip3 install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
python3 segmentation.py --input=data/LC08_220069_20190707.tif --output=data/output.tif --scale_level=0.8 --smoth=True
python3 polygonize.py --input=data/output.tif --output=data/output.gpkg
python3 zonal_statistics.py --input_raster=data/LC08_220069_20190707.tif --input_vector=data/output.gpkg --stats min max mean
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.