Skip to content

Commit

Permalink
Update notebooks organization
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeschamps committed Nov 8, 2024
1 parent c72726e commit 97e5ef6
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 59 deletions.
25 changes: 20 additions & 5 deletions docs/algorithms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ each algorithm.
<div class="component-wrapper" style="display: block;">
<div class="responsive-grid">
<!-- N2V -->
<a class="card-wrapper" href="n2v/Noise2Void">
<a class="card-wrapper" href="Noise2Void">
<div class="card">
<div class="card-body">
<div class="logo">
Expand All @@ -55,7 +55,7 @@ each algorithm.
</div>
</a>
<!-- N2V2 -->
<a class="card-wrapper" href="n2v2/N2V2">
<a class="card-wrapper" href="N2V2">
<div class="card">
<div class="card-body">
<div class="logo">
Expand All @@ -80,7 +80,7 @@ each algorithm.
</div>
<div class="responsive-grid">
<!-- structN2V -->
<a class="card-wrapper" href="structn2v/structN2V">
<a class="card-wrapper" href="structN2V">
<div class="card">
<div class="card-body">
<div class="logo">
Expand All @@ -102,8 +102,23 @@ each algorithm.
</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>


## Supervised restoration without ground-truth


<div class="md-container secondary-section">
<div class="g">
<div class="section">
<div class="component-wrapper" style="display: block;">
<div class="responsive-grid">
<!-- Noise2Noise -->
<a class="card-wrapper" href="n2n">
<a class="card-wrapper" href="Noise2Noise">
<div class="card">
<div class="card-body">
<div class="logo">
Expand Down Expand Up @@ -140,7 +155,7 @@ each algorithm.
<div class="component-wrapper" style="display: block;">
<div class="responsive-grid">
<!-- N2V -->
<a class="card-wrapper" href="care">
<a class="card-wrapper" href="CARE">
<div class="card">
<div class="card-body">
<div class="logo">
Expand Down
233 changes: 228 additions & 5 deletions docs/applications/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,230 @@
---
icon: octicons/file-media-24
description: Applications
---

# Applications

- training multiple channels
- training on custom data type
- early stopping
- training a custom model
- what is the receptive field?
Click on your algorithm of choice to explore various applications. We collected the
algorithms based on the type of training data they require!

## Keywords

- **no ground-truth**: The algorithm trains without clean images.
- **single image**: The algorithm can train on a single image.
- **pairs of noisy images**: The algorithm requires pairs of noisy images.
- **ground-truth**: The algorithm requires pairs of clean and noisy images.


## Denoising noisy images without clean data

You have noisy images and no clean images? No problem! These algorithms can help you, as
they do not require any ground-truth data. You can also train on a single image of
reasonable size.

<div class="md-container secondary-section">
<div class="g">
<div class="section">
<div class="component-wrapper" style="display: block;">
<div class="responsive-grid">
<!-- N2V -->
<a class="card-wrapper" href="Noise2Void">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "cpu.svg"
</span>
</div>
<div class="card-content">
<h5>Noise2Void</h5>
<p>
A self-supervised denoising algorithm based on a
pixel masking scheme.
</p>
</div>
</div>
<div class="card-tags">
<span class=tag>no ground-truth</span>
<span class=tag>single image</span>
</div>
</div>
</a>
<!-- N2V2 -->
<a class="card-wrapper" href="N2V2">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "cpu.svg"
</span>
</div>
<div class="card-content">
<h5>N2V2</h5>
<p>
A variant of Noise2Void capable of removing
checkboard artefacts.
</p>
</div>
</div>
<div class="card-tags">
<span class=tag>no ground-truth</span>
<span class=tag>single image</span>
</div>
</div>
</a>
</div>
<div class="responsive-grid">
<!-- structN2V -->
<a class="card-wrapper" href="structN2V">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "cpu.svg"
</span>
</div>
<div class="card-content">
<h5>StructN2V</h5>
<p>
A variant of Noise2Void that uses an enhanced mask
to remove structured noise.
</p>
</div>
</div>
<div class="card-tags">
<span class=tag>no ground-truth</span>
<span class=tag>single image</span>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>


If you have multiple noisy instances of the same structure (e.g. a noisy time-lapse),
then Noise2Noise might be the right choice for you.

