Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
06540a9
Fix rebase conflicts
C-Achard Aug 12, 2022
25664ba
UI improvements
C-Achard Aug 12, 2022
27b51d2
Refactor UI funcs
C-Achard Aug 15, 2022
249267c
Started dataclass conversion for params
C-Achard Aug 15, 2022
b829a3d
Rebase + lint
C-Achard Aug 15, 2022
7047182
Fix rebase conflicts
C-Achard Aug 12, 2022
5d9d957
UI improvements
C-Achard Aug 12, 2022
6f24316
Keep dict for model info
C-Achard Aug 15, 2022
afe4f09
Update model_workers.py
C-Achard Aug 15, 2022
400b21e
Fixed incorrect calls to ContainerWidget
C-Achard Aug 15, 2022
6a1e98c
Update plugin_model_inference.py
C-Achard Aug 15, 2022
09244ea
Update plugin_model_inference.py
C-Achard Aug 15, 2022
fd0af48
:art:
C-Achard Aug 15, 2022
5bf1dbe
Model input label + warn for empty/wrong folder
C-Achard Aug 16, 2022
6a255c8
Started refactoring config
C-Achard Aug 16, 2022
e590c54
Fixes to refactor
C-Achard Aug 17, 2022
84bc55f
Typo
C-Achard Aug 17, 2022
8bcf627
Comment error-causing log of results
C-Achard Aug 17, 2022
9c3529b
Fixed training and inference
C-Achard Aug 18, 2022
45a4e81
Fix typo
C-Achard Aug 18, 2022
10b6267
Update plugin_model_inference.py
C-Achard Aug 19, 2022
5f4948e
Fix window attr error
C-Achard Aug 19, 2022
6a97222
Pathlib refacto + default path fix
C-Achard Aug 22, 2022
3c21741
Review refacto +weights path fix + remove os
C-Achard Aug 23, 2022
6d45e30
black lint
C-Achard Aug 23, 2022
d7af9db
Removed print
C-Achard Aug 23, 2022
153ed64
Pbar for window infer + tests fix + mkdir fixes
C-Achard Aug 24, 2022
f22fa8b
Added slider UI
C-Achard Aug 24, 2022
18262af
[WIP] Layer loading UI overhaul+ Radio + Slider
C-Achard Aug 25, 2022
e5fa167
[WIP] Layer selecter for inference
C-Achard Aug 26, 2022
ca31e65
Training fixes + intermediate plots + default path fix
C-Achard Aug 26, 2022
8ac58f7
test fix
C-Achard Aug 26, 2022
4f0f068
Fix results path test
C-Achard Aug 26, 2022
bd399c1
WIP Utils refactor
C-Achard Aug 30, 2022
c8a74d6
Utils refactor/overhaul
C-Achard Sep 1, 2022
f28fa6c
Context menu cursor pos. fix
C-Achard Sep 1, 2022
836de02
Utils - convert refactor complete
C-Achard Sep 1, 2022
67c99df
Update plugin_helper.py
C-Achard Sep 1, 2022
b4283e5
[WIP] Further UI refactor
C-Achard Sep 1, 2022
0f0a443
Update plugin_model_inference.py
C-Achard Sep 6, 2022
13204d5
Update config.py
C-Achard Sep 7, 2022
4a822c2
(Mostly) functional utilities
C-Achard Sep 24, 2022
48b0c2d
Fixed test
C-Achard Sep 25, 2022
e46f492
Fixed review errors
C-Achard Sep 25, 2022
adf8ccc
Update launch_review.py
C-Achard Sep 25, 2022
b90fcc8
Inference widget update
C-Achard Sep 25, 2022
f2684b7
Added utils menu & resize handler
C-Achard Sep 29, 2022
0b3a5de
Utilities fixes
C-Achard Oct 1, 2022
be7693f
Fixed interpolation in aniso. correction
C-Achard Oct 2, 2022
1b547b6
Fixes + weights URL
C-Achard Nov 26, 2022
d5af877
Updated utils dropdown menu and fixed duplicates (for now)
C-Achard Feb 21, 2023
a5e5d0b
Update preview_metadata.yml
C-Achard Feb 21, 2023
b83233c
Update tox.ini
C-Achard Feb 21, 2023
f8e9460
Update test_and_deploy.yml
C-Achard Feb 21, 2023
8185aef
Update plugin_crop.py
C-Achard Feb 22, 2023
a769650
Polishing UI and UI code
C-Achard Feb 22, 2023
64a8960
Cropping improvements
C-Achard Feb 22, 2023
73ed3bb
Update launch_review.py
C-Achard Feb 24, 2023
32b687e
Replacing print statements with logging
C-Achard Feb 23, 2023
92cf933
QoL to cropping visibility
C-Achard Feb 24, 2023
f4a9901
Singleton widgets + isort + black
C-Achard Feb 24, 2023
6e3b262
Many fixes
C-Achard Feb 24, 2023
90695f6
"Fixed" test through handling exception.
C-Achard Feb 24, 2023
a7039ef
Cropping option for "zooming in" larger volumes
C-Achard Feb 24, 2023
1772ecb
Fixing cropping new feature
C-Achard Feb 24, 2023
1ced64a
Update plugin_crop.py
C-Achard Feb 24, 2023
7de795f
black
C-Achard Feb 24, 2023
caa22ad
Update plugin_crop.py
C-Achard Feb 24, 2023
9cb50ed
Crop and docs update
C-Achard Feb 28, 2023
fa2d08c
Update inference_module_guide.rst
C-Achard Feb 28, 2023
4ec4502
Update inference_module_guide.rst
C-Achard Feb 28, 2023
8d0730e
Update training_module_guide.rst
C-Achard Feb 28, 2023
5a8602d
isort + black
C-Achard Mar 1, 2023
239bae9
Updated docs images
C-Achard Mar 1, 2023
5974264
File structure overhaul
C-Achard Mar 1, 2023
d748d33
Large docs update for code
C-Achard Mar 1, 2023
45d57bc
black+isort
C-Achard Mar 1, 2023
75ffef9
Fixed tests
C-Achard Mar 1, 2023
851ea69
Update preview_metadata.yml
C-Achard Mar 1, 2023
4265ff8
Todo updates
C-Achard Mar 1, 2023
c846617
Update preview_metadata.yml
C-Achard Mar 1, 2023
042bbd8
Test check success in actions
C-Achard Mar 1, 2023
1ad6d54
Update test_and_deploy.yml
C-Achard Mar 1, 2023
9783d9f
Update test_and_deploy.yml
C-Achard Mar 1, 2023
06e66cf
Remove success
C-Achard Mar 1, 2023
ed023de
Update build_docs.yml
C-Achard Mar 1, 2023
eccae88
Update build_docs.yml
C-Achard Mar 1, 2023
9ea13d8
retrigger checks
C-Achard Mar 1, 2023
7275ec1
Update plugin_model_inference.py
C-Achard Mar 1, 2023
86c4ab0
Update preview_metadata.yml
C-Achard Mar 1, 2023
3a64f32
Removed os from test
C-Achard Mar 1, 2023
2585033
Test fix
C-Achard Mar 1, 2023
a4885d5
Attempt to fix actions
C-Achard Mar 1, 2023
438eea7
Added changes from main + version bump
C-Achard Mar 1, 2023
a23a8a6
Update setup.cfg
C-Achard Mar 1, 2023
368e473
Fix rebase deletions
C-Achard Mar 1, 2023
8789bdf
Download test and fixed old desc
C-Achard Mar 1, 2023
2aff627
Create test_plugin_utils.py
C-Achard Mar 1, 2023
8cbc81b
Version bump + black + inference test
C-Achard Mar 2, 2023
7a8f6d4
Testing updates
C-Achard Mar 2, 2023
500c37b
Create test_helper.py
C-Achard Mar 3, 2023
09333b0
Testing and minor updates
C-Achard Mar 3, 2023
f23c578
Update test_and_deploy.yml
C-Achard Mar 3, 2023
f493531
Update test_and_deploy.yml
C-Achard Mar 3, 2023
a0bc9e4
Update test_plugin_inference.py
C-Achard Mar 3, 2023
34a5025
Updated weight download test
C-Achard Mar 3, 2023
5e27e50
Update test_weight_download.py
C-Achard Mar 3, 2023
816bb48
Disable weight download test
C-Achard Mar 3, 2023
e2295a1
Updated actions version
C-Achard Mar 3, 2023
76feee2
Test other action for testing
C-Achard Mar 3, 2023
42c8f94
Disabled longer tests
C-Achard Mar 3, 2023
b235e9e
Try longer tests on Windows
C-Achard Mar 3, 2023
92cfb5c
Disable macos
C-Achard Mar 3, 2023
809de64
Disabled longer tests
C-Achard Mar 3, 2023
96a5783
Try training short test
C-Achard Mar 3, 2023
93748d7
Test yield
C-Achard Mar 3, 2023
93e2654
Disabled worker tests
C-Achard Mar 4, 2023
fba44fd
Improving testing
C-Achard Mar 7, 2023
87c1c71
Updated training test with small model
C-Achard Mar 8, 2023
114ae0b
Disabled worker tests
C-Achard Mar 8, 2023
fc6e413
Update setup.cfg
C-Achard Mar 8, 2023
2ebdc5d
Disable resize handler, re-enabled write in Log
C-Achard Mar 13, 2023
6e10946
black
C-Achard Mar 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/preview_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: napari hub Preview Page # we use this name to find your preview page artif
on:
pull_request:
branches:
- '**'
- 'test' # '**' for all

