Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Baby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Swain Lab
Baby
Merge requests
!1
fix requirements and add fig1 example
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix requirements and add fig1 example
updates
into
master
Overview
0
Commits
2
Changes
5
Merged
jpietsch
requested to merge
updates
into
master
2 years ago
Overview
0
Commits
2
Changes
1
Expand
0
0
Merge request reports
Compare
version 1
version 1
77dcdebd
2 years ago
master (base)
and
latest version
latest version
de8322ce
2 commits,
2 years ago
version 1
77dcdebd
1 commit,
2 years ago
Show latest version
1 file
+
20
−
15
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
README.md
+
63
−
28
Options
# B
aby
# B
ABY
## Birth Annotation for Budding Yeast
Neural network code for segmenting buds from brightfield stacks.
An image processing pipeline for accurate single-cell growth estimation of
budding cells from bright-field stacks. The Birth Annotator for Budding Yeast
(BABY) features:
-
segmentation of overlapping cells, e.g., where small buds overlap with their mothers/sisters,
-
automated assignment of buds to mothers, and
-
estimation of the time of birth (cytokinesis) from growth rate.
The algorithm is described in:
Julian M J Pietsch, Alán F Muñoz, Diane-Yayra A Adjavon, Ivan B N Clark, Peter
S Swain, 2022, A label-free method to track individuals and lineages of
budding cells (in submission).
## Installation
BABY requires Python 3 and
[
TensorFlow
](
https://www.tensorflow.org
)
. For some
versions of TensorFlow, you specifically need Python 3.6.
BABY can be used with Python versions 3.6-3.8 (see below for details). If you
wish to use the latest compatible versions of all packages, BABY can simply be
installed by first obtaining this repository (e.g.,
`git clone
https://git.ecdf.ed.ac.uk/jpietsch/baby.git`
), and then using pip:
In any case, it is recommended that you install the package into a virtual
environment (i.e.,
`conda create`
if you are using Anaconda, or
`python3 -m
venv`
otherwise).
```
bash
>
pip
install
baby/
```
By default, BABY will trigger installation of the latest version of
TensorFlow. Our experience, however, is that performance is best with
TensorFlow version 1.14. If you want to use this version, first install that
in your virtual environment by running:
NB: You can update by running:
`pip install -U baby/`
.
*Developers:*
You may prefer to install an editable version:
```
bash
>
pip
install
tensorflow
==
1.14
>
pip
install
-e
baby/
```
**NB:**
To make use of a GPU you should also follow the
[
set up
instructions
](
https://www.tensorflow.org/install/gpu#windows_setup
)
for
installing
`tensorflow-gpu`
.
**Requirements for Python and TensorFlow**
Install BABY by first obtaining this repository (e.g.,
`git clone
https://git.ecdf.ed.ac.uk/jpietsch/baby.git`
), and then using pip:
BABY requires Python 3 and
[
TensorFlow
](
https://www.tensorflow.org
)
. The
models were trained in TensorFlow 1.14.0, but are compatible with versions of
TensorFlow up to 2.3.4. The required version of Python depends on the version
of TensorFlow you choose. We recommend either:
-
Python 3.6 and TensorFlow 1.14,
-
Python 3.7 and TensorFlow 1.15, or
-
Python 3.8 and TensorFlow 2.3.
In any case, it is recommended that you install TensorFlow and all other
required packages into a virtual environment (i.e.,
`conda create`
if you are
using Anaconda, or
`python3 -m venv`
otherwise).
By default, BABY will trigger installation of the highest compatible version of
TensorFlow. If you want to use an earlier version as suggested above, then
first install that version in your virtual environment by running:
```
bash
>
pip
install
baby/
>
pip
install
tensorflow
==
1.14
```
NB: If you are upgrading, then you may instead need to run:
`pip install -U
baby/`
.
and then follow the instructions for installing BABY as above.
*Developers:*
You may prefer to install an editable version:
**NB:**
To make use of a GPU you should also follow the other
[
set up
instructions
](
https://www.tensorflow.org/install/gpu
)
.
**NB:**
For
`tensorflow==1.14`
, you will also need to downgrade the default
version of
`h5py`
:
```
bash
>
pip
install
-e
baby/
>
pip uninstall h5py
>
pip
install
h5py
==
2.9.0
```
## Run using the Python API
@@ -93,6 +122,18 @@ as an annotated tiled png:
...
{
k
:
s
[
0
][
k
]
for
k
in
(
'
cell_label
'
,
'
mother_assign
'
,
'
volumes
'
)})
```
## Jupyter notebooks
More extensive examples for using BABY can be found in the
`python/notebooks`
folder. To maintain the repository in a clean state, it's probably best to
copy these to another directory for routine use. If you want to share a
notebook, you can then specifically add it back to the repository at a useful
checkpoint.
The notebooks include a
[
complete
example
](
python/notebooks/example-baby-analysis-fig1.ipynb
)
for reproducing
Figure 1e in the associated paper.
## Run via a server
Once installed, you should be able to start a server to accept segmentation
@@ -112,9 +153,3 @@ Server runs by default on [http://0.0.0.0:5101](). HTTP requests need to be
sent to the correct URL endpoint, but the HTTP API is currently undocumented.
The primary client implementation is in Matlab.
## Jupyter notebooks
Training scripts are saved in Jupyter notebooks in the
`notebooks`
folder. To
maintain the repository in a clean state, it's probably best to copy these to
another directory for routine use. If you want to share a notebook, you can
then specifically add it back to the repository at a useful checkpoint.
Loading