This script purpose is to do land cover classification solely using Python
I made it to challenge myself that it is possible to do the same approach as in Google Earth Engine using open source solution
I used multiple library for this script such as GeoPandas and pandas to load the vector file/database and plot it, Rasterio to load and handle raster data, Scikit-learn to do machine learning, Matplotlib of course to plot, Numpy obviously for raster/array manipulation, PIL for showing raster data, Scikit-image for image segmentation, and SciPy for statistics analysis
Overall, it is much harder to do than in Google Earth Engine but it is a good approach since we are using open source solution which don't need license
You can use this script, modify it etc.. just don't forget to credit me
Created by Ramadhan
Before running the script make sure that you:
- Have installed Python, at least version 3.9
- Know how to code, some machine learning, and remote sensing knowledge (if don't please learn some first! it is for your own good!)
If you have done 1 and 2, now you can:
- Clone this repository
- Create Python virtual environment
- Install the necessary package from the the requirements.txt using
pip
- Open the
classification.ipynb
file - Run the script!
This script is just one method and specific parameter, it can always be adjusted based on your need. The important thing is that you know how to code, some machine learning, and remote sensing knowledge :D. I believe you can!