jobs:
preview-page:
Expand All @@ -16,6 +16,6 @@ jobs:
uses: actions/checkout@v2

- name: napari hub Preview Page Builder
uses: chanzuckerberg/napari-hub-preview-action@v0.1.5
uses: chanzuckerberg/napari-hub-preview-action@v0.1.6
with:
hub-ref: main
31 changes: 16 additions & 15 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,41 @@ jobs:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9, "3.10"]
# platform: [ubuntu-latest, windows-latest, macos-latest]
platform: [windows-latest]
python-version: [3.8, 3.9] # 3.10

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# these libraries enable testing on Qt on linux
# these libraries enable testing on Qt on linux
- uses: tlambert03/setup-qt-libs@v1

# strategy borrowed from vispy for installing opengl libs on windows
# strategy borrowed from vispy for installing opengl libs on windows
- name: Install Windows OpenGL
if: runner.os == 'Windows'
run: |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}

# note: if you need dependencies from conda, considering using
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
# and
# tox-conda: https://github.com/tox-dev/tox-conda
# note: if you need dependencies from conda, considering using
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
# and
# tox-conda: https://github.com/tox-dev/tox-conda
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions

# this runs the platform-specific tests declared in tox.ini
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
uses: GabrielBB/xvfb-action@v1 # aganders3/headless-gui@v1
with:
run: python -m tox
env:
Expand All @@ -65,9 +66,9 @@ jobs:
uses: codecov/codecov-action@v2

deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
Expand Down
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ venv/
########
#project specific
#dataset, weights, old logos, requirements
/napari_cellseg3d/models/dataset/
/napari_cellseg3d/models/saved_weights/
/napari_cellseg3d/code_models/models/dataset/
/napari_cellseg3d/code_models/models/saved_weights/
/docs/res/logo/old_logo/
/reqs/
/Loss_plots/
notebooks/csv_cell_plot.html
notebooks/full_plot.html
*.csv
*.png
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# General information about the project.
project = "napari-cellseg3d"
copyright = "2022, Cyril Achard, Maxime Vidal"
copyright = "2022-2023, Cyril Achard, Maxime Vidal"
author = "Cyril Achard, Maxime Vidal"

# The version info for the project you're documenting, acts as replacement for
Expand Down
5 changes: 2 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Welcome to napari-cellseg3d's documentation!
:caption: Utilities :

res/guides/metrics_module_guide
res/guides/convert_module_guide
res/guides/utils_module_guide
res/guides/cropping_module_guide


Expand All @@ -34,8 +34,7 @@ Welcome to napari-cellseg3d's documentation!
res/code/interface
res/code/plugin_base
res/code/plugin_review
res/code/launch_review
res/code/plugin_dock
res/code/plugin_review_dock
res/code/plugin_crop
res/code/plugin_convert
res/code/plugin_metrics
Expand Down
48 changes: 36 additions & 12 deletions docs/res/code/interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ interface.py
Classes
-------------

