diff --git a/models/vista2d/configs/metadata.json b/models/vista2d/configs/metadata.json index 067b579a..a1cba412 100644 --- a/models/vista2d/configs/metadata.json +++ b/models/vista2d/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20240725.json", - "version": "0.2.8", + "version": "0.2.9", "changelog": { + "0.2.9": "fix unsupported data dtype in findContours", "0.2.8": "remove relative path in readme", "0.2.7": "enhance readme", "0.2.6": "update tensorrt benchmark results", diff --git a/models/vista2d/scripts/components.py b/models/vista2d/scripts/components.py index 454356c0..61b89c8d 100644 --- a/models/vista2d/scripts/components.py +++ b/models/vista2d/scripts/components.py @@ -251,6 +251,7 @@ def __call__(self, data): cv2.imwrite(output_filepath, image) logger.info(f"Overlay Masks: Saving {output_filepath}") else: + label = cv2.convertScaleAbs(label, alpha=255.0 / label.max()) contours, _ = cv2.findContours(label, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) polygons.extend(self.to_polygons(contours))