From 9df94c0966e5c84458985357e9e62fbbee0a6eaa Mon Sep 17 00:00:00 2001 From: Robert Kiewisz <56911280+RRobert92@users.noreply.github.com> Date: Fri, 24 May 2024 10:25:09 +0200 Subject: [PATCH] bugfix when muultiple images are predicted --- conda-build/meta-v0.2.5.yaml | 52 ++++++++++++++++++++++++++++++++++++ conda-build/meta.yaml | 6 ++--- docs/HISTORY.md | 7 ++--- tardis_em/_version.py | 2 +- tardis_em/utils/predictor.py | 6 ++++- 5 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 conda-build/meta-v0.2.5.yaml diff --git a/conda-build/meta-v0.2.5.yaml b/conda-build/meta-v0.2.5.yaml new file mode 100644 index 00000000..050801f6 --- /dev/null +++ b/conda-build/meta-v0.2.5.yaml @@ -0,0 +1,52 @@ +package: + name: "tardis-em" + version: "0.2.5" + +source: +# git_url: https://github.com/SMLC-NYSBC/TARDIS.git +# git_tag: v0.2.5 + path: ../ + +build: + number: 0 +# noarch: python + platform: osx-arm64 + script: {{ PYTHON }} -m pip install . -vv + +requirements: + host: + - pip + - python>=3.10,<3.12 + build: + - python>=3.10,<3.12 + - pip + - setuptools + run: + - python>=3.10, <3.12 + - pytorch>=1.12.0 + - numpy>=1.21.0 + - pandas>1.3.0 + - tifffile>2021.11.0 + - imagecodecs + - scikit-learn>1.0.1 + - scikit-image>0.19.2 + - scipy>=1.8.1 + - pillow + - open3d + - requests>2.28.0 + - ipython>8.0.0 + - click>8.0.4 + - plyfile + - pyvista + +extra: + recipe-maintainers: + - RRobert92 + - tbepler + +about: + doc_url: https://smlc-nysbc.github.io/TARDIS/ + dev_url: https://github.com/SMLC-NYSBC/TARDIS + home: https://github.com/SMLC-NYSBC/TARDIS + license: MIT + license_file: LICENSE diff --git a/conda-build/meta.yaml b/conda-build/meta.yaml index 050801f6..e01fd7bd 100644 --- a/conda-build/meta.yaml +++ b/conda-build/meta.yaml @@ -1,6 +1,6 @@ package: name: "tardis-em" - version: "0.2.5" + version: "0.2.6" source: # git_url: https://github.com/SMLC-NYSBC/TARDIS.git @@ -9,8 +9,8 @@ source: build: number: 0 -# noarch: python - platform: osx-arm64 + noarch: python +# platform: osx-arm64 script: {{ PYTHON }} -m pip install . -vv requirements: diff --git a/docs/HISTORY.md b/docs/HISTORY.md index 1c41dc6c..4e502c01 100644 --- a/docs/HISTORY.md +++ b/docs/HISTORY.md @@ -1,11 +1,12 @@ # History
- 0.2.5 (2024-05-22) + 0.2.6 (2024-05-22) * **General changes:** * *General*: - * Added support for predicting Actin - * Predicting point clouds directly from cli + * Bugfix when multiple files are predicted in batch + * Added support for predicting Actin + * Predicting point clouds directly from cli
diff --git a/tardis_em/_version.py b/tardis_em/_version.py index b4c29063..f21ac9e7 100644 --- a/tardis_em/_version.py +++ b/tardis_em/_version.py @@ -8,4 +8,4 @@ # MIT License 2021 - 2024 # # ##################################################################### -version = "0.2.5" +version = "0.2.6" diff --git a/tardis_em/utils/predictor.py b/tardis_em/utils/predictor.py index 16c15cf4..1f0c98d9 100644 --- a/tardis_em/utils/predictor.py +++ b/tardis_em/utils/predictor.py @@ -712,7 +712,11 @@ def log_tardis(self, id_: int, i: Union[str, np.ndarray], log_id: float): "text_3": f"Image {id_ + 1}/{len(self.predict_list)}: {i}", } - no_segments = np.max(self.segments[:, 0]) if len(self.segments) > 0 else 0 + if log_id == 7: + no_segments = np.max(self.segments[:, 0]) if len(self.segments) > 0 else 0 + else: + no_segments = 'None' + # Define text configurations for each log_id text_configurations = { 0: {