QWidgetSingleton
**************************************
.. autoclass:: napari_cellseg3d.interface::QWidgetSingleton
:members: __call__

UtilsDropdown
**************************************
.. autoclass:: napari_cellseg3d.interface::UtilsDropdown
:members: __init__, dropdown_menu_call, show_utils_menu

Log
**************************************
.. autoclass:: napari_cellseg3d.interface::Log
:members: __init__, write, replace_last_line, print_and_log, warn


ContainerWidget
**************************************
.. autoclass:: napari_cellseg3d.interface::ContainerWidget
:members: __init__

Button
**************************************
.. autoclass:: napari_cellseg3d.interface::Button
Expand All @@ -22,13 +43,13 @@ CheckBox
AnisotropyWidgets
**************************************
.. autoclass:: napari_cellseg3d.interface::AnisotropyWidgets
:members: __init__, build, get_anisotropy_resolution_xyz, get_anisotropy_resolution_zyx, anisotropy_zoom_factor,is_enabled,toggle_permanent_visibility
:members: __init__, build, scaling_zyx, resolution_zyx, scaling_xyz, resolution_xyz,enabled


FilePathWidget
**************************************
.. autoclass:: napari_cellseg3d.interface::FilePathWidget
:members: __init__, build, get_text_field, get_button, check_ready, set_required, update_field_color, set_description
:members: __init__, build, text_field, button, check_ready, required, update_field_color, tooltips

ScrollArea
**************************************
Expand All @@ -38,7 +59,7 @@ ScrollArea
DoubleIncrementCounter
**************************************
.. autoclass:: napari_cellseg3d.interface::DoubleIncrementCounter
:members: __init__, set_precision, make_n
:members: __init__, precision, make_n

IntIncrementCounter
**************************************
Expand All @@ -49,22 +70,21 @@ IntIncrementCounter
Functions
-------------

open_url
handle_adjust_errors
**************************************
.. autofunction:: napari_cellseg3d.interface::open_url

.. autofunction:: napari_cellseg3d.interface::handle_adjust_errors

make_group
handle_adjust_errors_wrapper
**************************************
.. autofunction:: napari_cellseg3d.interface::make_group
.. autofunction:: napari_cellseg3d.interface::handle_adjust_errors_wrapper

add_to_group
open_url
**************************************
.. autofunction:: napari_cellseg3d.interface::add_to_group
.. autofunction:: napari_cellseg3d.interface::open_url

make_container
make_group
**************************************
.. autofunction:: napari_cellseg3d.interface::make_container
.. autofunction:: napari_cellseg3d.interface::make_group

combine_blocks
**************************************
Expand All @@ -74,6 +94,10 @@ add_blank
**************************************
.. autofunction:: napari_cellseg3d.interface::add_blank

add_label
**************************************
.. autofunction:: napari_cellseg3d.interface::add_label

toggle_visibility
**************************************
.. autofunction:: napari_cellseg3d.interface::toggle_visibility
Expand Down
10 changes: 0 additions & 10 deletions docs/res/code/launch_review.rst

This file was deleted.

8 changes: 4 additions & 4 deletions docs/res/code/model_framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Class : ModelFramework

Methods
**********************
.. autoclass:: napari_cellseg3d.model_framework::ModelFramework
:members: __init__, load_dataset_paths,save_log, save_log_to_path,get_model, get_loss,display_status_report,load_dataset_paths,create_train_dataset_dict, load_image_dataset, load_label_dataset,load_results_path,load_model_path,get_device, update_default, remove_from_viewer
.. autoclass:: napari_cellseg3d.code_models.model_framework::ModelFramework
:members: __init__, send_log, save_log, save_log_to_path, display_status_report, create_train_dataset_dict, get_model, get_available_models, get_device, empty_cuda_cache
:noindex:


