Sid: image processing for seed images

PyPi Supported Python versions License Build Status Docs codecov.io

Author: Yoav Ram Source code: GitHub

Sid is an open-source Python package for image processing of plant seed images, specifically Lamium amplexicaule.

Requirements

  • Python 2.7
  • PIL/Pillow
  • numpy
  • scipy.ndimage
  • scikit-image
  • matplotlib
  • watchdog
  • click
  • pywin32 (on Windows)

For testing and documentation:

  • nose
  • coverage
  • sphinx

Install

  1. Install the Anaconda Python 2.7 distribution.
  2. Update all Python packages using conda:
>>> conda update --all --yes
  1. Install Sid using pip:
>>> pip install Sid
  1. Check that Sid was installed properly by running the take_cover script:
>>> take_cover --version
Sid, version x.x.x

where x.x.x will be replaced by the current version (0.2.3).

Tip

When installing on Windows, if you get an error trying to install pywin32 or pypiwin32, try to run:

>>> conda install pywin32 --yes

Upgrade

To upgrade to the newest version of Sid (0.2.3):

>>> conda update --all --yes
>>> pip install --upgrade Sid
>>> take_cover --version
Sid, version x.x.x

Usage

Use by running:

>>> take_cover

The script will first ask for a folder name - this will be the working directory from which the script will read .jpg files and to which it will write .png and .csv files.

The script will then ask if the folder should be prcoessed Continuously or once.

For more options, see the help message:

>>> take_cover --help

Continuous processing

In this case the script will wait for new .jpg files in the folder. When a new .jpg file is created, the script will process it, creating .png files with the color spaces and the segmentation checkpoints, open the segmentation image, and will print the final stats to the screen.

Single processing

In this case the script will go over all .jpg files in the folder and process them. It will produce .png files with the color spaces and the segmentation checkpoints and two .csv files: one with the final stats for each .jpg file and one with the histograms that were used to find the features on the seed (background, eliosom, cover).

Configuration file

take_cover.json is the configuration file which includes values of different parameters of the algorithm, including segmentation thresholds.

Support

Don’t hesitate to contact Yoav Ram with questions and comments.

Bugs and feature requests can be opened on GitHub Issues

Developers

Developers should clone the repository from GitHub and install it in editable mode:

>>> git clone https://github.com/yoavram/Sid.git
>>> cd Sid
>>> pip install -e .
  • Source code is hosted by GitHub
  • Testing is done with nosetests Sid/tests
  • Continuous integration and deployment is performed by Travis-CI
  • Code coverage is tracked by codecov.io
  • Package is hosted on PyPi
  • Documentation is hosted by Read The Docs
  • Documentation is built with Sphinx

Licence

Sid source code and examples are licensed under the terms of the MIT licence.

Sid documentation, examples, and other materials are licensed under the terms of the Creative Commons Attribution 4.0 International (CC BY 4.0) licence