<!-- The following links are pointing to non existing pages (pre-build) -->
<!-- Disable markdown link check to allow bulding the pages -->
<!-- markdown-link-check-disable -->
<div class="md-container secondary-section">
<div class="g">
<div class="section">
<div class="component-wrapper" style="display: block;">
<div class="responsive-grid">
<!-- Noise2Noise -->
<a class="card-wrapper" href="Noise2Noise">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "cpu.svg"
</span>
</div>
<div class="card-content">
<h5>Noise2Noise</h5>
<p>
A supervised methods that can denoise images without
corresponding clean data.
</p>
</div>
</div>
<div class="card-tags">
<span class=tag>no ground-truth</span>
<span class=tag>pairs of noisy images</span>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>


## Supervised restoration with clean images

If you have pairs of clean (e.g. high SNR, long exposure or high laser power) and noisy
images, then CARE might be the right choice for you.

Note that CARE can be used for a variety of tasks, such as denoising, deconvolution,
isotropic resolution restoration or projection.


<div class="md-container secondary-section">
<div class="g">
<div class="section">
<div class="component-wrapper" style="display: block;">
<div class="responsive-grid">
<!-- N2V -->
<a class="card-wrapper" href="CARE">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "cpu.svg"
</span>
</div>
<div class="card-content">
<h5>CARE</h5>
<p>
The original supervised method to restore microscopy
images.
</p>
</div>
</div>
<div class="card-tags">
<span class=tag>ground-truth</span>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>



## Using the Lightning API

If you need more control on the algorithm training, for instance to implement or replace
features, you can use the Lightning API.

It uses [PyTorch Lightning](https://lightning.ai/docs/pytorch/stable/) and the
CAREamics Lightning components.


<div class="md-container secondary-section">
<div class="g">
<div class="section">
<div class="component-wrapper" style="display: block;">
<div class="responsive-grid">
<!-- N2V -->
<a class="card-wrapper" href="Lightning_API">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "cpu.svg"
</span>
</div>
<div class="card-content">
<h5>Lightning API</h5>
<p>
Get full control of the training and prediction
pipelines by using CAREamics Lightning components.
</p>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
18 changes: 7 additions & 11 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,13 @@ nav:
- guides/dev_resources/docstring.md
- Applications:
- applications/index.md
- Noise2Void: applications/n2v/
- N2V2: applications/n2v2/
- structN2V: applications/structn2v/
- Noise2Noise: applications/n2n/
- CARE: applications/care/
- Lightning API: applications/lightning_api/
- Algorithms:
- algorithms/index.md
- Noise2Void: algorithms/n2v/
- N2V2: algorithms/n2v2/
- structN2V: algorithms/structN2V/
- Noise2Void: applications/Noise2Void/
- N2V2: applications/N2V2/
- structN2V: applications/structN2V/
- Noise2Noise: applications/Noise2Noise/
- CARE: applications/CARE/
- Lightning API: applications/Lightning_API/
- Algorithms: algorithms/

- Code Reference: reference/

Expand Down
12 changes: 3 additions & 9 deletions scripts/check_out_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ fi


# Process all algorithms
echo "Copy algorithms"
count=$(jq ".${ALGO} | length" "$JSON")
for i in $(seq 0 $(($count - 1))); do
path_in_repo=$(jq -r ".${ALGO}[$i].source" "$JSON")
destination=$(jq -r ".${ALGO}[$i].destination" "$JSON")
title=$(jq -r ".${ALGO}[$i].name" "$JSON")

# extract notebook file name (including extension)
Expand All @@ -47,18 +47,11 @@ for i in $(seq 0 $(($count - 1))); do
# add ".ipynb" extension to the title
title_ext="$title.ipynb"

# create the destination folder if it doesn't exist
directory="$DEST$ALGO/$destination"
if [ ! -d "$directory" ]; then
# If it doesn't exist, create it and its parent directories if needed
mkdir -p "$directory"
fi

# source of the notebook
source="$TEMP$repository_name/$path_in_repo"

# copy the notebook to DEST
NB_DEST="$DEST$ALGO/$destination/$title_ext"
NB_DEST="$DEST$ALGO/$title_ext"
cp $source $NB_DEST
echo "Copying from $source to $NB_DEST"

Expand All @@ -70,6 +63,7 @@ for i in $(seq 0 $(($count - 1))); do
done

# Process all applications
echo "Copy applications"
count=$(jq ".${APP} | length" "$JSON")
for i in $(seq 0 $(($count - 1))); do
path_in_repo=$(jq -r ".${APP}[$i].source" "$JSON")
Expand Down
Loading

0 comments on commit 97e5ef6

Please sign in to comment.