Skip to content

Commit

Permalink
napari plugin, QOL and refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenstites committed Jun 1, 2024
1 parent 4d9d2a6 commit 20415cf
Show file tree
Hide file tree
Showing 102 changed files with 1,360 additions and 570 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ preds/
trained/
imports/
model_testing/
testnapari/

*.pth
*.lock
Expand Down
2 changes: 2 additions & 0 deletions .napari-hub/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**PSSR** is a standardized PyTorch-based workflow for super-resolution tasks using microscopy images.
The **PSSR** User Guide and full API Reference is available in the [PSSR Documentation](https://ucsdmanorlab.github.io/PSSR).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The **PSSR** User Guide and full API Reference is available in the [PSSR Documen
If you have never used **PSSR** before, [Getting Started](https://ucsdmanorlab.github.io/PSSR/guide/start.html) outlines installation and basic usage.
Full reference and explanations of all **PSSR** tools is available in [API Reference](https://ucsdmanorlab.github.io/PSSR/reference/api.html).

The package is still in development. All code can be found at [https://github.com/ucsdmanorlab/PSSR](https://github.com/ucsdmanorlab/PSSR).
This package is under continuous development. All code can be found at [https://github.com/ucsdmanorlab/PSSR](https://github.com/ucsdmanorlab/PSSR).
If you experience any bugs, unexpected behaviors, or have any suggestions, make sure to [open a ticket](https://github.com/ucsdmanorlab/PSSR/issues).
Binary file added dist/pssr-2.0.0-py3-none-any.whl
Binary file not shown.
Binary file added dist/pssr-2.0.0.tar.gz
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/guide/start.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/guide/workflow.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/CLI.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/api.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/crappifiers/MultiCrappifier.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/data/ImageDataset.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/data/PairedImageDataset.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/data/PairedSlidingDataset.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/data/SlidingDataset.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/models/RDResUNet.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/models/ResUNet.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/models/SwinIR.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/predict/predict_collage.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/predict/predict_images.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/predict/test_metrics.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/train/train_crappifier.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/train/train_paired.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: bc6c4eaf27447939c9b4e682dd233c06
config: 5c492d92e36c65983af02d00b702c744
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/build/html/_sources/guide/start.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can easily install **PSSR** via the ``pip`` package manager:
$ pip install pssr
However, specific versions can also be installed directly from the `GitHub <https://github.com/ucsdmanorlab/PSSR>`_ repository:
All package versions are also available on the `GitHub <https://github.com/ucsdmanorlab/PSSR>`_ repository:

.. code-block:: console
Expand Down
4 changes: 2 additions & 2 deletions docs/build/html/_sources/guide/workflow.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Before diving into the code, we will first specify our imports.
from pssr.data import ImageDataset
from pssr.crappifiers import Poisson
from pssr.models import ResUNet
from pssr.loss import SSIMLoss
from pssr.util import SSIMLoss
from pssr.train import train_paired
from torch.optim.lr_scheduler import ReduceLROnPlateau
Expand Down Expand Up @@ -91,7 +91,7 @@ We will first define our loss function.
loss_fn = SSIMLoss(mix=.8, ms=True)
While MSE loss can also be used to good results, we will instead use :doc:`../reference/loss/SSIMLoss` here, which will optimize visually significant elements our predictions.
While MSE loss can also be used to good results, we will instead use :doc:`../reference/util/SSIMLoss` here, which will optimize visually significant elements our predictions.
The ``mix`` argument controls the inverse contribution of corrected L1 loss, while the ``ms`` argument enables MS-SSIM, a more robust version of SSIM.

|
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ containing various improvements and new features.
If you have never used **PSSR** before, :doc:`guide/start` outlines installation and basic usage.
Full reference and explanations of all **PSSR** tools is available in :doc:`API Reference <reference/api>`.

The package is still in development. All code can be found at `https://github.com/ucsdmanorlab/PSSR <https://github.com/ucsdmanorlab/PSSR>`_.
This package is under continuous development. All code can be found at `https://github.com/ucsdmanorlab/PSSR <https://github.com/ucsdmanorlab/PSSR>`_.
If you experience any bugs, unexpected behaviors, or have any suggestions, make sure to `open a ticket <https://github.com/ucsdmanorlab/PSSR/issues>`_.


Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/_sources/reference/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ pssr
data
crappifiers
models
loss
util
CLI
18 changes: 0 additions & 18 deletions docs/build/html/_sources/reference/loss.rst.txt

This file was deleted.

11 changes: 0 additions & 11 deletions docs/build/html/_sources/reference/loss/SSIMLoss.rst.txt

This file was deleted.

9 changes: 0 additions & 9 deletions docs/build/html/_sources/reference/loss/pixel_metric.rst.txt

This file was deleted.

2 changes: 1 addition & 1 deletion docs/build/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '1.2.2',
VERSION: '2.0.0',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
20 changes: 10 additions & 10 deletions docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 --><title>Index - PSSR 1.2.2 documentation</title>
<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 --><title>Index - PSSR 2.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=362ab14a" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
Expand Down Expand Up @@ -122,7 +122,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">PSSR 1.2.2 documentation</div></a>
<a href="index.html"><div class="brand">PSSR 2.0.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -145,7 +145,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">


<span class="sidebar-brand-text">PSSR 1.2.2 documentation</span>
<span class="sidebar-brand-text">PSSR 2.0.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -197,9 +197,9 @@
<li class="toctree-l3"><a class="reference internal" href="reference/models/SwinIR.html">SwinIR</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="reference/loss.html">loss</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of loss</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/loss/SSIMLoss.html">SSIMLoss</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/loss/pixel_metric.html">pixel_metric</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="reference/util.html">util</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of util</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/util/SSIMLoss.html">SSIMLoss</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/util/pixel_metric.html">pixel_metric</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/CLI.html">CLI</a></li>
Expand Down Expand Up @@ -263,14 +263,14 @@ <h2>_</h2>
<li><a href="reference/data/PairedSlidingDataset.html#pssr.data.PairedSlidingDataset.__init__">(in module pssr.data.PairedSlidingDataset)</a>
</li>
<li><a href="reference/data/SlidingDataset.html#pssr.data.SlidingDataset.__init__">(in module pssr.data.SlidingDataset)</a>
</li>
<li><a href="reference/loss/SSIMLoss.html#pssr.loss.SSIMLoss.__init__">(in module pssr.loss.SSIMLoss)</a>
</li>
<li><a href="reference/models/RDResUNet.html#pssr.models.RDResUNet.__init__">(in module pssr.models.RDResUNet)</a>
</li>
<li><a href="reference/models/ResUNet.html#pssr.models.ResUNet.__init__">(in module pssr.models.ResUNet)</a>
</li>
<li><a href="reference/models/SwinIR.html#pssr.models.SwinIR.__init__">(in module pssr.models.SwinIR)</a>
</li>
<li><a href="reference/util/SSIMLoss.html#pssr.util.SSIMLoss.__init__">(in module pssr.util.SSIMLoss)</a>
</li>
</ul></li>
</ul></td>
Expand Down Expand Up @@ -323,7 +323,7 @@ <h2>N</h2>
<h2>P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference/loss/pixel_metric.html#pssr.loss.pixel_metric">pixel_metric() (in module pssr.loss)</a>
<li><a href="reference/util/pixel_metric.html#pssr.util.pixel_metric">pixel_metric() (in module pssr.util)</a>
</li>
<li><a href="reference/predict/predict_collage.html#pssr.predict.predict_collage">predict_collage() (in module pssr.predict)</a>
</li>
Expand Down Expand Up @@ -385,7 +385,7 @@ <h2>T</h2>

</aside>
</div>
</div><script src="_static/documentation_options.js?v=fd7cadf9"></script>
</div><script src="_static/documentation_options.js?v=51b770b3"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
14 changes: 7 additions & 7 deletions docs/build/html/guide/principles.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Workflow" href="workflow.html" /><link rel="prev" title="Getting Started" href="start.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Principles of PSSR - PSSR 1.2.2 documentation</title>
<title>Principles of PSSR - PSSR 2.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=362ab14a" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
Expand Down Expand Up @@ -124,7 +124,7 @@
</label>
</div>
<div class="header-center">
<a href="../index.html"><div class="brand">PSSR 1.2.2 documentation</div></a>
<a href="../index.html"><div class="brand">PSSR 2.0.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -147,7 +147,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">


<span class="sidebar-brand-text">PSSR 1.2.2 documentation</span>
<span class="sidebar-brand-text">PSSR 2.0.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -199,9 +199,9 @@
<li class="toctree-l3"><a class="reference internal" href="../reference/models/SwinIR.html">SwinIR</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/loss.html">loss</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of loss</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/loss/SSIMLoss.html">SSIMLoss</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/loss/pixel_metric.html">pixel_metric</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/util.html">util</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of util</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/util/SSIMLoss.html">SSIMLoss</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/util/pixel_metric.html">pixel_metric</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/CLI.html">CLI</a></li>
Expand Down Expand Up @@ -352,7 +352,7 @@ <h2>The Crappifier<a class="headerlink" href="#the-crappifier" title="Link to th

</aside>
</div>
</div><script src="../_static/documentation_options.js?v=fd7cadf9"></script>
</div><script src="../_static/documentation_options.js?v=51b770b3"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
18 changes: 9 additions & 9 deletions docs/build/html/guide/start.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Principles of PSSR" href="principles.html" /><link rel="prev" title="PSSR Documentation" href="../index.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Getting Started - PSSR 1.2.2 documentation</title>
<title>Getting Started - PSSR 2.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=362ab14a" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
Expand Down Expand Up @@ -124,7 +124,7 @@
</label>
</div>
<div class="header-center">
<a href="../index.html"><div class="brand">PSSR 1.2.2 documentation</div></a>
<a href="../index.html"><div class="brand">PSSR 2.0.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -147,7 +147,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">


<span class="sidebar-brand-text">PSSR 1.2.2 documentation</span>
<span class="sidebar-brand-text">PSSR 2.0.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -199,9 +199,9 @@
<li class="toctree-l3"><a class="reference internal" href="../reference/models/SwinIR.html">SwinIR</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/loss.html">loss</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of loss</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/loss/SSIMLoss.html">SSIMLoss</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/loss/pixel_metric.html">pixel_metric</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/util.html">util</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of util</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/util/SSIMLoss.html">SSIMLoss</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/util/pixel_metric.html">pixel_metric</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/CLI.html">CLI</a></li>
Expand Down Expand Up @@ -259,7 +259,7 @@ <h2>Installation<a class="headerlink" href="#installation" title="Link to this h
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>pip<span class="w"> </span>install<span class="w"> </span>pssr
</pre></div>
</div>
<p>However, specific versions can also be installed directly from the <a class="reference external" href="https://github.com/ucsdmanorlab/PSSR">GitHub</a> repository:</p>
<p>All package versions are also available on the <a class="reference external" href="https://github.com/ucsdmanorlab/PSSR">GitHub</a> repository:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/ucsdmanorlab/PSSR/dist/pssr-x.x.x-py3-none-any.whl
</pre></div>
</div>
Expand Down Expand Up @@ -321,7 +321,7 @@ <h3>Named Arguments<a class="headerlink" href="#named-arguments" title="Link to
<p class="sd-card-text">Default: 3</p>
</dd>
<dt><kbd>-mse, --mse</kbd></dt>
<dd><p class="sd-card-text">use MSE loss instead of SSIM loss</p>
<dd><p class="sd-card-text">use MSE loss instead of MS-SSIM loss</p>
<p class="sd-card-text">Default: False</p>
</dd>
<dt><kbd>-cp, --checkpoint</kbd></dt>
Expand Down Expand Up @@ -476,7 +476,7 @@ <h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this headi

</aside>
</div>
</div><script src="../_static/documentation_options.js?v=fd7cadf9"></script>
</div><script src="../_static/documentation_options.js?v=51b770b3"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
Loading

0 comments on commit 20415cf

Please sign in to comment.