CellML
Disclaimer: This program is undergoing active development and should not be used for production. All APIs and commands are susceptible to change without notice.
Integrated tool to segment individual cells from optical cell images and use machine learning to determine whether cells are adherent or not based on their shapes.
From a directory containing a time-series of images of cells on surfaces, the tool segments individual cells and uses a pre-trained CNN model to determine whether each cell is adherent or not.
Installation
Install with pip
CellML is on PyPI so it can be installed with pip
pip install cellml
Install from source
Clone the repository to your computer
git clone https://github.com/caromccue/CellML.git
and install with pip
cd CellML
pip install .
Usage
Quickstart
A time series of images of cells on surfaces must be stored in a directory prior to usage of CellML The application can then be used to process the images as follows:
cellml process --save-plot path/to/directory
cellml process command
The process command takes a directory of images, segments the cells in each image and determines how many cells are adherent or detached from the surface.
The program saves a .csv file at the root of that directory with the name of each image, the time it was taken (from EXIF data) and the number of cells (total, adherent and detached).
Arguments
-c,--check-segmentationdisplays the result of segmenting an image (selected at approximately 80% of the time series) to verify that the segmentation algorithm works well before processing.-o,--save-overlayresaves all images in the directory with an overlay showing detected cells in red (adherent) or green (detached) for process control.-p,--save-plotgenerates and saves plots of cell detachment over time-v,--verboseincreases the verbosity level
cellml segment command
The segment command runs the segmentation algorithm on an image or a directory of images and saves the segmented cell images to disk.
Arguments
-o,--save-overlayresaves all images in the directory with an overlay showing detected cells-v,--verboseincreases the verbosity level-p,--postsizeselects the size of microposts on the surfaces in the images to set the segmentation parameters accordingly
cellml train command
The train command is used to train the machine learning models used to label the segmented cells as adherent or not. A directory of training data is expected containing subdirectories named Detached and Adherent containing grayscale images of segmented cells (use the segment command to generate the images).
Arguments
-m,--modelselects the type of model to train (svm|cnn|cnn-transfer)-tb,--tensorboardsaves logs for tensorboard visualization in<cwd>/logs-v,--verboseincreases the verbosity level
Repository structure
models: pre-trained machine learning models for cell adhesion discriminationnotebooks: jupyer notebooks evaluating different image segmentation strategiessrc: source code for the projectcell_processing: processing pipeline from directory to detachment ratedata: data processing methods, including segmentation and extractionmodels: model definition and training scripts for the cell binary labelling taskvisualization: visualization and plotting methodscli.py: entry point to the command line interface
tests: unittesting
License
This project is licensed under the GPLv3 License - see the LICENSE.md file for details.
Credit
Initial models were built starting from the example at: https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html
Live data visualization class TrainingPlot originally from: https://github.com/kapil-varshney/utilities/blob/master/training_plot/trainingplot.py
Metadata
Release files for cellml 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cellml-0.1.1.tar.gz | 9.1 MB | Without provenance | Details |
Release files / cellml-0.1.1.tar.gz
| Download URL | cellml-0.1.1.tar.gz |
|---|---|
| Size | 9.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c095602f99a420593d75efb0a5ec7da4988565e270efb4c7b9a732b7aa9669d4
|
|
BLAKE2b-256 checksum How to use checksums |
2c5f92271cac5406115e3a6f8fa56c33546c3164ab3e3949c2078159f4dda8f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.24.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.50.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.8
|
Security for cellml 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.