diff --git a/deepdespeckling/merlin/merlin_denoiser.py b/deepdespeckling/merlin/merlin_denoiser.py index 92ae78e..04367d4 100644 --- a/deepdespeckling/merlin/merlin_denoiser.py +++ b/deepdespeckling/merlin/merlin_denoiser.py @@ -165,9 +165,9 @@ def preprocess_denoised_image(self, denoised_image_real_part: np.array, denoised processed denoised full image, processed denoised image real part, processed denoised image imaginary part """ denoised_image_real_part = denormalize_sar_image( - denoised_image_real_part / count_image) + denoised_image_real_part / count_image, self.M, self.m) denoised_image_imaginary_part = denormalize_sar_image( - denoised_image_imaginary_part / count_image) + denoised_image_imaginary_part / count_image, self.M, self.m) # combine the two estimation output_clean_image = 0.5 * (np.square( diff --git a/deepdespeckling/utils/utils.py b/deepdespeckling/utils/utils.py index cb8e23c..f207a17 100644 --- a/deepdespeckling/utils/utils.py +++ b/deepdespeckling/utils/utils.py @@ -22,11 +22,13 @@ def normalize_sar_image(image: np.array) -> np.array: return ((np.log(np.clip(image, 0, image.max())+1e-6)-m)/(M-m)).astype(np.float32) -def denormalize_sar_image(image: np.array) -> np.array: +def denormalize_sar_image(image: np.array, M: float = M, m: float = m) -> np.array: """Denormalize a sar image store in a numpy array Args: image (numpy array): a sar image + M (float): global maximum used for normalisation + m (float): global minimum used for normalisation Raises: TypeError: raise an error if the image file is not a numpy array diff --git a/setup.py b/setup.py index 2c5aea5..99efb61 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( - author="Emanuele Dalsasso, Youcef Kemiche, Pierre Blanchard, Hadrien Mariaccia", + author="Emanuele Dalsasso, Hadrien Mariaccia, Youcef Kemiche, Pierre Blanchard", author_email='engineer@hi-paris.fr', python_requires='>=3.6', classifiers=[ @@ -40,6 +40,6 @@ name='deepdespeckling', packages=find_packages(include=['deepdespeckling', 'deepdespeckling.*']), url='https://github.com/hi-paris/deepdespeckling', - version='0.7', + version='0.8', zip_safe=False, )