Skip to content

Commit a44595d

Browse files
Merge pull request #92 from alexdaniel654/rel/v1.1.0
Rel/v1.1.0
2 parents 96322c8 + 8ea5e75 commit a44595d

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [1.1.0] - 2024-07-15
4+
5+
### Added
6+
* Proper readthedocs documentation
7+
8+
### Fixed
9+
* A lot of dependency updates
10+
311
## [1.0.1] - 2023-09-05
412

513
### Fixed

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
given-names: "Alexander J"
66
orcid: "https://orcid.org/0000-0003-2353-3283"
77
title: "Segmentation Metrics"
8-
version: 1.0.1
8+
version: 1.1.0
99
doi: 10.5281/zenodo.6576199
10-
date-released: 2023-09-05
10+
date-released: 2024-07-15
1111
url: "https://github.com/alexdaniel654/Segmentation_Metrics"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Segmentation Metrics
22
[![Python CI](https://github.com/alexdaniel654/Segmentation_Metrics/actions/workflows/python_ci.yml/badge.svg)](https://github.com/alexdaniel654/Segmentation_Metrics/actions/workflows/python_ci.yml)
3-
[![Documentation Status](https://readthedocs.org/projects/segmentationmetrics/badge/?version=stable)](https://segmentationmetrics.readthedocs.io/en/stable/?badge=stable)
3+
[![Documentation Status](https://readthedocs.org/projects/segmentationmetrics/badge/?version=latest)](https://segmentationmetrics.readthedocs.io/en/latest/?badge=latest)
44
[![PyPI version](https://badge.fury.io/py/segmentationmetrics.svg)](https://badge.fury.io/py/segmentationmetrics)
55
[![Downloads](https://static.pepy.tech/badge/segmentationmetrics)](https://pepy.tech/project/segmentationmetrics)
66
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
project = 'Segmentation Metrics'
2020
copyright = f'{datetime.now().year}, Alex Daniel'
21-
author = 'Alex Daniel'
22-
release = '1.0.1'
21+
author = 'Alexander J Daniel'
22+
release = '1.1.0'
2323

2424
# -- General configuration ---------------------------------------------------
2525
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
absl-py==2.1.0
2-
numpy==1.26.4
2+
numpy==2.0.0
33
pandas==2.2.2
4-
pytest==8.2.1
5-
scikit-image==0.21.0
4+
pytest==8.2.2
5+
scikit-image==0.24.0
66
scipy==1.13.1

segmentationmetrics/surface_distance/metrics.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@ def compute_surface_distances(mask_gt,
254254
distmap_gt = ndimage.morphology.distance_transform_edt(
255255
~borders_gt, sampling=spacing_mm)
256256
else:
257-
distmap_gt = np.Inf * np.ones(borders_gt.shape)
257+
distmap_gt = np.inf * np.ones(borders_gt.shape)
258258

259259
if borders_pred.any():
260260
distmap_pred = ndimage.morphology.distance_transform_edt(
261261
~borders_pred, sampling=spacing_mm)
262262
else:
263-
distmap_pred = np.Inf * np.ones(borders_pred.shape)
263+
distmap_pred = np.inf * np.ones(borders_pred.shape)
264264

265265
# compute the area of each surface element
266266
surface_area_map_gt = neighbour_code_to_surface_area[neighbour_code_map_gt]
@@ -348,7 +348,7 @@ def compute_robust_hausdorff(surface_distances, percent):
348348
perc_distance_gt_to_pred = distances_gt_to_pred[
349349
min(idx, len(distances_gt_to_pred)-1)]
350350
else:
351-
perc_distance_gt_to_pred = np.Inf
351+
perc_distance_gt_to_pred = np.inf
352352

353353
if len(distances_pred_to_gt) > 0: # pylint: disable=g-explicit-length-test
354354
surfel_areas_cum_pred = (np.cumsum(surfel_areas_pred) /
@@ -357,7 +357,7 @@ def compute_robust_hausdorff(surface_distances, percent):
357357
perc_distance_pred_to_gt = distances_pred_to_gt[
358358
min(idx, len(distances_pred_to_gt)-1)]
359359
else:
360-
perc_distance_pred_to_gt = np.Inf
360+
perc_distance_pred_to_gt = np.inf
361361

362362
return max(perc_distance_gt_to_pred, perc_distance_pred_to_gt)
363363

@@ -438,6 +438,6 @@ def compute_dice_coefficient(mask_gt, mask_pred):
438438
"""
439439
volume_sum = mask_gt.sum() + mask_pred.sum()
440440
if volume_sum == 0:
441-
return np.NaN
441+
return np.nan
442442
volume_intersect = (mask_gt & mask_pred).sum()
443443
return 2*volume_intersect / volume_sum

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name="segmentationmetrics",
13-
version="1.0.1",
13+
version="1.1.0",
1414
description="Binary segmentation accuracy metrics",
1515
long_description=long_description,
1616
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)