deepflash2
A deep-learning pipeline for segmentation of ambiguous microscopic images.
Science Score: 77.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
Found 8 DOI reference(s) in README -
✓Academic publication links
Links to: nature.com, zenodo.org -
✓Committers with academic emails
1 of 5 committers (20.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.9%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A deep-learning pipeline for segmentation of ambiguous microscopic images.
Basic Info
- Host: GitHub
- Owner: matjesg
- License: apache-2.0
- Language: Jupyter Notebook
- Default Branch: master
- Homepage: https://matjesg.github.io/deepflash2/
- Size: 205 MB
Statistics
- Stars: 59
- Watchers: 2
- Forks: 11
- Open Issues: 3
- Releases: 20
Topics
Metadata Files
README.md
Welcome to

Official repository of deepflash2 - a deep-learning pipeline for segmentation of ambiguous microscopic images.
The best of two worlds: Combining state-of-the-art deep learning with a barrier free environment for life science researchers.
Read the paper, watch the tutorials, or read the docs.
- No coding skills required (graphical user interface) - Ground truth estimation from the annotations of multiple experts for model training and validation - Quality assurance and out-of-distribution detection for reliable prediction on new data - Best-in-class performance for semantic and instance segmentation


Kaggle Gold Medal and Innovation Price Winner: The deepflash2 Python API built the foundation for winning the Innovation Award a Kaggle Gold Medal in the HuBMAP - Hacking the Kidney challenge. Have a look at our solution
Quick Start and Demo
Get started in less than a minute. Watch the tutorials for help.
Demo on Hugging Face Spaces
Go to the demo space -- inference only (no training possible).
Demo usage with Google Colab
For a quick start, run deepflash2 in Google Colaboratory (Google account required).
The GUI provides a build-in use for our sample data.
- Starting the GUI (in Colab or follow the installation instructions below)
- Select the task (GT Estimation, Training, or Prediction)
- Click the
Load Sample Databutton in the sidebar and continue to the next sidebar section.
For futher instructions watch the tutorials.
We provide an overview of the tasks below:
| | Ground Truth (GT) Estimation | Training | Prediction | |---|---|---|---| | Main Task | STAPLE or Majority Voting | Ensemble training and validation | Semantic and instance segmentation | | Sample Data | 5 masks from 5 experts each | 5 image/mask pairs | 5 images and 2 trained models | | Expected Output | 5 GT Segmentation Masks | 5 models | 5 predicted segmentation masks (semantic and instance) and uncertainty maps| | Estimated Time | ~ 1 min | ~ 150 min | ~ 4 min |
Times are estimated for Google Colab (with free NVIDIA Tesla K80 GPU).
Paper and Experiments
We provide a complete guide to reproduce our experiments using the deepflash2 Python API here. The data is currently available on Google Drive and Zenodo.
Our Nature Communications article is available here. Please cite
@article{Griebel2023,
doi = {10.1038/s41467-023-36960-9},
url = {https://doi.org/10.1038/s41467-023-36960-9},
year = {2023},
month = mar,
publisher = {Springer Science and Business Media {LLC}},
volume = {14},
number = {1},
author = {Matthias Griebel and Dennis Segebarth and Nikolai Stein and Nina Schukraft and Philip Tovote and Robert Blum and Christoph M. Flath},
title = {Deep learning-enabled segmentation of ambiguous bioimages with deepflash2},
journal = {Nature Communications}
}
System requirements
Works in the browser or on your local pc/server
deepflash2 is designed to run on Windows, Linux, or Mac (x86-64) if pytorch is installable. We generally recommend using Google Colab as it only requires a Google Account and a device with a web browser. To run deepflash2 locally, we recommend using a system with a GPU (e.g., 2 CPUs, 8 GB RAM, NVIDIA GPU with 8GB VRAM or better).
deepflash2 requires Python>3.6 and the software dependencies are defined in the settings.ini file. Additionally, the ground truth estimation functionalities are based on simpleITK>=2.0 and the instance segmentation capabilities are complemented using cellpose v0.6.6.dev13+g316927e.
deepflash2 is tested on Google Colab (Ubuntu 18.04.5 LTS) and locally (Ubuntu 20.04 LTS, Windows 10, MacOS 12.0.1).
Installation Guide
Typical install time is about 1-5 minutes, depending on your internet connection
The GUI of deepflash2 runs as a web application inside a Jupyter Notebook, the de-facto standard of computational notebooks in the scientific community. The GUI is built on top of the deepflash2 Python API, which can be used independently (read the docs).
Google Colab
Open Colab and excute the Set up environment cell or follow the pip instructions. Colab provides free access to graphics processing units (GPUs) for fast model training and prediction (Google account required).
Other systems
We recommend installation into a clean Python 3.7, 3.8, or 3.9 environment (e.g., using conda).
mamba/conda
Installation with mamba (installaton instructions) allows a fast and realiable installation process (you can replace mamba with conda and add the --update-all flag to do the installation with conda).
bash
mamba install -c fastchan -c conda-forge -c matjesg deepflash2
pip
If you want to use your GPU and install with pip, we recommend installing PyTorch first by following the installation instructions.
bash
pip install -U deepflash2
Using the GUI
If you want to use the GUI, make sure to download the GUI notebook, e.g., using curl
bash
curl -o deepflash2_GUI.ipynb https://raw.githubusercontent.com/matjesg/deepflash2/master/deepflash2_GUI.ipynb
and start a Jupyter server.
bash
jupyter notebook
Then, open deepflash2_GUI.ipynb within Notebook environment.
Docker
Docker images for deepflash2 are built on top of the latest pytorch image.
- CPU only
>
docker run -p 8888:8888 matjes/deepflash2 ./run_jupyter.sh - For training, we recommend to run docker with GPU support (You need to install Nvidia-Docker to enable gpu compatibility with these containers.)
>
docker run --gpus all --shm-size=256m -p 8888:8888 matjes/deepflash2 ./run_jupyter.sh
All docker containers are configured to start a jupyter server. To add data, we recomment using bind mounts with /workspace as target. To start the GUI, open deepflash2_GUI.ipynb within Notebook environment.
For more information on how to run docker see docker orientation and setup.
Creating segmentation masks with Fiji/ImageJ
If you don't have labelled training data available, you can use this instruction manual for creating segmentation maps. The ImagJ-Macro is available here.
Owner
- Name: Matthias Griebel
- Login: matjesg
- Kind: user
- Location: Berlin
- Twitter: matjesg
- Repositories: 4
- Profile: https://github.com/matjesg
Citation (CITATION.cff)
cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Griebel
given-names: Matthias
orcid: https://orcid.org/0000-0003-1959-0242
- family-names: Segebarth
given-names: Dennis
- family-names: Stein
given-names: Nikolai
- family-names: Schukraft
given-names: Nina
- family-names: Tovote
given-names: Philip
- family-names: Blum
given-names: Robert
- family-names: Flath
name-particle: M.
given-names: Christoph
title: "Deep learning-enabled segmentation of ambiguous bioimages with deepflash2"
version: 0.2.2
license: "Apache-2.0"
date-released: 2021-03-29
GitHub Events
Total
- Issues event: 1
- Watch event: 3
- Delete event: 1
- Issue comment event: 2
- Pull request event: 2
- Create event: 2
Last Year
- Issues event: 1
- Watch event: 3
- Delete event: 1
- Issue comment event: 2
- Pull request event: 2
- Create event: 2
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Matthias Griebel | m****l@u****e | 372 |
| Matthias Griebel | g****s@g****m | 51 |
| dependabot[bot] | 4****] | 15 |
| nikolai_stein | n****6@g****m | 2 |
| natbutter | n****r@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 15
- Total pull requests: 50
- Average time to close issues: 24 days
- Average time to close pull requests: 12 days
- Total issue authors: 13
- Total pull request authors: 5
- Average comments per issue: 1.67
- Average comments per pull request: 0.52
- Merged pull requests: 38
- Bot issues: 0
- Bot pull requests: 25
Past Year
- Issues: 2
- Pull requests: 10
- Average time to close issues: 20 days
- Average time to close pull requests: 22 days
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 0.5
- Average comments per pull request: 0.3
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 9
Top Authors
Issue Authors
- AmSchulte (2)
- Maddonix (2)
- zhangqioct (1)
- Fangjunfan123 (1)
- Random5747 (1)
- mu745511 (1)
- AnthonyChanMarvel (1)
- Xol546 (1)
- AscheJan (1)
- matjesg (1)
- jaideep11061982 (1)
- sreevishnu-damodaran (1)
- pakiessling (1)
- BubbleDirk (1)
Pull Request Authors
- dependabot[bot] (33)
- matjesg (17)
- mariusschroeter (5)
- nicoelbert (3)
- natbutter (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- github-pages >= 0 development
- jekyll >= 3.7
- jekyll-remote-theme >= 0
- kramdown >= 2.3.1
- nokogiri < 1.13.7
- activesupport 6.0.3.6
- addressable 2.8.0
- coffee-script 2.4.1
- coffee-script-source 1.11.1
- colorator 1.1.0
- commonmarker 0.17.13
- concurrent-ruby 1.1.8
- dnsruby 1.61.5
- em-websocket 0.5.2
- ethon 0.12.0
- eventmachine 1.2.7
- execjs 2.7.0
- faraday 1.3.0
- faraday-net_http 1.0.1
- ffi 1.15.0
- forwardable-extended 2.6.0
- gemoji 3.0.1
- github-pages 214
- github-pages-health-check 1.17.0
- html-pipeline 2.14.0
- http_parser.rb 0.6.0
- i18n 0.9.5
- jekyll 3.9.0
- jekyll-avatar 0.7.0
- jekyll-coffeescript 1.1.1
- jekyll-commonmark 1.3.1
- jekyll-commonmark-ghpages 0.1.6
- jekyll-default-layout 0.1.4
- jekyll-feed 0.15.1
- jekyll-gist 1.5.0
- jekyll-github-metadata 2.13.0
- jekyll-mentions 1.6.0
- jekyll-optional-front-matter 0.3.2
- jekyll-paginate 1.1.0
- jekyll-readme-index 0.3.0
- jekyll-redirect-from 0.16.0
- jekyll-relative-links 0.6.1
- jekyll-remote-theme 0.4.3
- jekyll-sass-converter 1.5.2
- jekyll-seo-tag 2.7.1
- jekyll-sitemap 1.4.0
- jekyll-swiss 1.0.0
- jekyll-theme-architect 0.1.1
- jekyll-theme-cayman 0.1.1
- jekyll-theme-dinky 0.1.1
- jekyll-theme-hacker 0.1.2
- jekyll-theme-leap-day 0.1.1
- jekyll-theme-merlot 0.1.1
- jekyll-theme-midnight 0.1.1
- jekyll-theme-minimal 0.1.1
- jekyll-theme-modernist 0.1.1
- jekyll-theme-primer 0.5.4
- jekyll-theme-slate 0.1.1
- jekyll-theme-tactile 0.1.1
- jekyll-theme-time-machine 0.1.1
- jekyll-titles-from-headings 0.5.3
- jekyll-watch 2.2.1
- jemoji 0.12.0
- kramdown 2.3.1
- kramdown-parser-gfm 1.1.0
- liquid 4.0.3
- listen 3.5.1
- mercenary 0.3.6
- mini_portile2 2.8.0
- minima 2.5.1
- minitest 5.14.4
- multipart-post 2.1.1
- nokogiri 1.13.6
- octokit 4.20.0
- pathutil 0.16.2
- public_suffix 4.0.6
- racc 1.6.0
- rb-fsevent 0.10.4
- rb-inotify 0.10.1
- rexml 3.2.5
- rouge 3.26.0
- ruby-enum 0.9.0
- ruby2_keywords 0.0.4
- rubyzip 2.3.0
- safe_yaml 1.0.5
- sass 3.7.4
- sass-listen 4.0.0
- sawyer 0.8.2
- simpleidn 0.2.1
- terminal-table 1.8.0
- thread_safe 0.3.6
- typhoeus 1.4.0
- tzinfo 1.2.10
- unf 0.1.4
- unf_ext 0.0.7.7
- unicode-display_width 1.7.0
- zeitwerk 2.4.2
- pytorch/pytorch latest build
- actions/checkout main composite
- actions/setup-python v2 composite
- actions/checkout v1 composite
- actions/setup-python v1 composite