Skip to main content

A segmentation pipeline for phenotyping

Project description

Plant phenotyping based on segmentation model

Purpose and background

Purpose: Segment images and extract traits from segmentation masks for root and shoot images collected from various platforms (cylinder, clearpot, black canvas) with different species (Arabidopsis, rice, soybean, sorghum, maize, pennycress).

Background: To be updated

Installation

You can install by two methods:

  1. Clone the repository and navigate to the cloned directory:
    Clone the repository to the local drive.

    git clone https://github.com/Salk-Harnessing-Plants-Initiative/phenotyping-segmentation.git
    cd phenotyping-segmentation
    
  2. Install a PyPI package:

    pip install phenotyping-segmentation
    

Organize the pipeline and your images

Models can be downloaded from Box.

Please make sure to organize the downloaded pipeline, model, and your own images in the following architecture:

phenotyping-segmentation/
├── images/
│   ├── wave name (e.g., wave1)/
│   │   ├── day name (e.g., day7)/
│   │   │   ├── plant name (e.g., ZHOKUWVOIZ)/
│   │   │   │   ├── frame image (e.g., 1.png)
├── scans.csv (the image path and scanner id information)
├── model name (e.g., arabidopsis_model.pth)
├── label_class_dict_lr.csv (class color)
├── params.json (pipeline parameter json file)
├── env.yaml (environment file)
├── Dockerfile
├── pipeline.sh (indicate input_dir and pipeline name)

Running the pipeline with a shell file (pipeline.sh)

  1. create the environment: In terminal, navigate to your root folder and type:

    conda env create -f env.yaml
    

    or

    mamba env create -f env.yaml
    
  2. activate the environment:

    conda activate phenotyping-segmentation
    
  3. run the shell file:

    sed -i 's/\r$//' pipeline.sh
    bash pipeline.sh
    

Running the pipeline with a pip installed

  1. activate your environment:

    conda activate your-environment-name
    
  2. install the pip package:

    pip install phenotyping-segmentation
    
  3. run the shell file:

    sed -i 's/\r$//' pipeline.sh
    bash pipeline.sh
    

Running the pipeline with docker

Make sure you have images, and associated files listed above in your root folder.

  1. build the docker:

    docker build -t phenoseg .
    
  2. run the docker:

    docker run --gpus all phenoseg
    

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

phenotyping_segmentation-0.1.8.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phenotyping_segmentation-0.1.8-py3-none-any.whl (67.9 kB view details)

Uploaded Python 3

File details

Details for the file phenotyping_segmentation-0.1.8.tar.gz.

File metadata

  • Download URL: phenotyping_segmentation-0.1.8.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for phenotyping_segmentation-0.1.8.tar.gz
Algorithm Hash digest
SHA256 d427f54c3ce72ad56a98257eb252b33600df0b2e314469a696879661201e4729
MD5 78ce9915991904935b7f76efb4c06f10
BLAKE2b-256 3d6f1ffc912237d735cef1abb898120db30b7de312c9e5145f03cae06cc8379d

See more details on using hashes here.

File details

Details for the file phenotyping_segmentation-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for phenotyping_segmentation-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b9f4d712533be7dac5dfab9848088092f6937172542d5cd7a8d8911aae34bcf3
MD5 0db682af5a0d496dc14dbf153f68f5e7
BLAKE2b-256 f4f4df5af6073286f784c88c43e80b29e82fd4f1e92afca6ad23f492a6ce6b63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page