Skip to content

Repository files navigation

prithvi-usecases: Field boundary Mapping (Semantic Segmentation Task with High Class Imbalance)

How to use the code

Step 1. Clone the repo

git clone https://github.com/ClarkCGA/prithvi-usecases.git
cd [cloned_repo_path]

Notes:

  • Replace [cloned_repo_path] with the actual path where the repository is cloned.
  • Make sure you have Conda installed before running the environment setup.

Step 2. Create the environment

conda env create -f environments.yaml

Step 3. How to do fine-tune for a semantic segmentation task

  • Get the pre-trained weights from HuggingFace
  • Adapt the custom_dataset.py to the specification of your dataset if needed.
  • Update the config.py
  • if you made changes to the dataset script, then also update the main_prithvi_aquaculture.py and then run it from the CLI:
torchrun --rdzv_endpoint=0.0.0.0:29500 main_prithvi_fieldboundary.py --config [path/to/your/config]

Step 4. How to do inference

  • Make sure the inference section of config.py is uptodated.
  • Run from CLI:
torchrun --rdzv_endpoint=0.0.0.0:29500 inference.py --config [path/to/your/inference/config]

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages