Giter Club home page Giter Club logo

plantcv's Introduction

builds DeepSource DeepSource Documentation Status Binder Docker Pulls GitHub release PyPI version Conda license Contributor Covenant

All Contributors

PlantCV: Plant phenotyping using computer vision

Please use, cite, and contribute to PlantCV! If you have questions, please submit them via the GitHub issues page. Follow us on twitter @plantcv.


Introduction to PlantCV

PlantCV is an open-source image analysis software package targeted for plant phenotyping. PlantCV provides a common programming and documentation interface to a collection of image analysis techniques that are integrated from a variety of source packages and algorithms. PlantCV utilizes a modular architecture that enables flexibility in the design of analysis workflows and rapid assimilation and integration of new methods. For more information about the project, links to recorded presentations, and publications using PlantCV, please visit our homepage: https://plantcv.danforthcenter.org/.

Quick Links

Citing PlantCV

If you use PlantCV, please cite the PlantCV publications relevant to your work. To see how others have used PlantCV in their research, check out our list of publications using PlantCV.


Issues with PlantCV

Please file any PlantCV suggestions/issues/bugs via our GitHub issues page. Please check to see if any related issues have already been filed.


Contributors

AFis-245
AFis-245

πŸ’»
Adam Dimech
Adam Dimech

πŸ’» πŸ“– ⚠️ πŸ€”
Alexander Kutschera
Alexander Kutschera

πŸ’» πŸ“– ⚠️
Alexandria Pokorny
Alexandria Pokorny

πŸ’» πŸ“– ⚠️
Andy Lin
Andy Lin

πŸ’»
Cesar Lizarraga
Cesar Lizarraga

πŸ’» πŸ“– ⚠️
Collin Luebbert
Collin Luebbert

πŸ’»
David Peery
David Peery

πŸ’» πŸ“– ⚠️ πŸ€”
Dhiraj Srivastava
Dhiraj Srivastava

πŸ’» πŸ“– ⚠️
Dominik Schneider
Dominik Schneider

πŸ’» πŸ“– ⚠️ πŸ€”
Dr. Alexander Kutschera
Dr. Alexander Kutschera

πŸ’» πŸ› πŸ’¬
Eric Platon
Eric Platon

πŸ’» πŸ“– ⚠️
Fabian Dubois
Fabian Dubois

πŸ’»
Fabio Barbero
Fabio Barbero

πŸ’»
Garrot Yoan
Garrot Yoan

πŸ“–
GrantKonkel
GrantKonkel

πŸ’» πŸ“–
Haley Schuhl
Haley Schuhl

πŸ’» πŸ“– 🚧 βœ… ⚠️ πŸ“’ πŸ€” πŸ’¬
Hudanyun Sheng
Hudanyun Sheng

πŸ’» πŸ“– ⚠️ πŸ€”
Jake
Jake

πŸ’» πŸ“–
Jeffrey Berry
Jeffrey Berry

πŸ’» πŸ“– ⚠️ πŸ€”
JoeDuenwald
JoeDuenwald

πŸ“–
Jorge Gutierrez
Jorge Gutierrez

πŸ’» πŸ“– ⚠️ πŸ“’ πŸ€” πŸ’¬
Josh Sumner
Josh Sumner

πŸ’» πŸ“– ⚠️ βœ… πŸ€”
Katie Murphy
Katie Murphy

πŸ“– βœ… πŸ“’ πŸ€” πŸ“£
KeelyBrown
KeelyBrown

πŸ’»
Malia Gehan
Malia Gehan

πŸ“† πŸ’» πŸ“– πŸ” πŸ§‘β€πŸ« πŸ“’ βœ… πŸ€” πŸ’¬ ⚠️
Malinda
Malinda

πŸ’»
Mark Wilson
Mark Wilson

πŸ’» πŸ“– ⚠️
Max
Max

πŸ’» πŸ“– πŸ€”
Noah Fahlgren
Noah Fahlgren

πŸ“† πŸ’» πŸ“– ⚠️ πŸ” πŸ§‘β€πŸ« πŸ“’ βœ… πŸ€” πŸ’¬
Sanazjd
Sanazjd

πŸ’» πŸ“– ⚠️ πŸ€”
SethPolydore
SethPolydore

πŸ’» πŸ“– ⚠️
Steen Hoyer
Steen Hoyer

πŸ’» πŸ“– πŸ€”
Stephan Summerer
Stephan Summerer

πŸ’»
Steven Wu
Steven Wu

πŸ’»
Stylopidae1793
Stylopidae1793

πŸ“–
TJ Schultz
TJ Schultz

πŸ’» πŸ›
adrianethompson
adrianethompson

πŸ’» πŸ“– βœ…
annacasto
annacasto

πŸ’» πŸ“– ⚠️ βœ… πŸ“’ πŸ€”
bganglia
bganglia

πŸ’» πŸ“– ⚠️
jgerardhodge
jgerardhodge

πŸ’» πŸ“– ⚠️
jmgordon1223
jmgordon1223

πŸ“–
jwheeler5
jwheeler5

πŸ’» πŸ“– ⚠️
kbgilbert
kbgilbert

🎨
lacostag
lacostag

πŸ“–
lchavez037
lchavez037

πŸ“–
leowlima
leowlima

πŸ“–
mtwatso2-eng
mtwatso2-eng

πŸ’»
natejly
natejly

πŸ’»
scallen81
scallen81

πŸ’»
sdkenney42
sdkenney42

πŸ“–
typelogic
typelogic

πŸ’»
wurDevTim
wurDevTim

πŸ’» πŸ“– ⚠️
zeeuqsze
zeeuqsze

πŸ“– βœ… πŸ“’ πŸ§‘β€πŸ«

plantcv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plantcv's Issues

Package plantCV up to allow installation by `setup.py install`

Description:

As Noah and I have discussed, it would be nice to allow installation of plantCV into a user/system library of packages via the standard python mechanism. This will free users from having to add the package source to their $PYTHONPATH, and enable use of the help() function, now that all (?) of the plantCV functions have PEP8 doc strings.
Cf. the Image Harvest installation instructions.

Context

I create this issue just as a public reminder---I think we are committed to doing this for version 2.0, and so I wanted it to be in the list for that milestone. Please tag this issue as an enhancement, if you like.

Further suggestions

The setuptools package (rather than the legacy distutils package) is recommended for creating source distributions. I will keep reading through the documentation at setuptools.readthedocs.io and packaging.python.org as time allows.

Maybe it would be worth uploading the project to PyPI at some point, but that can wait.

As noted, "Scientific software tends to have more complex dependencies than most", and plantCV is no exception, primarily because it requires OpenCV to be installed. One could imagine automatic dependency handling to enable a user to install both plantCV and OpenCV in one shot, but it is not entirely obvious how to do this. So we should probably just update the docs to show that homebrew makes it relatively easy to install OpenCV on Macs, and otherwise defer worrying about this.

Passing args.roi mask from parallel to analysis

Using plantcv-pipeline.py to specify an image mask does not currently pass the information to the jobs it creates. For reference, the error I received was

OpenCV Error: Assertion failed ((scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F)) in cvtColor, file /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3959
Traceback (most recent call last):
 File "/home/jeffrey/Desktop/plantcv_test.py", line 118, in <module>
   main()
 File "/home/jeffrey/Desktop/plantcv_test.py", line 51, in main
   device, brass_mask1 = pcv.rgb2gray_hsv(brass_mask, 'v', device, args.debug)
 File "/home/jeffrey/plantcv/lib/plantcv/rgb2gray_hsv.py", line 14, in rgb2gray_hsv
cv2.error: /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp:3959: error: (-215) (scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F) in function cvtColor

If the mask is specified in the analysis script via default=my_mask.png, the pipeline does work.

Alt Parallelization Scheme

Alternative parallelization schema for PlantCV that will allow the selection of some metadata (angle etc).

Database Plotting

Add scripts to allow plotting from database so you can select images to plot based on more detailed metadata.

Fix path/URI in installation instructions

These things in instructions seem to be outdated (reported by someone via email).

git clone https://github.com/nfahlgren/plantcv.git
export PYTHONPATH=$PYTHONPATH:$HOME/lib/opencv/lib/python2.6/site-packages:$HOME/plantcv

Acute function- whole plant morphological landmark detection

A method that uses localized contour shape for segmenting out regions of high contrast within contours of plant masks. This method has shown some initial success with Setaria viridis for tracking discrete regions within plants during tiller exertion and with further development it may become a more flexible tool that can be broadly applied to other systems and distinct organ types (grass inflorescences, complex dicot leaves, etc...).

Multi-Plant Region of Interest

Multi-Plant Region of Interest:

Will be adding a function specifically to isolate multiple-plants in a field-of-view. We are using it for welled-plates but will write the function so it generally works for multiple plants per plate or pots.

fill broken

I tried to run the fill command, copying the example in the docummentation page:

device, binary_img = pcv.median_blur(img, 5, device, debug=True)
device, mask = pcv.median_blur(img, 5, device, debug=True)
device, fill_image = pcv.fill(binary_img, mask, 200, device, debug=True)

The median_blur works fine, but I get the following error from the fill

Traceback (most recent call last):
  File "./test_fill.py", line 39, in <module>
    main()
  File "./test_fill.py", line 37, in main
    device, fill_image = pcv.fill(binary_img, mask, 200, device, debug=True)
  File "/home/sur/lib/plantcv/lib/plantcv/fill.py", line 15, in fill
    ix,iy= np.shape(img)
ValueError: too many values to unpack

I'm not a python expert, but I understand this means some problem with assigning variable types.
Thanks

Crop-Position-Mask

Bug for crop mask function, ValueError: negative dimensions are not allowed

Metadata for figshare dataset 1

A few suggestions for a version 13 of https://figshare.com/articles/DDPSC_Phenotyping_Manuscript_1_Files/1272859

  • Add DOI for the relevent publication:
    http://doi.org/10.1016/j.molp.2015.06.005
  • Add link to plantCV v1 source code archive:
    http://doi.org/10.6084/m9.figshare.1447311
    • Details about which script produced which output file would be nice.
      Even better would be a Makefile to regenerate the ouput on demand.
    • Aside: the figshare page
      for the archived source tree
      is really terrible:
      no DOI and no link to GitHub commit on that page.
      Could archiving on Zenodo be any better?
  • Add a ReadMe file
    • I will try to find time to draft one.

OpenCV 3.x

Hi,

Do you have a plan to upgrade plantcv to support opencv 3.x which has quite a few API changes? We tried to deploy plantcv on some HPC clusters which have GPU/CUDA 7.0 deployed. But opencv 2.x is too old for the cuda api version supported.

Or opencv 3.x is already supported by a branch?

Thanks,
Yan

Add documentation how-to

Add instructions and style-guide on how to create or edit the documentation, which is now embedded in the git repository itself and can be updated on a commit-level basis where necessary.

Database does not exist

When you run image_analysis.pl without the -c flag and the database does not exist it causes an error. We already check for the existence of the database to warn for overwrite, but need to check for the opposite.

image_analysis scripts cause opencv crash on Lemnatec_Indoor fahlgren 2015 dataset

In plantcv source code, I tested the image_analysis scripts to handle three types of input images from the LemnatecIndoor image collection from http://figshare.com/articles/DDPSC_Phenotyping_Manuscript_1_Files/1272859 : NIR_SV, VIS_SV, VIS_TV. However, when i randomly pick three images from the sample data in box, one from each type, only VIS_SV worked with tweaking. The other two types crashed opencv.

Data is retrieved from https://uofi.app.box.com/terraref-box-shared/1/4678953842

