Skip to content

Commit

Permalink
Merge pull request #26 from bmandracchia/nightly
Browse files Browse the repository at this point in the history
Nightly
  • Loading branch information
bmandracchia authored Oct 2, 2024
2 parents c3e85ee + 96a0b3c commit 417f037
Show file tree
Hide file tree
Showing 116 changed files with 1,201 additions and 5,131 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ipynb merge=nbdev-merge
11 changes: 11 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Generated by nbdev_install_hooks
#
# If you need to disable this instrumentation do:
# git config --local --unset include.path
#
# To restore:
# git config --local include.path ../.gitconfig
#
[merge "nbdev-merge"]
name = resolve conflicts with nbdev_fix
driver = nbdev_merge %O %A %B %P
51 changes: 19 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ Notebook](https://img.shields.io/badge/jupyter-%23f37626.svg?style=flat&logo=jup

## Overview

bioMONAI is a collaborative platform for developing and deploying deep
learning models in medical imaging using the MONAI framework, fastai, TorchIO, and Jupyter
notebooks. This project aims to facilitate interoperability,
reproducibility, and community collaboration in biomedical research.
bioMONAI is a low-code Python-based platform for developing and
deploying deep learning models in biomedical imaging built on top of the
[MONAI](https://monai.io/) framework,
[fastai](https://github.com/fastai/fastai), and
[TorchIO](https://torchio.readthedocs.io/). This project aims to
facilitate interoperability, reproducibility, and community
collaboration in biomedical research.

## Table of Contents

Expand All @@ -28,7 +31,7 @@ reproducibility, and community collaboration in biomedical research.

## Installation

To install the BioMONAI nbs environment, follow these steps:
To install the bioMONAI environment, follow these steps:

1. **Clone the repository:**

Expand Down Expand Up @@ -58,35 +61,18 @@ To install the BioMONAI nbs environment, follow these steps:

## Getting Started

To get started with BioMONAI, follow these steps:
To get started with bioMONAI, the best way is to try out our tutorials,
which will walk you through model training for various tasks like
classification, regression, and segmentation.

1. **Clone the repository:**

``` bash
git clone https://github.com/your_username/biomonai.git
cd biomonai
```

2. **Activate your Conda environment:**

``` bash
conda activate biomonai
```

3. **Open Jupyter Notebook:**

``` bash
jupyter notebook
```

4. **Navigate to the notebooks directory and open a sample notebook:**

- You should see a list of available notebooks in your browser. Open
one to start exploring!
| Notebook | Open in Colab |
|:--------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Tutorial classification](http://localhost:3348/902_demo_2.html) <br>(to be updated.) | [![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github.com/bmandracchia/bioMONAI/nightly/nbs/901_demo_RI2FL_2d.ipynb) |
| [Tutorial regression](https://nbviewer.org/github.com/bmandracchia/bioMONAI/nightly/nbs/901_demo_RI2FL_2d.ipynb) <br>(to be updated.) | [![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github.com/bmandracchia/bioMONAI/nightly/nbs/901_demo_RI2FL_2d.ipynb) |

## Usage

To use BioMONAI nbs for your own projects, follow these steps:
To use bioMONAI for your own projects, follow these steps:

1. **Create a new Jupyter notebook or open an existing one.**

Expand Down Expand Up @@ -132,7 +118,7 @@ nbs, follow these steps:

## License

BioMONAI is released under the Apache 2.0 license. See
bioMONAI is released under the Apache 2.0 license. See
[LICENSE](https://github.com/your_username/biomonai-nbs/blob/main/LICENSE)
for more details.

Expand All @@ -144,4 +130,5 @@ If you have any questions or need further assistance, please open an
issue on GitHub or contact us directly at:

- Project Lead: [Biagio Mandracchia](mailto:biagio.mandracchia@uva.es)
- Contributors: [Juan Pita-López](mailto:juan.pita@uva.es), [Rosa-María Menchón-Lara](mailto:rosamaria.menchon@uva.es)
- Contributors: [Juan Pita-López](mailto:juan.pita@uva.es), [Rosa-María
Menchón-Lara](mailto:rosamaria.menchon@uva.es)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 10 additions & 28 deletions _proc/_docs/callbacks.html → _docs/callbacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,24 +235,6 @@
<a href="./demo_ri2fl_2d.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Demo: 2D image RI2FL</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./demo_2.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Demo: 2D image RI2FL</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./template.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">template</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./fourier_ring_correlation.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">fourier_ring_correlation.html</span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -319,7 +301,7 @@ <h3 class="anchored" data-anchor-id="shortepochcallback">ShortEpochCallback</h3>
<blockquote class="blockquote">
<pre><code> ShortEpochCallback (pct=0.01, short_valid=True)</code></pre>
</blockquote>
<p>Fit just <code>pct</code> of an epoch, then stop</p>
<p><em>Fit just <code>pct</code> of an epoch, then stop</em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/training.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
Expand All @@ -328,7 +310,7 @@ <h3 class="anchored" data-anchor-id="gradientaccumulation">GradientAccumulation<
<blockquote class="blockquote">
<pre><code> GradientAccumulation (n_acc=32)</code></pre>
</blockquote>
<p>Accumulate gradients before updating weights</p>
<p><em>Accumulate gradients before updating weights</em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/tracker.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
Expand All @@ -338,7 +320,7 @@ <h3 class="anchored" data-anchor-id="earlystoppingcallback">EarlyStoppingCallbac
<pre><code> EarlyStoppingCallback (monitor='valid_loss', comp=None, min_delta=0.0,
patience=1, reset_on_fit=True)</code></pre>
</blockquote>
<p>A <code>TrackerCallback</code> that terminates training when monitored quantity stops improving.</p>
<p><em>A <code>TrackerCallback</code> that terminates training when monitored quantity stops improving.</em></p>
<table class="table">
<colgroup>
<col style="width: 6%">
Expand Down Expand Up @@ -397,7 +379,7 @@ <h3 class="anchored" data-anchor-id="savemodelcallback">SaveModelCallback</h3>
fname='model', every_epoch=False, at_end=False,
with_opt=False, reset_on_fit=True)</code></pre>
</blockquote>
<p>A <code>TrackerCallback</code> that saves the model’s best during training and loads it at the end.</p>
<p><em>A <code>TrackerCallback</code> that saves the model’s best during training and loads it at the end.</em></p>
<table class="table">
<colgroup>
<col style="width: 6%">
Expand Down Expand Up @@ -473,7 +455,7 @@ <h3 class="anchored" data-anchor-id="reducelronplateau">ReduceLROnPlateau</h3>
<pre><code> ReduceLROnPlateau (monitor='valid_loss', comp=None, min_delta=0.0,
patience=1, factor=10.0, min_lr=0, reset_on_fit=True)</code></pre>
</blockquote>
<p>A <code>TrackerCallback</code> that reduces learning rate when a metric has stopped improving.</p>
<p><em>A <code>TrackerCallback</code> that reduces learning rate when a metric has stopped improving.</em></p>
<table class="table">
<colgroup>
<col style="width: 6%">
Expand Down Expand Up @@ -546,7 +528,7 @@ <h3 class="anchored" data-anchor-id="paramscheduler">ParamScheduler</h3>
<blockquote class="blockquote">
<pre><code> ParamScheduler (scheds)</code></pre>
</blockquote>
<p>Schedule hyper-parameters according to <code>scheds</code></p>
<p><em>Schedule hyper-parameters according to <code>scheds</code></em></p>
<p><code>scheds</code> is a dictionary with one key for each hyper-parameter you want to schedule, with either a scheduler or a list of schedulers as values (in the second case, the list must have the same length as the the number of parameters groups of the optimizer).</p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/schedule.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
Expand All @@ -556,7 +538,7 @@ <h3 class="anchored" data-anchor-id="schedcos">SchedCos</h3>
<blockquote class="blockquote">
<pre><code> SchedCos (start, end)</code></pre>
</blockquote>
<p>Cosine schedule function from <code>start</code> to <code>end</code></p>
<p><em>Cosine schedule function from <code>start</code> to <code>end</code></em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/schedule.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
Expand All @@ -565,7 +547,7 @@ <h3 class="anchored" data-anchor-id="schedexp">SchedExp</h3>
<blockquote class="blockquote">
<pre><code> SchedExp (start, end)</code></pre>
</blockquote>
<p>Exponential schedule function from <code>start</code> to <code>end</code></p>
<p><em>Exponential schedule function from <code>start</code> to <code>end</code></em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/schedule.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
Expand All @@ -574,7 +556,7 @@ <h3 class="anchored" data-anchor-id="schedlin">SchedLin</h3>
<blockquote class="blockquote">
<pre><code> SchedLin (start, end)</code></pre>
</blockquote>
<p>Linear schedule function from <code>start</code> to <code>end</code></p>
<p><em>Linear schedule function from <code>start</code> to <code>end</code></em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/schedule.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
Expand All @@ -583,7 +565,7 @@ <h3 class="anchored" data-anchor-id="schedno">SchedNo</h3>
<blockquote class="blockquote">
<pre><code> SchedNo (start, end)</code></pre>
</blockquote>
<p>Constant schedule function with <code>start</code> value</p>
<p><em>Constant schedule function with <code>start</code> value</em></p>


</section>
Expand Down
45 changes: 14 additions & 31 deletions _proc/_docs/core.html → _docs/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,24 +235,6 @@
<a href="./demo_ri2fl_2d.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Demo: 2D image RI2FL</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./demo_2.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Demo: 2D image RI2FL</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./template.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">template</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./fourier_ring_correlation.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">fourier_ring_correlation.html</span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -325,7 +307,7 @@ <h3 class="anchored" data-anchor-id="datablock">DataBlock</h3>
n_inp:int=None, item_tfms:list=None, batch_tfms:list=None,
get_items=None, splitter=None, get_y=None, get_x=None)</code></pre>
</blockquote>
<p>Generic container to quickly build <code>Datasets</code> and <code>DataLoaders</code>.</p>
<p><em>Generic container to quickly build <code>Datasets</code> and <code>DataLoaders</code>.</em></p>
<table class="table">
<colgroup>
<col style="width: 6%">
Expand Down Expand Up @@ -412,13 +394,13 @@ <h3 class="anchored" data-anchor-id="dataloaders">DataLoaders</h3>
<blockquote class="blockquote">
<pre><code> DataLoaders (*loaders, path:str|pathlib.Path='.', device=None)</code></pre>
</blockquote>
<p>Basic wrapper around several <code>DataLoader</code>s.</p>
<p><em>Basic wrapper around several <code>DataLoader</code>s.</em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/learner.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
<section id="learner" class="level3">
<h3 class="anchored" data-anchor-id="learner">Learner</h3>
<p>Group together a <code>model</code>, some <code>dls</code> and a <code>loss_func</code> to handle training</p>
<p><em>Group together a <code>model</code>, some <code>dls</code> and a <code>loss_func</code> to handle training</em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/progress.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
Expand All @@ -437,7 +419,7 @@ <h3 class="anchored" data-anchor-id="showgraphcallback">ShowGraphCallback</h3>
after_cancel_epoch=None, after_epoch=None,
after_cancel_fit=None, after_fit=None)</code></pre>
</blockquote>
<p>Update a graph of training and validation loss</p>
<p><em>Update a graph of training and validation loss</em></p>
<hr>
<p><a href="https://github.com/fastai/fastai/blob/master/fastai/callback/progress.py#LNone" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
Expand All @@ -446,23 +428,24 @@ <h3 class="anchored" data-anchor-id="csvlogger">CSVLogger</h3>
<blockquote class="blockquote">
<pre><code> CSVLogger (fname='history.csv', append=False)</code></pre>
</blockquote>
<p>Log the results displayed in <code>learn.path/fname</code></p>
<p><em>Log the results displayed in <code>learn.path/fname</code></em></p>
<pre><code>Unknown section Notes</code></pre>
<hr>
</section>
<section id="cells3d" class="level3">
<h3 class="anchored" data-anchor-id="cells3d">cells3d</h3>
<blockquote class="blockquote">
<pre><code> cells3d ()</code></pre>
</blockquote>
<p>3D fluorescence microscopy image of cells.</p>
<p>The returned data is a 3D multichannel array with dimensions provided in <code>(z, c, y, x)</code> order. Each voxel has a size of <code>(0.29 0.26 0.26)</code> micrometer. Channel 0 contains cell membranes, channel 1 contains nuclei.</p>
<p>*3D fluorescence microscopy image of cells.</p>
<p>The returned data is a 3D multichannel array with dimensions provided in <code>(z, c, y, x)</code> order. Each voxel has a size of <code>(0.29 0.26 0.26)</code> micrometer. Channel 0 contains cell membranes, channel 1 contains nuclei.*</p>
</section>
</section>
<section id="engine" class="level2">
<h2 class="anchored" data-anchor-id="engine">Engine</h2>
<p>Core engine for model training. See tutorials for usage examples.</p>
<hr>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L34" target="_blank" style="float:right; font-size:smaller">source</a></p>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L36" target="_blank" style="float:right; font-size:smaller">source</a></p>
<section id="fasttrainer" class="level3">
<h3 class="anchored" data-anchor-id="fasttrainer">fastTrainer</h3>
<blockquote class="blockquote">
Expand All @@ -481,7 +464,7 @@ <h3 class="anchored" data-anchor-id="fasttrainer">fastTrainer</h3>
wd_bn_bias:bool=False, train_bn:bool=True,
moms:tuple=Ellipsis, default_cbs:bool=True)</code></pre>
</blockquote>
<p>A custom implementation of the FastAI Learner class for training models in bioinformatics applications.</p>
<p><em>A custom implementation of the FastAI Learner class for training models in bioinformatics applications.</em></p>
<table class="table">
<colgroup>
<col style="width: 6%">
Expand Down Expand Up @@ -626,30 +609,30 @@ <h3 class="anchored" data-anchor-id="fasttrainer">fastTrainer</h3>
<h2 class="anchored" data-anchor-id="utils">Utils</h2>
<p>Utility functions.</p>
<hr>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L81" target="_blank" style="float:right; font-size:smaller">source</a></p>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L83" target="_blank" style="float:right; font-size:smaller">source</a></p>
<section id="attributesfromdict" class="level3">
<h3 class="anchored" data-anchor-id="attributesfromdict">attributesFromDict</h3>
<blockquote class="blockquote">
<pre><code> attributesFromDict (d)</code></pre>
</blockquote>
<hr>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L87" target="_blank" style="float:right; font-size:smaller">source</a></p>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L89" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
<section id="get_device" class="level3">
<h3 class="anchored" data-anchor-id="get_device">get_device</h3>
<blockquote class="blockquote">
<pre><code> get_device ()</code></pre>
</blockquote>
<hr>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L91" target="_blank" style="float:right; font-size:smaller">source</a></p>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L93" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
<section id="img2float" class="level3">
<h3 class="anchored" data-anchor-id="img2float">img2float</h3>
<blockquote class="blockquote">
<pre><code> img2float (image, force_copy=False)</code></pre>
</blockquote>
<hr>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L95" target="_blank" style="float:right; font-size:smaller">source</a></p>
<p><a href="https://github.com/bmandracchia/bioMONAI/blob/main/bioMONAI/core.py#L97" target="_blank" style="float:right; font-size:smaller">source</a></p>
</section>
<section id="img2tensor" class="level3">
<h3 class="anchored" data-anchor-id="img2tensor">img2Tensor</h3>
Expand Down
Loading

0 comments on commit 417f037

Please sign in to comment.