a phenotyping pipeline for python
Project description
phenopype is a phenotyping pipeline for python. It is designed to extract phenotypic data from digital images or video material with minimal user input in a semi, or fully automated fashion. At the moment it is set up to be run from a python integrated development environment (IDE), like spyder. Some python knowledge is necessary, but most of the heavy lifting is done in the background. If you are interested in using phenopype, install it from the Python Package Index (PYPI) using pip install phenopype
. You also may want to clone this repository so you can use the tutorials to get started.
DISCLAIMER: ONGOING DEVELOPMENT
The program is still in alpha stage and development progresses slow - this is me trying to write a program, while learning to code properly in the first place, next to my everyday work. A few core features like blob-counting, object detection or videotracking are working (see below), other modules like landmarking or local object-extraction are not fully implemented yet. More detailed documentation is in the making, but please do get in touch if things are not working as expected and I will try my best to help.
features
Automatic object detection via multistep thresholding in a predefined area. Useful if your images have borders or irregular features. Accurracy can be increased with custom modules, e.g. for colour or shape | |
Automatic object tracking that uses foreground-background subtractor. High performance possible (shown example is close to real time with HD stream). Can be set to distinguish colour or shapes. An example with stickleback and isopods can be found here: https://vimeo.com/283075068 | |
Automatic scale detection and pixel-size ratios adjustments. Performance depends on image size | |
Basic landmarking functionality - high throughput. | |
Extract local objects like stickleback body armour |
installation
-
Install python3 with anaconda: go to https://www.anaconda.com/download/, chose python 3.x for your OS, download install it
-
Open the anaconda prompt OR add "conda" to your PATH and open a regular command prompt or terminal
-
Create a virtual environment to have fuller control over your python packages, and install spyder (or any other IDE)
conda create -n "phenopype_env" python=3.7 spyder
- Activate the virtual env and install phenopype using
pip
in your terminal or command line:
conda activate phenopype_env
pip install phenopype
spyder
- Check out the tutorials: download this repository (green button "Clone or download" at the top), run
jupyter notebook
from the anaconda prompt or another console (don't forget to activate your environment, if you created one in step 3), and, inside the jupyter file explorer, go to the tutorial folder:
pip install jupyter notebook
jupyter notebook
If you are having difficulties refer to these tutorials:
- https://conda.io/docs/user-guide/install/windows.html
- https://medium.com/@GalarnykMichael/install-python-on-windows-anaconda-c63c7c3d1444
- https://datatofish.com/install-package-python-using-pip/
In Windows, run everything with administrator privileges!
tutorials
Download and unpack this repository, open a command line /bash terminal, and cd to the example folder inside the repo. Assuming you have phenopype, it's dependencies and jupyter notebook installed (comes with scientific python distributions like Anaconda, see above), type jupyter notebook
and open one of the tutorials:
-
0_python_intro.ipynb This tutorial is meant to provide a very short overview of the python code needed for basic phenopype workflow. This is useful if you have never used python before, but would like to be able to explore phenopype functionality on your own.
-
1_basic_functions.ipynb This tutorial demonstrates basic workflow with phenopype: the creation of a project, directories and how to use the functions alone and within a programmed loop.
-
2_object_detection.ipynb This tutorial demonstrates how single or multiple objects can be detected and phenotyped in images.
development
Planned featues include
- hdf5-implementation (original image > processed image (+ data) > image for ML-training-dataset >> hdf5)
- build your own training data for deep learning algorithms using hdf5 framework
- add Mask R-CNN deep learning algorithm using the opencv implementation (https://github.com/opencv/opencv/tree/master/samples/dnn)
If you have ideas for other functionality, let me know!
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file phenopype-0.8.0.tar.gz
.
File metadata
- Download URL: phenopype-0.8.0.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c6d72322aeaf246f917e324691814fd18e4abbe85018097bb56d6ace51e2ef5 |
|
MD5 | cab09028fe923aef250c80c54d6fc40c |
|
BLAKE2b-256 | 373118b1205de6a6a4c8aefcb4b260f12ebaec1c7f32605e9d4abf13adb7392b |
File details
Details for the file phenopype-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: phenopype-0.8.0-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 446f45d85f810c50e483f197dff800297ed4f771ad20cf89968b42b610a410ea |
|
MD5 | 577c054f3f90f90f20f8eb6adb53cdd3 |
|
BLAKE2b-256 | 514843d91560418cba8c492fbae5a2e56dcfeb0a8a1a62510bb563f6d06f108b |