The error I encountered is:
OpenCV Error: Assertion failed ((scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F)) in cvtColor, file /home/ubuntu/software/opencv/modules/imgproc/src/color.cpp, line 3959 Traceback (most recent call last): File "/home/ubuntu/plantcv/scripts/image_analysis/vis_tv/vis_tv_z3000_L1.py", line 118, in <module> main() File "/home/ubuntu/plantcv/scripts/image_analysis/vis_tv/vis_tv_z3000_L1.py", line 61, in main device, brass_mask1 = pcv.rgb2gray_hsv(brass_mask, 'v', device, args.debug) File "/home/ubuntu/plantcv/lib/plantcv/rgb2gray_hsv.py", line 14, in rgb2gray_hsv hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) cv2.error: /home/ubuntu/software/opencv/modules/imgproc/src/color.cpp:3959: error: (-215) (scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F) in function cvtColor
The command I ran is:
~/plantcv/scripts/image_analysis/vis_tv/vis_tv_z3000_L1.py -i ./VIS_TV_z3000_329934.jpg -o output

Convert documentation to readthedocs

I am working on converting our existing documentation to readthedocs and will release a v1.1 with the updated documentation. Once I'm done with that, we will add the v1.1 documentation to the dev branch and then people can start collaboratively developing the documentation for v2.0.

Remove MatPlotLib Plotting

We think matplotlib plotting functions are limiting our ability to run PlantCV over 14 cpu. To overcome this we are trying to remove matplotlib functions (or make output optional) wherever possible.

Output time resolution in seconds

Different versions of the Perl module Time::Local output epoch time in either second precision (integer) or millisecond precision (float). This causes a problem with the downstream database queries. I need to explicitly recast seconds as an integer.

Color normalization

Normalize color between images with inconsistent lighting, would require a color standard in the image.

PlantCV Parallel Pipeline: Database should be created by default

When running PlantCV parallel pipeline script (plantcv-pipeline.py) if sqlite db already exists it prompts for an overwrite.

If on a non-interactive system, such as a queuing system it will then either hang or exit as if all went normally.

Maybe reverse it and create database by default or add an option to auto overwrite.

Morphological functions (dilate and erode)

The documentation for these functions suggests that they accept kernels, but they now only accept odd integers and build the kernels internally. This might be fine and we can just update the documentation. Is there a use case where it would be useful to supply a custom kernel? We only build symmetric kernels with the supplied input, is it useful to make other types?

snapshot ID

The snapshot_id assigned by image_analysis.pl uses a local index to group images into snapshots. This fails to assign the correct snapshot_id to VIS TV images because they are processed separately from VIS SV images. I am realizing now that the datetime field could be used as the snapshot ID instead since it is already unique for images from the same snapshot. I propose removing snapshot_id from the database.

A more basic tutorial on building pipelines?

I have been going through the 'vis tutorial' again.

The individual steps are clear and nicely illustrated, but I have no idea how one should build a brand new pipeline or adapt/optimize an existing one. The method seems to be to copy-and-paste an existing pipeline then iteratively adjust the threshold values and eyeball the results. I find this harder to think about once the pipeline diverges (should I put more effort into optimizing saturation or blue-yellow?), partly because the downstream files (the ones that do not have a threshold value baked into their name) get overwritten when I (foolishly?) rerun a pipeline in the same directory. Perhaps I just need to experiment further and/or read more.

A hypothetical new tutorial might start with some species with a simpler shape. Alternatively, it might be illustrative to start with a more challenging background.

Semi-related note 1: specifying an output directory with the -o flag has no effect for me. The intermediate images created with in debug mode always show up in my current directory. Perhaps I have some shell or python variable configured oddly.

Semi-related note 2: is the 'parallelization' perl script deprecated in favor of the python one? If so, it would be nice to update that tutorial at some point.

Boundary Line Tool

Boundary line tool doesn't show up properly for images that are not the same size as lemnatec captured ones.

Python path more generic

We should update the paths to the python executable to be more generic. Instead of

!/usr/bin/python

we should use

!/bin/env python

Optional image output

Currently a user can decide whether or not to output analysis images by modifying an image analysis script. Instead we propose to make this a standard option switch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.