Skip to main content

plot-boundary-extractor module

This module is to extract field experiment plot boundary for agricultural applications.


Developed by Hansae Kim and Jinha Jung

plot-boundary-extractor installation

Set up a virtual environment

First, we need to install plot-boundary-extractor on the machine you would like to run this example tutorial. We will set up a new Python Virtual Environment called pbe.

$ conda create -n pbe -c conda-forge gdal python=3.10 -y

We need to activate the newly created virtual environment before proceeding.

$ conda activate pbe

Install plot-boundary-extractor module

Now we need to install plot-boundary-extractor module using pip.

$ pip install plot-boundary-extractor

Install torch

The plot-boundary-extractor module uses torch module, so we need to install it on the machine you would like to run this example tutorial.

CPU version

If your machine is not equipoped with NVIDIA GPU, then you will have to install the torch without GPU support.

$ pip install torch torchvision

GPU version

If your machine is equipped with NVIDIA GPU, then you will have to install the torch with GPU support.

$ pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

Install SAM

The plot-boundary-extractor uses SAM to detect plot boundary automatically, so you have to install SAM using the below command.

$ pip install git+https://github.com/facebookresearch/segment-anything.git

You also have to download a pre-trained model using the below command. Please make a note where you're downloading the pre-trained model. We will need this path information in the later tutorial.

$ wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth

Now the installation is done, and you're ready to extract plot boundaries using the plot-boundary-extractor module. An example Jupyter Notebook is available for your reference.

Citation

If you use this repository in your research, please cite the following paper:

Kim, H.S., Olaniyi, I., Chang, A., & Jung, J. (2025).
Developing a segment anything model-based framework for automated plot extraction.
Precision Agriculture, 26(3), 53. Springer.

@article{kim2025developing,
  title={Developing a segment anything model-based framework for automated plot extraction},
  author={Kim, Han Sae and Olaniyi, Ismail and Chang, Anjin and Jung, Jinha},
  journal={Precision Agriculture},
  volume={26},
  number={3},
  pages={53},
  year={2025},
  publisher={Springer}
}

Metadata

Release files for plot-boundary-extractor 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plot-boundary-extractor 0.3.3
File Size Uploaded
plot_boundary_extractor-0.3.3.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plot-boundary-extractor 0.3.3
File Interpreter ABI Platform
plot_boundary_extractor-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / plot_boundary_extractor-0.3.3.tar.gz

Download URL plot_boundary_extractor-0.3.3.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6259fdacc3265883009732e94c8f08d6cd63cc6764a7a0248afc1ad8f1020bd4
BLAKE2b-256 checksum
How to use checksums
53093753ee3d77c400989f9026e98ef4102828f3418e3b1e049a8237d553f943
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / plot_boundary_extractor-0.3.3-py3-none-any.whl

Download URL plot_boundary_extractor-0.3.3-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b22fb5ce3c8eb0535ebb153b61de4429d5135553c31e00f842d9e3b5a7c6e19
BLAKE2b-256 checksum
How to use checksums
ae2738e5f7696023f213af472c49ef4d9d9f0bdd11e7b8a7cf8cff2129055b14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page