imaging-server-kit 0.0.12__tar.gz → 0.0.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/.github/workflows/publish.yml +10 -1
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/PKG-INFO +1 -1
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/_toc.yml +0 -2
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/index.md +2 -2
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/algorithm_server.md +49 -29
- {imaging_server_kit-0.0.12/src/imaging_server_kit/demo → imaging_server_kit-0.0.14/examples/basic}/threshold.py +4 -4
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-cellpose/main.py +10 -5
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-orientationpy/main.py +4 -4
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-rembg/main.py +9 -36
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-skimage-log/main.py +7 -9
- imaging_server_kit-0.0.14/examples/servers/serverkit-stackreg/README.md +34 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-stackreg/main.py +63 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-stackreg/requirements.txt +2 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-stackreg/sample_images/pc12-unreg.tif +0 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-stardist/docker-compose.yml +6 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-stardist/main.py +4 -5
- imaging_server_kit-0.0.14/examples/servers/serverkit-trackpy/Dockerfile +15 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-trackpy/main.py +3 -3
- imaging_server_kit-0.0.14/examples/servers/serverkit-yolo/Dockerfile +15 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-yolo/README.md +30 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-yolo/docker-compose.yml +6 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-yolo/main.py +103 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-yolo/requirements.txt +3 -0
- imaging_server_kit-0.0.14/examples/servers/serverkit-yolo/sample_images/giraffs.png +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/__init__.py +3 -2
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/_version.py +2 -2
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/__init__.py +4 -4
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/geometry.py +16 -16
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/server.py +2 -3
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/ui_library.py +6 -6
- {imaging_server_kit-0.0.12/examples/basic → imaging_server_kit-0.0.14/src/imaging_server_kit/demo}/threshold.py +6 -6
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/main.py +4 -2
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit.egg-info/PKG-INFO +1 -1
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit.egg-info/SOURCES.txt +12 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/tests/test_parameter_schema.py +4 -6
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/.dockerignore +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/.gitattributes +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/.github/workflows/deploy.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/.gitignore +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/Dockerfile +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/Dockerfile-GPU +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/LICENSE +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/MANIFEST.in +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/build.sh +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/_config.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/assets/screenshot_napari_threshold.png +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/assets/screenshot_running_server.png +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/logo.ico +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/api_endpoints.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/authentication.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/client_apps.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/docker.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/examples.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/getting_started.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/docs/sections/multi_algo_server.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/basic/auto_threshold.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/basic/multi_algo.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/basic/sample_images/blobs.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-cellpose/Dockerfile +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-cellpose/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-cellpose/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-cellpose/requirements.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-cellpose/sample_images/nuclei_2d.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-orientationpy/Dockerfile +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-orientationpy/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-orientationpy/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-orientationpy/requirements.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-orientationpy/sample_images/image1_from_OrientationJ.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-rembg/Dockerfile +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-rembg/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-rembg/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-rembg/requirements.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-rembg/sample_images/astronaut.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-skimage-log/Dockerfile +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-skimage-log/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-skimage-log/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-skimage-log/requirements.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-skimage-log/sample_images/blobs.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-skimage-log/sample_images/tracks.tif +0 -0
- {imaging_server_kit-0.0.12/examples/servers/serverkit-stardist → imaging_server_kit-0.0.14/examples/servers/serverkit-stackreg}/Dockerfile +0 -0
- {imaging_server_kit-0.0.12/examples/servers/serverkit-stardist → imaging_server_kit-0.0.14/examples/servers/serverkit-stackreg}/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12/examples/servers/serverkit-trackpy → imaging_server_kit-0.0.14/examples/servers/serverkit-stardist}/Dockerfile +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-stardist/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-stardist/requirements.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-stardist/sample_images/nuclei_2d.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-trackpy/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-trackpy/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-trackpy/requirements.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-trackpy/sample_images/tracks.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/main.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/pyproject.toml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/setup.cfg +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/__init__.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/authenticated_server.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/static/css/login.css +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/static/css/register.css +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/static/js/login_script.js +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/static/js/register_script.js +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/templates/login.html +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/templates/register.html +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/utils/__init__.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/utils/db.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/utils/schemas.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/auth/utils/users.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/cli.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/client/__init__.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/client/client.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/decorator.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/encoding.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/errors.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/serialization.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/static/css/index.css +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/static/css/info.css +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/templates/index.html +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/core/templates/info.html +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/demo/__init__.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/demo/sample_images/blobs.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/hub/__init__.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/hub/algorithm_hub.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/hub/multialgo_server.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/cookiecutter.json +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/.dockerignore +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/.gitignore +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/Dockerfile +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/README.md +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/docker-compose.yml +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/requirements.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit/template/serverkit-{{ cookiecutter.project_slug }}/sample_images/blobs.tif +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit.egg-info/dependency_links.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit.egg-info/entry_points.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit.egg-info/requires.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/src/imaging_server_kit.egg-info/top_level.txt +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/start_algorithm_hub.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/tests/test_error_paths.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/tests/test_import.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/tests/test_multialgo_server.py +0 -0
- {imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/tests/test_simple_server.py +0 -0
|
@@ -24,4 +24,13 @@ jobs:
|
|
|
24
24
|
uses: pypa/gh-action-pypi-publish@v1.5.0
|
|
25
25
|
with:
|
|
26
26
|
user: __token__
|
|
27
|
-
password: ${{ secrets.TWINE_API_KEY }}
|
|
27
|
+
password: ${{ secrets.TWINE_API_KEY }}
|
|
28
|
+
- name: Create Release
|
|
29
|
+
env:
|
|
30
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
+
tag: ${{ github.ref_name }}
|
|
32
|
+
run: |
|
|
33
|
+
gh release create "$tag" \
|
|
34
|
+
--repo="$GITHUB_REPOSITORY" \
|
|
35
|
+
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
|
|
36
|
+
--generate-notes
|
|
@@ -4,8 +4,6 @@ chapters:
|
|
|
4
4
|
- file: sections/getting_started
|
|
5
5
|
- file: sections/algorithm_server
|
|
6
6
|
- file: sections/multi_algo_server
|
|
7
|
-
# - file: sections/client_apps
|
|
8
|
-
# - file: sections/authentication
|
|
9
7
|
- file: sections/docker
|
|
10
8
|
- file: sections/examples
|
|
11
9
|
- file: sections/api_endpoints
|
|
@@ -21,10 +21,10 @@ def segmentation_server(image):
|
|
|
21
21
|
| Task | Examples | Napari | QuPath |
|
|
22
22
|
|-------------------|---------------------------------| ------ | ------ |
|
|
23
23
|
| Segmentation | [StarDist](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-stardist), [CellPose](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-cellpose), [Rembg](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-rembg), [SAM-2](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-sam2), [InstanSeg](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-instanseg) | ✅ | ✅ |
|
|
24
|
-
| Object detection | [Spotiflow](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-spotiflow), [LoG detector](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-skimage-log) | ✅ | ✅ |
|
|
24
|
+
| Object detection | [YOLO](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-yolo), [Spotiflow](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-spotiflow), [LoG detector](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-skimage-log) | ✅ | ✅ |
|
|
25
25
|
| Vector fields | [Orientationpy](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-orientationpy) | ✅ | ✅ |
|
|
26
26
|
| Object tracking | [Trackpy](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-trackpy), [Trackastra]() | ✅ | |
|
|
27
|
-
| Image-to-Image | [SPAM](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-spam), [Noise2Void](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-n2v) | ✅ | |
|
|
27
|
+
| Image-to-Image | [SPAM](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-spam), [Noise2Void](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-n2v), [StackReg](https://github.com/Imaging-Server-Kit/imaging-server-kit/tree/main/examples/servers/serverkit-stackreg) | ✅ | |
|
|
28
28
|
| Text-to-Image | [Stable Diffusion](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-stable-diffusion) | ✅ | |
|
|
29
29
|
| Image-to-Text | [Image captioning](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-blip-captioning) | ✅ | |
|
|
30
30
|
| Classification | [ResNet50](https://github.com/Imaging-Server-Kit/extra-examples/tree/main/examples/serverkit-resnet50) | ✅ | |
|
|
@@ -36,20 +36,20 @@ def threshold_algo_server(image: np.ndarray, threshold: float):
|
|
|
36
36
|
The data tuples are inspired from Napari's [LayerDataTuple](https://napari.org/0.4.15/guides/magicgui.html?highlight=layerdatatuple) model. They include three elements:
|
|
37
37
|
|
|
38
38
|
- The *first element* is the **data**, usually in the form of a Numpy array. The shape and interpretation of the axes depends on what the output represents (cf. table below).
|
|
39
|
-
- The *second element* is a Python dictionary representing **metadata** associated with the output. It can be empty (`{}`). These metadata are used to affect how the output is displayed in client apps (e.g. Napari).
|
|
39
|
+
- The *second element* is a Python dictionary representing **metadata** associated with the output. It can be empty (`{}`). These metadata can include detection features such as *measurements* and *class labels*, and are used to affect how the output is displayed in client apps (e.g. Napari).
|
|
40
40
|
- The *third element* is the output type: a string identifying what the output represents.
|
|
41
41
|
|
|
42
|
-
| Output type | Description
|
|
43
|
-
| ----------------- |
|
|
44
|
-
| `"image"` | An image or image-like data (incl. 3D and RGB) as a numpy array.
|
|
45
|
-
| `"mask"` | A segmentation mask (2D, 3D) as integer numpy array. Integers represent the **object class**.
|
|
46
|
-
| `"instance_mask"` | A segmentation mask (2D, 3D) as integer nD array. Integers represent **object instances**.
|
|
47
|
-
| `"points"` | A collection of point coordinates (array of shape (N, 2) or (N, 3)).
|
|
48
|
-
| `"boxes"` | A collection of boxes (array of shape (N, 4, 2) representing the box corners).
|
|
49
|
-
| `"vectors"` | Array of vectors in the Napari [Vectors](https://napari.org/stable/howtos/layers/vectors.html) format
|
|
50
|
-
| `"tracks"` | Array of tracks in the Napari [Tracks](https://napari.org/stable/howtos/layers/tracks.html) format.
|
|
51
|
-
| `"class"` | A class label (for image classification).
|
|
52
|
-
| `"text"` | A string of text (for example, for image captioning).
|
|
42
|
+
| Output type | Description |
|
|
43
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------ |
|
|
44
|
+
| `"image"` | An image or image-like data (incl. 3D and RGB) as a numpy array. |
|
|
45
|
+
| `"mask"` | A segmentation mask (2D, 3D) as integer numpy array. Integers represent the **object class**. |
|
|
46
|
+
| `"instance_mask"` | A segmentation mask (2D, 3D) as integer nD array. Integers represent **object instances**. |
|
|
47
|
+
| `"points"` | A collection of point coordinates (array of shape (N, 2) or (N, 3)). |
|
|
48
|
+
| `"boxes"` | A collection of boxes (array of shape (N, 4, 2) representing the box corners). |
|
|
49
|
+
| `"vectors"` | Array of vectors in the Napari [Vectors](https://napari.org/stable/howtos/layers/vectors.html) format. |
|
|
50
|
+
| `"tracks"` | Array of tracks in the Napari [Tracks](https://napari.org/stable/howtos/layers/tracks.html) format. |
|
|
51
|
+
| `"class"` | A class label (for image classification). |
|
|
52
|
+
| `"text"` | A string of text (for example, for image captioning). |
|
|
53
53
|
|
|
54
54
|
The function can return multiple outputs, following the pattern:
|
|
55
55
|
|
|
@@ -66,6 +66,26 @@ return [
|
|
|
66
66
|
The function parameters can only be **numpy arrays**, **numeric values** (`int`, `float`), **booleans** or **strings**.
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
````{admonition} Handling detection features and class labels
|
|
70
|
+
You can assign *measurements* and *class labels* to detected objects, such as `boxes`, `points`, or `instance_mask` types. To do this, use the `features` parameter in the output metadata. For example:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
boxes = (...) # Numpy array of shape (N, 2, 2)
|
|
74
|
+
probabilities = (...) # Numpy array of shape (N,) ([0.22, 0.23, 0.65...])
|
|
75
|
+
classes = (...) # List of class labels (["elephant", "giraff", "giraff"...])
|
|
76
|
+
|
|
77
|
+
boxes_params = {
|
|
78
|
+
"name": "YOLO detections",
|
|
79
|
+
"edge_color": "class", # Optional, to parametrize object color in Napari
|
|
80
|
+
"features": {
|
|
81
|
+
"probability": probabilities, # Detection measurements
|
|
82
|
+
"class": classes, # Classifications must be called "class"
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
return [(boxes, boxes_params, "boxes")]
|
|
86
|
+
```
|
|
87
|
+
````
|
|
88
|
+
|
|
69
89
|
## Decorate the function with `@algorithm_server`
|
|
70
90
|
|
|
71
91
|
This has several purposes:
|
|
@@ -78,13 +98,13 @@ This has several purposes:
|
|
|
78
98
|
Below is our decorated threshold algorithm function:
|
|
79
99
|
|
|
80
100
|
```python
|
|
81
|
-
from imaging_server_kit import algorithm_server, ImageUI,
|
|
101
|
+
from imaging_server_kit import algorithm_server, ImageUI, FloatUI
|
|
82
102
|
|
|
83
103
|
@algorithm_server(
|
|
84
104
|
algorithm_name="threshold",
|
|
85
105
|
parameters={
|
|
86
106
|
"image": ImageUI(),
|
|
87
|
-
"threshold":
|
|
107
|
+
"threshold": FloatUI(
|
|
88
108
|
default=0.5,
|
|
89
109
|
min=0.0,
|
|
90
110
|
max=1.0,
|
|
@@ -109,21 +129,21 @@ Most importantly, we have specified the `parameters` field of `@algorithm_server
|
|
|
109
129
|
|
|
110
130
|
The keys of the `parameters` dictionary should match the parameters of the Python function (in our example: `image` and `threshold`). The values are *parameter UI* elements. There is a UI element for each kind of parameters:
|
|
111
131
|
|
|
112
|
-
| UI element
|
|
113
|
-
|
|
|
114
|
-
| `ImageUI`
|
|
115
|
-
| `MaskUI`
|
|
116
|
-
| `DropDownUI`
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `BoolUI`
|
|
120
|
-
| `StringUI`
|
|
121
|
-
| `PointsUI`
|
|
122
|
-
| `VectorsUI`
|
|
123
|
-
| `ShapesUI`
|
|
124
|
-
| `TracksUI`
|
|
125
|
-
|
|
126
|
-
In our example, the input image array is well-represented by the `ImageUI` element, and the threshold parameter as a `
|
|
132
|
+
| UI element | Use case |
|
|
133
|
+
| ------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
134
|
+
| `ImageUI` | Input image. Validates array dimensionality (by default, accepts `2D` and `3D` arrays). |
|
|
135
|
+
| `MaskUI` | Segmentation mask. Validates array dimensionality (by default, accepts `2D` and `3D` arrays). |
|
|
136
|
+
| `DropDownUI` | A dropdown selector. `items` is used to specify a list of available choices. |
|
|
137
|
+
| `FloatUI` | Numeric parameter (floating point). Validates `min` and `max` values. `step` can be used to specify a suitable incremental step. |
|
|
138
|
+
| `IntUI` | Numeric parameter (integer). Validates `min` and `max` values. `step` can be used to specify a suitable incremental step. |
|
|
139
|
+
| `BoolUI` | Boolean parameter, represented as a checkbox. |
|
|
140
|
+
| `StringUI` | String parameter. |
|
|
141
|
+
| `PointsUI` | Points parameter. |
|
|
142
|
+
| `VectorsUI` | Vectors parameter. |
|
|
143
|
+
| `ShapesUI` | Shapes parameter. |
|
|
144
|
+
| `TracksUI` | Tracks parameter. |
|
|
145
|
+
|
|
146
|
+
In our example, the input image array is well-represented by the `ImageUI` element, and the threshold parameter as a `FloatUI`. The parameter defaults and limits (min, max, step) are specified, as well as a title and description of the parameter, which will appear on the algorithm's `info` page.
|
|
127
147
|
|
|
128
148
|
Moreover, the `@algorithm_server` decorator accepts a variety of optional parameters to enable downloading a sample image, linking to a project page, and providing information on the intended usage of the algorithm server. For details, take a look at the complete [demo example](https://github.com/Imaging-Server-Kit/imaging-server-kit/blob/main/src/imaging_server_kit/demo/threshold.py). The available fields include:
|
|
129
149
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
import numpy as np
|
|
3
3
|
import uvicorn
|
|
4
|
-
from imaging_server_kit import algorithm_server, ImageUI,
|
|
4
|
+
from imaging_server_kit import algorithm_server, ImageUI, FloatUI
|
|
5
5
|
from skimage.util import img_as_float
|
|
6
6
|
|
|
7
7
|
|
|
@@ -13,13 +13,13 @@ from skimage.util import img_as_float
|
|
|
13
13
|
tags=["Demo"],
|
|
14
14
|
parameters={
|
|
15
15
|
"image": ImageUI(),
|
|
16
|
-
"threshold":
|
|
16
|
+
"threshold": FloatUI(
|
|
17
17
|
default=0.5,
|
|
18
|
-
title="Threshold",
|
|
19
|
-
description="Intensity threshold.",
|
|
20
18
|
min=0.0,
|
|
21
19
|
max=1.0,
|
|
22
20
|
step=0.1,
|
|
21
|
+
title="Threshold",
|
|
22
|
+
description="Intensity threshold.",
|
|
23
23
|
),
|
|
24
24
|
},
|
|
25
25
|
sample_images=[str(Path(__file__).parent / "sample_images" / "blobs.tif")],
|
{imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-cellpose/main.py
RENAMED
|
@@ -5,8 +5,13 @@ import numpy as np
|
|
|
5
5
|
import uvicorn
|
|
6
6
|
from cellpose import models
|
|
7
7
|
|
|
8
|
-
from imaging_server_kit import (
|
|
9
|
-
|
|
8
|
+
from imaging_server_kit import (
|
|
9
|
+
DropDownUI,
|
|
10
|
+
FloatUI,
|
|
11
|
+
ImageUI,
|
|
12
|
+
IntUI,
|
|
13
|
+
algorithm_server,
|
|
14
|
+
)
|
|
10
15
|
|
|
11
16
|
|
|
12
17
|
@algorithm_server(
|
|
@@ -23,7 +28,7 @@ from imaging_server_kit import (DropDownUI, FloatSpinBoxUI, ImageUI,
|
|
|
23
28
|
description="The model used for instance segmentation",
|
|
24
29
|
items=["cyto", "nuclei", "cyto2"],
|
|
25
30
|
),
|
|
26
|
-
"diameter":
|
|
31
|
+
"diameter": IntUI(
|
|
27
32
|
default=20,
|
|
28
33
|
title="Cell diameter (px)",
|
|
29
34
|
description="The approximate size of the objects to detect",
|
|
@@ -31,7 +36,7 @@ from imaging_server_kit import (DropDownUI, FloatSpinBoxUI, ImageUI,
|
|
|
31
36
|
max=100,
|
|
32
37
|
step=1,
|
|
33
38
|
),
|
|
34
|
-
"flow_threshold":
|
|
39
|
+
"flow_threshold": FloatUI(
|
|
35
40
|
default=0.3,
|
|
36
41
|
title="Flow threshold",
|
|
37
42
|
description="The flow threshold",
|
|
@@ -39,7 +44,7 @@ from imaging_server_kit import (DropDownUI, FloatSpinBoxUI, ImageUI,
|
|
|
39
44
|
max=1.0,
|
|
40
45
|
step=0.05,
|
|
41
46
|
),
|
|
42
|
-
"cellprob_threshold":
|
|
47
|
+
"cellprob_threshold": FloatUI(
|
|
43
48
|
default=0.5,
|
|
44
49
|
title="Probability threshold",
|
|
45
50
|
description="The detection probability threshold",
|
|
@@ -6,9 +6,9 @@ import matplotlib
|
|
|
6
6
|
import uvicorn
|
|
7
7
|
from imaging_server_kit import (
|
|
8
8
|
DropDownUI,
|
|
9
|
-
|
|
9
|
+
FloatUI,
|
|
10
10
|
ImageUI,
|
|
11
|
-
|
|
11
|
+
IntUI,
|
|
12
12
|
BoolUI,
|
|
13
13
|
algorithm_server,
|
|
14
14
|
)
|
|
@@ -24,7 +24,7 @@ from imaging_server_kit import (
|
|
|
24
24
|
description="The orientation computation mode.",
|
|
25
25
|
items=["fiber", "membrane"],
|
|
26
26
|
),
|
|
27
|
-
"scale":
|
|
27
|
+
"scale": FloatUI(
|
|
28
28
|
default=1.0,
|
|
29
29
|
title="Structural scale",
|
|
30
30
|
description="The scale at which orientation is computed.",
|
|
@@ -37,7 +37,7 @@ from imaging_server_kit import (
|
|
|
37
37
|
title="Output color-coded orientation",
|
|
38
38
|
description="Whether to output a color-coded representation of orientation or not.",
|
|
39
39
|
),
|
|
40
|
-
"vector_spacing":
|
|
40
|
+
"vector_spacing": IntUI(
|
|
41
41
|
default=3,
|
|
42
42
|
title="Vector spacing",
|
|
43
43
|
description="The spacing at which the orientation vectors are rendered.",
|
{imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-rembg/main.py
RENAMED
|
@@ -21,7 +21,7 @@ sessions: dict[str, rembg.sessions.BaseSession] = {}
|
|
|
21
21
|
default="silueta",
|
|
22
22
|
title="Model",
|
|
23
23
|
description="The model used for background removal.",
|
|
24
|
-
items=["silueta", "
|
|
24
|
+
items=["silueta", "u2net"],
|
|
25
25
|
),
|
|
26
26
|
},
|
|
27
27
|
sample_images=[
|
|
@@ -41,42 +41,15 @@ def rembg_server(
|
|
|
41
41
|
|
|
42
42
|
session = sessions.setdefault(rembg_model_name, rembg.new_session(rembg_model_name))
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
segmentation = rembg.remove(
|
|
45
|
+
data=image,
|
|
46
|
+
session=session,
|
|
47
|
+
only_mask=True,
|
|
48
|
+
post_process_mask=True,
|
|
49
|
+
)
|
|
50
|
+
segmentation = segmentation == 255
|
|
46
51
|
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
"type": "rectangle",
|
|
50
|
-
"data": [y0, x0, y1, x1],
|
|
51
|
-
"label": 2, # `label` is irrelevant for SAM in bounding boxes mode
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
|
|
55
|
-
segmentation = rembg.remove(
|
|
56
|
-
data=image,
|
|
57
|
-
session=session,
|
|
58
|
-
only_mask=True,
|
|
59
|
-
post_process_mask=True,
|
|
60
|
-
sam_prompt=prompt,
|
|
61
|
-
)
|
|
62
|
-
segmentation = segmentation == 0 # Invert it (for some reason)
|
|
63
|
-
|
|
64
|
-
else:
|
|
65
|
-
segmentation = rembg.remove(
|
|
66
|
-
data=image,
|
|
67
|
-
session=session,
|
|
68
|
-
only_mask=True,
|
|
69
|
-
post_process_mask=True,
|
|
70
|
-
)
|
|
71
|
-
segmentation = segmentation == 255
|
|
72
|
-
|
|
73
|
-
segmentation_params = {
|
|
74
|
-
"name": f"{rembg_model_name}_result",
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return [
|
|
78
|
-
(segmentation, segmentation_params, "mask"),
|
|
79
|
-
]
|
|
52
|
+
return [(segmentation, {"name": f"{rembg_model_name}_result"}, "mask")]
|
|
80
53
|
|
|
81
54
|
|
|
82
55
|
if __name__ == "__main__":
|
|
@@ -8,9 +8,9 @@ from skimage.util import img_as_float
|
|
|
8
8
|
|
|
9
9
|
from imaging_server_kit import (
|
|
10
10
|
BoolUI,
|
|
11
|
-
|
|
11
|
+
FloatUI,
|
|
12
12
|
ImageUI,
|
|
13
|
-
|
|
13
|
+
IntUI,
|
|
14
14
|
algorithm_server,
|
|
15
15
|
)
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@ from imaging_server_kit import (
|
|
|
19
19
|
algorithm_name="skimage-LoG",
|
|
20
20
|
parameters={
|
|
21
21
|
"image": ImageUI(),
|
|
22
|
-
"min_sigma":
|
|
22
|
+
"min_sigma": FloatUI(
|
|
23
23
|
default=5.0,
|
|
24
24
|
title="Min sigma",
|
|
25
25
|
description="Minimum standard deviation of the Gaussian kernel, in pixels.",
|
|
@@ -27,7 +27,7 @@ from imaging_server_kit import (
|
|
|
27
27
|
max=100.0,
|
|
28
28
|
step=0.1,
|
|
29
29
|
),
|
|
30
|
-
"max_sigma":
|
|
30
|
+
"max_sigma": FloatUI(
|
|
31
31
|
default=10.0,
|
|
32
32
|
title="Max sigma",
|
|
33
33
|
description="Maximum standard deviation of the Gaussian kernel, in pixels.",
|
|
@@ -35,7 +35,7 @@ from imaging_server_kit import (
|
|
|
35
35
|
max=100.0,
|
|
36
36
|
step=0.1,
|
|
37
37
|
),
|
|
38
|
-
"num_sigma":
|
|
38
|
+
"num_sigma": IntUI(
|
|
39
39
|
default=10,
|
|
40
40
|
title="Num sigma",
|
|
41
41
|
description="Number of intermediate sigma values to compute between the min_sigma and max_sigma.",
|
|
@@ -43,7 +43,7 @@ from imaging_server_kit import (
|
|
|
43
43
|
max=100,
|
|
44
44
|
step=1,
|
|
45
45
|
),
|
|
46
|
-
"threshold":
|
|
46
|
+
"threshold": FloatUI(
|
|
47
47
|
default=0.1,
|
|
48
48
|
title="Threshold",
|
|
49
49
|
description="Lower bound for scale space maxima.",
|
|
@@ -132,9 +132,7 @@ def skimage_log_server(
|
|
|
132
132
|
(points, points_params, "points"),
|
|
133
133
|
]
|
|
134
134
|
else:
|
|
135
|
-
return [
|
|
136
|
-
("No points were detected.", {}, "text")
|
|
137
|
-
]
|
|
135
|
+
return [("No points were detected.", {}, "text")]
|
|
138
136
|
|
|
139
137
|
|
|
140
138
|
if __name__ == "__main__":
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+

|
|
2
|
+
# serverkit-pystackreg
|
|
3
|
+
|
|
4
|
+
Implementation of a web server for [pyStackreg](https://pystackreg.readthedocs.io/en/latest/index.html).
|
|
5
|
+
|
|
6
|
+
## Installing the algorithm server with `pip`
|
|
7
|
+
|
|
8
|
+
Install dependencies:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
pip install -r requirements.txt
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Run the server:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
python main.py
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The server will be running on http://localhost:8000.
|
|
21
|
+
|
|
22
|
+
## Using `docker-compose`
|
|
23
|
+
|
|
24
|
+
To build the docker image and run a container for the algorithm server in a single command, use:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
docker compose up
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The server will be running on http://localhost:8000.
|
|
31
|
+
|
|
32
|
+
## Sample images provenance
|
|
33
|
+
|
|
34
|
+
- pc12-unreg.tif: From the napari-pystackreg [sample image](https://github.com/glichtner/napari-pystackreg/blob/main/src/napari_pystackreg/_sample_data.py) contribution.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import numpy as np
|
|
4
|
+
import uvicorn
|
|
5
|
+
from pystackreg import StackReg
|
|
6
|
+
|
|
7
|
+
from imaging_server_kit import algorithm_server, ImageUI, DropDownUI, IntUI
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
reg_type_dict = {
|
|
11
|
+
"affine": StackReg.AFFINE,
|
|
12
|
+
"rigid": StackReg.RIGID_BODY,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@algorithm_server(
|
|
17
|
+
title="pyStackReg",
|
|
18
|
+
description="Register one or more images to a common reference image.",
|
|
19
|
+
algorithm_name="pystackreg",
|
|
20
|
+
project_url=
|
|
21
|
+
parameters={
|
|
22
|
+
"image_stack": ImageUI(
|
|
23
|
+
title="Image stack",
|
|
24
|
+
description="2D image stack in (T)ZYX order.",
|
|
25
|
+
dimensionality=[3],
|
|
26
|
+
),
|
|
27
|
+
"reg_type": DropDownUI(
|
|
28
|
+
title="Type",
|
|
29
|
+
description="Registration type.",
|
|
30
|
+
items=list(reg_type_dict.keys()),
|
|
31
|
+
default="rigid",
|
|
32
|
+
),
|
|
33
|
+
"reference": DropDownUI(
|
|
34
|
+
title="Reference",
|
|
35
|
+
description="Reference for the registration",
|
|
36
|
+
items=["previous", "first", "mean"],
|
|
37
|
+
default="previous",
|
|
38
|
+
),
|
|
39
|
+
"axis": IntUI(
|
|
40
|
+
title="Axis",
|
|
41
|
+
description="Registration axis.",
|
|
42
|
+
default=0,
|
|
43
|
+
min=0,
|
|
44
|
+
max=2,
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
sample_images=[Path(__file__).parent / "sample_images" / "pc12-unreg.tif"],
|
|
48
|
+
)
|
|
49
|
+
def stackreg_server(
|
|
50
|
+
image_stack: np.ndarray,
|
|
51
|
+
reg_type: str,
|
|
52
|
+
reference: str,
|
|
53
|
+
axis: int,
|
|
54
|
+
) -> List[tuple]:
|
|
55
|
+
"""Run the Pystackreg algorithm."""
|
|
56
|
+
sr = StackReg(reg_type_dict.get(reg_type))
|
|
57
|
+
tmats = sr.register_stack(image_stack, reference=reference, axis=axis)
|
|
58
|
+
registered_stack = sr.transform_stack(image_stack, tmats=tmats)
|
|
59
|
+
return [(registered_stack, {"name": "Registered stack"}, "image")]
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
if __name__ == "__main__":
|
|
63
|
+
uvicorn.run(stackreg_server.app, host="0.0.0.0", port=8000)
|
|
Binary file
|
{imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-stardist/main.py
RENAMED
|
@@ -6,8 +6,7 @@ import uvicorn
|
|
|
6
6
|
from csbdeep.utils import normalize
|
|
7
7
|
from stardist.models import StarDist2D
|
|
8
8
|
|
|
9
|
-
from imaging_server_kit import
|
|
10
|
-
algorithm_server)
|
|
9
|
+
from imaging_server_kit import DropDownUI, FloatUI, ImageUI, algorithm_server
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
@algorithm_server(
|
|
@@ -24,7 +23,7 @@ from imaging_server_kit import (DropDownUI, FloatSpinBoxUI, ImageUI,
|
|
|
24
23
|
description="The model used for nuclei segmentation",
|
|
25
24
|
items=["2D_versatile_fluo", "2D_versatile_he"],
|
|
26
25
|
),
|
|
27
|
-
"prob_thresh":
|
|
26
|
+
"prob_thresh": FloatUI(
|
|
28
27
|
default=0.5,
|
|
29
28
|
title="Probability threshold",
|
|
30
29
|
description="Predicted object probability threshold",
|
|
@@ -32,7 +31,7 @@ from imaging_server_kit import (DropDownUI, FloatSpinBoxUI, ImageUI,
|
|
|
32
31
|
max=1.0,
|
|
33
32
|
step=0.01,
|
|
34
33
|
),
|
|
35
|
-
"nms_thresh":
|
|
34
|
+
"nms_thresh": FloatUI(
|
|
36
35
|
default=0.4,
|
|
37
36
|
title="Overlap threshold",
|
|
38
37
|
description="Overlapping objects are considered the same when their area/surface overlap exceeds this threshold",
|
|
@@ -40,7 +39,7 @@ from imaging_server_kit import (DropDownUI, FloatSpinBoxUI, ImageUI,
|
|
|
40
39
|
max=1.0,
|
|
41
40
|
step=0.01,
|
|
42
41
|
),
|
|
43
|
-
"scale":
|
|
42
|
+
"scale": FloatUI(
|
|
44
43
|
default=1.0,
|
|
45
44
|
title="Scale",
|
|
46
45
|
description="Scale the input image internally by this factor and rescale the output accordingly (<1 to downsample, >1 to upsample)",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Doc: https://github.com/conda-forge/miniforge-images
|
|
2
|
+
FROM condaforge/miniforge3:latest
|
|
3
|
+
|
|
4
|
+
ARG PYTHON_VERSION=3.10
|
|
5
|
+
RUN conda install python=$PYTHON_VERSION -y
|
|
6
|
+
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
COPY . .
|
|
10
|
+
|
|
11
|
+
RUN python -m pip install -r requirements.txt
|
|
12
|
+
|
|
13
|
+
EXPOSE 8000
|
|
14
|
+
|
|
15
|
+
CMD ["python3", "main.py"]
|
{imaging_server_kit-0.0.12 → imaging_server_kit-0.0.14}/examples/servers/serverkit-trackpy/main.py
RENAMED
|
@@ -6,7 +6,7 @@ import pandas as pd
|
|
|
6
6
|
import trackpy as tp
|
|
7
7
|
import uvicorn
|
|
8
8
|
|
|
9
|
-
from imaging_server_kit import
|
|
9
|
+
from imaging_server_kit import IntUI, PointsUI, algorithm_server
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@algorithm_server(
|
|
@@ -17,13 +17,13 @@ from imaging_server_kit import IntSpinBoxUI, PointsUI, algorithm_server
|
|
|
17
17
|
description="The points to track.",
|
|
18
18
|
dimensionality=[2, 3],
|
|
19
19
|
),
|
|
20
|
-
"search_range":
|
|
20
|
+
"search_range": IntUI(
|
|
21
21
|
default=30,
|
|
22
22
|
title="Search range",
|
|
23
23
|
description="Search range in pixels.",
|
|
24
24
|
max=100,
|
|
25
25
|
),
|
|
26
|
-
"memory":
|
|
26
|
+
"memory": IntUI(
|
|
27
27
|
default=3,
|
|
28
28
|
title="Memory",
|
|
29
29
|
description="Maximum number of skipped frames for a single track.",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Doc: https://github.com/conda-forge/miniforge-images
|
|
2
|
+
FROM condaforge/miniforge3:latest
|
|
3
|
+
|
|
4
|
+
ARG PYTHON_VERSION=3.10
|
|
5
|
+
RUN conda install python=$PYTHON_VERSION -y
|
|
6
|
+
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
COPY . .
|
|
10
|
+
|
|
11
|
+
RUN python -m pip install -r requirements.txt
|
|
12
|
+
|
|
13
|
+
EXPOSE 8000
|
|
14
|
+
|
|
15
|
+
CMD ["python3", "main.py"]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+

|
|
2
|
+
# serverkit-yolo
|
|
3
|
+
|
|
4
|
+
Implementation of a web server for [YOLO](https://docs.ultralytics.com/tasks/detect/) object detection (ultralytics implementation).
|
|
5
|
+
|
|
6
|
+
## Installing the algorithm server with `pip`
|
|
7
|
+
|
|
8
|
+
Install dependencies:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
pip install -r requirements.txt
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Run the server:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
python main.py
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The server will be running on http://localhost:8000.
|
|
21
|
+
|
|
22
|
+
## Using `docker-compose`
|
|
23
|
+
|
|
24
|
+
To build the docker image and run a container for the algorithm server in a single command, use:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
docker compose up
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The server will be running on http://localhost:8000.
|