Skip to content

PUTvision/LandCoverSeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LandCover Segmentation

seg

Description

This repository is an example pipeline for training and evaluating the segmentation model for Deepness: Deep Neural Remote Sensing plugin for QGIS.

This repository contains code for training and evaluating the LandCover segmentation model based on the LandCover.ai dataset.

Ready-to-use model and example inference in QGIS are available in our LandCover segmentation example.

Requirements

Create your Python 3 virtual environment and install requirements:

pip3 install -r requirements.txt

Usage

  • Prepare dataset for training and evaluation

    # create a directory for the dataset
    mkdir data/LandCover
    
    # move to the dataset directory
    cd data/LandCover
    
    # download dataset
    wget "https://landcover.ai.linuxpolska.com/download/landcover.ai.v1.zip"
    
    # extract dataset
    unzip landcover.ai.v1.zip
    
    # (optionally) remove the zip file
    rm landcover.ai.v1.zip
    
    # create train-val-test split
    python3 split.py
    
  • Logging configuration

    • NEPTUNE

      If you want to use Neptune logger, you have to set your keys:

      export NEPTUNE_API_TOKEN=""
      export NEPTUNE_PROJECT_NAME=""
      
    • NONE

      If you don't want to use any logger, just add ~logger in the commands below.

  • Run training pipeline

    python run.py name=landseg
    
  • You can run an evaluation pipeline if you have trained model

    python run.py name=landseg eval_mode=True trainer.resume_from_checkpoint=./path/to/model
    
  • Run export pipeline to export model to ONNX format to use it in QGIS

    python run.py name=landseg eval_mode=True trainer.resume_from_checkpoint=./path/to/model export.export_to_onnx=True
    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages