ml_defectdetection

Machine learning models to detect topological defects in biological tissues

https://github.com/killeena/ml_defectdetection

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Machine learning models to detect topological defects in biological tissues

Basic Info
  • Host: GitHub
  • Owner: KilleenA
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 6.71 MB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 4
  • Open Issues: 0
  • Releases: 3
Created about 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

ML_DefectDetection

Machine learning models to detect topological defects in biological tissues. A full description of the rationale and methodology can be found online at https://arxiv.org/abs/2303.08166.

This repository contains a pre-trained convolutional neural network (CNN) model, created using TensorFlow, for detecting nematic defects in 2D biological tissues (found in 'SavedModel'). It can be run using 'detect_defects'. Each input file should contain rows of 3 columns, with each row corresponding to a different constituent/cell and the 3 columns corresponding to x position of the cell's centre of mass (CoM), its y position and the orientation of the cell's long axis direction in radians respectively. The x and y coordinates of the cell's CoM should be appropriately scaled such that one length unit corresponds to the characteristic length of one cell (e.g. if cells are ~20um in width then 20um = 1 length unit in saved files).

In detectdefects the user must set the location of the input data (datafilepath) and the desired location of the detected defect coordinates (savefilepath, posdefpath and negdefpath). The grid spacing must also be chosen such that defect cores are properly captured within 'regions of interest'. gridspacing should be chosen such that the defect core can be captured within a window with sides of length ~8*grid_spacing

A folder with example input data, generated using an Active Vertex Model (AVM) [1], can be found at 'CellFiles'.

A ready to run jupypter notebook example can be found in the Example folder. This breaks down 'detect_defects' into step-by-step sections, with intermediate results plotted.

In addition to using the trained model, different models can be built, trained and tested using 'trainandtestmodel', which uses 'nninputs' and correpsonding 'nn_labels' to train and test the model. These preprocessed inputs were obtained from AVM simulations.

The detected defects can also be plotted, along with the coordinates of the cells' centre of mass and orientation of their long-axes, using the 'defect_plotting.gnu'. This requires the installation of plotting software gnuplot (freely available at: https://sourceforge.net/projects/gnuplot/).

[1] Andrew Killeen, Thibault Bertrand, Chiu Fan Lee, Polar Fluctuations Lead to Extensile Nematic Behavior in Confluent Tissues, Physical Review Letters, 128, 078001 (2022).

Owner

  • Login: KilleenA
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.0.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Killeen
    given-names: Andrew
    orcid: https://orcid.org/0000-0003-2416-3093
title: "Machine Learning Defect Detection"
version: 1.0.0
doi: 10.5281/zenodo.7805404
date-released: 2023-04-06
url: "https://github.com/KilleenA/ML_DefectDetection"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Dependencies

requirements.txt pypi
  • matplotlib ==3.5.1
  • numpy ==1.23.5
  • preprocessing ==0.1.13
  • scikit_image ==0.19.2
  • scipy ==1.10.0
  • tensorflow ==2.10.1