Attributes
*********************

.. autoclass:: napari_cellseg3d.model_framework::ModelFramework
:members: _viewer, worker, docked_widgets, images_filepaths, labels_filepaths, results_path, model_path
.. autoclass:: napari_cellseg3d.code_models.model_framework::ModelFramework
:members: _viewer, worker, docked_widgets, images_filepaths, labels_filepaths, results_path
12 changes: 6 additions & 6 deletions docs/res/code/model_instance_seg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ Functions

binary_connected
**************************************
.. autofunction:: napari_cellseg3d.model_instance_seg::binary_connected
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::binary_connected

binary_watershed
**************************************
.. autofunction:: napari_cellseg3d.model_instance_seg::binary_watershed
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::binary_watershed

volume_stats
**************************************
.. autofunction:: napari_cellseg3d.model_instance_seg::volume_stats
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::volume_stats

clear_small_objects
**************************************
.. autofunction:: napari_cellseg3d.model_instance_seg::clear_small_objects
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::clear_small_objects

to_instance
**************************************
.. autofunction:: napari_cellseg3d.model_instance_seg::to_instance
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::to_instance

to_semantic
**************************************
.. autofunction:: napari_cellseg3d.model_instance_seg::to_semantic
.. autofunction:: napari_cellseg3d.code_models.model_instance_seg::to_semantic
6 changes: 3 additions & 3 deletions docs/res/code/model_workers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class : LogSignal

Attributes
************************
.. autoclass:: napari_cellseg3d.model_workers::LogSignal
.. autoclass:: napari_cellseg3d.code_models.model_workers::LogSignal
:members: log_signal
:noindex:

Expand All @@ -24,7 +24,7 @@ Class : InferenceWorker

Methods
************************
.. autoclass:: napari_cellseg3d.model_workers::InferenceWorker
.. autoclass:: napari_cellseg3d.code_models.model_workers::InferenceWorker
:members: __init__, log, create_inference_dict, inference
:noindex:

Expand All @@ -39,7 +39,7 @@ Class : TrainingWorker

Methods
************************
.. autoclass:: napari_cellseg3d.model_workers::TrainingWorker
.. autoclass:: napari_cellseg3d.code_models.model_workers::TrainingWorker
:members: __init__, log, train
:noindex:

Expand Down
19 changes: 8 additions & 11 deletions docs/res/code/plugin_base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ Class : BasePluginSingleImage

Methods
**********************
.. autoclass:: napari_cellseg3d.plugin_base::BasePluginSingleImage
:members: __init__, remove_from_viewer, show_dialog_images, show_dialog_labels, update_default
.. autoclass:: napari_cellseg3d.code_plugins.plugin_base::BasePluginSingleImage
:members: __init__, enable_utils_menu, remove_from_viewer, remove_docked_widgets
:noindex:



Attributes
*********************

.. autoclass:: napari_cellseg3d.plugin_base::BasePluginSingleImage
:members: _viewer, image_path, label_path, filetype, file_handling_box
.. autoclass:: napari_cellseg3d.code_plugins.plugin_base::BasePluginSingleImage
:members: _viewer, image_path, label_path, image_layer_loader, label_layer_loader



Expand All @@ -29,13 +27,12 @@ Class : BasePluginFolder

Methods
***********************
.. autoclass:: napari_cellseg3d.plugin_base::BasePluginFolder
:members: __init__, remove_from_viewer,make_close_button,make_prev_button,make_next_button, load_dataset_paths,load_image_dataset,load_label_dataset,load_results_path, update_default,remove_docked_widgets
.. autoclass:: napari_cellseg3d.code_plugins.plugin_base::BasePluginFolder
:members: __init__, load_dataset_paths,load_image_dataset,load_label_dataset
:noindex:


Attributes
*********************

.. autoclass:: napari_cellseg3d.plugin_base::BasePluginFolder
:members: _viewer, images_filepaths, labels_filepaths,results_path, filetype_choice
.. autoclass:: napari_cellseg3d.code_plugins.plugin_base::BasePluginFolder
:members: _viewer, images_filepaths, labels_filepaths, results_path
Loading