Segment (georeferenced) raster data in an interactive fashion. Retrain models in seconds. Only small amounts of labeled data necessary because of our use of pretrained base models as feature extractors.
Project description
How to use segmentmytif
Segment (georeferenced) raster data in an interactive fashion. Retrain models in seconds. Only small amounts of labeled data necessary because of our use of pretrained base models as feature extractors.
The project setup is documented in project_setup.md.
Installation
To install segmentmytif from GitHub repository, do:
git clone git@github.com:DroneML/segmentmytif.git
cd segmentmytif
python -m pip install .
Logging
The application writes logs to the 'logs' dir, which will be created if it doesn't exist yet. Messages printed to the screen (stdout) are stored in info.log for later reference. More detailed information, such as input data shapes and value distributions, are written to debug.log.
Train a feature extraction model
To train a feature extraction model run the script "train_model.py" in this repo:
python ./src/segmentmytif/utils/train_model.py -r ../monochrome_flair_1_toy_dataset_flat/ --train_set_limit 10
This assumes a 'flat', grayscale, version of the FLAIR1 dataset is present at the selected root location.
root
- train
- input
- IMG_061946_0.tif
- IMG_061946_1.tif
- ...
- labels
- MSK_061946_0.tif
- ...
Use the script 'monochromize.py' to create greyscale (single band) tifs for every multiband tif in a source folder:
python ./src/segmentmytif/utils/monochromize.py -i ../flair_1_toy_dataset/ -o ../monochrome_flair_1_toy_dataset/
Credits
This package was created with Copier and the NLeSC/python-template.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file segmentmytif-0.1.2.tar.gz.
File metadata
- Download URL: segmentmytif-0.1.2.tar.gz
- Upload date:
- Size: 4.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd858460c185db5954a8a37aecb37b10f26754f0e841de4dd3fd13e07417c2de
|
|
| MD5 |
e6ce79e1de0ea970e04ea63163211f3a
|
|
| BLAKE2b-256 |
86be72c766147fa95ffa77e3a594b962bdf1844bb842d5092dd3f3e12f615198
|
File details
Details for the file segmentmytif-0.1.2-py3-none-any.whl.
File metadata
- Download URL: segmentmytif-0.1.2-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ef78ad8165cfed9deb95b2a3a1911e596574cb588006a53d6dbcb45fef6c063
|
|
| MD5 |
d0631a2908a44912213244bd06a36942
|
|
| BLAKE2b-256 |
0953a918a2fd8015cef65927ba3bc61e3bc60dcd7045ce29c1ba87567c22364e
|