Package: cellml
CellMLDisclaimer:This program is undergoing active development and shouldnotbe 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.InstallationInstall with pipCellML is on PyPI so it can be installed with pippip install cellmlInstall from sourceClone the repository to your computergit clone https://github.com/caromccue/CellML.gitand install with pipcd CellML
pip install .UsageQuickstartA 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/directorycellml processcommandTheprocesscommand 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.csvfile 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 levelcellml segmentcommandThesegmentcommand 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 accordinglycellml traincommandThetraincommand 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 namedDetachedandAdherentcontaining grayscale images of segmented cells (use thesegmentcommand 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 levelRepository structuremodels: 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 interfacetests: unittestingLicenseThis project is licensed under the GPLv3 License - see theLICENSE.mdfile for details.CreditInitial models were built starting from the example at:https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.htmlLive data visualization class TrainingPlot originally from:https://github.com/kapil-varshney/utilities/blob/master/training_plot/trainingplot.py