diff --git a/README.md b/README.md index fca5c2f..0702d61 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Speckle noise seriously limits the interpretability of synthetic aperture radar [![PyPI version](https://badge.fury.io/py/deepdespeckling.svg)](https://badge.fury.io/py/deepdespeckling) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![Inline docs](icons/doc.svg)](https://inch-ci.org/github/dwyl/hapi-auth-jwt2) ## Installation @@ -149,7 +150,7 @@ image = cos2mat(image_path).astype(np.float32) # Denoise the image with SAR2SAR denoiser = Sar2SarDenoiser() denoised_image = denoiser.denoise_image( - image, model_weights_path, patch_size=PATCH_SIZE, stride_size=STRIDE_SIZE) + image, patch_size=PATCH_SIZE, stride_size=STRIDE_SIZE) ``` - Example of result with SAR2SAR : diff --git a/deepdespeckling/merlin/merlin_denoiser.py b/deepdespeckling/merlin/merlin_denoiser.py index 8693ec4..2700603 100644 --- a/deepdespeckling/merlin/merlin_denoiser.py +++ b/deepdespeckling/merlin/merlin_denoiser.py @@ -23,7 +23,7 @@ def __init__(self, model_name, symetrise, **params): """Initialize MerlinDenoiser class Args: - model_name (str): name to be used, can be "spotlight", "stripmap" or "Sentinel_TOPS" + model_name (str): name to be used, can be "spotlight", "stripmap" or "Sentinel-TOPS" """ super().__init__(**params) self.model_name = model_name @@ -42,7 +42,7 @@ def init_model_weights_path(self) -> str: elif self.model_name == "stripmap": model_weights_path = os.path.join( current_dir, "saved_models/stripmap.pth") - elif self.model_name == "Sentinel_TOPS": + elif self.model_name == "Sentinel-TOPS": model_weights_path = os.path.join( current_dir, "saved_models/sentinel_tops.pth") else: diff --git a/deepdespeckling/utils/utils.py b/deepdespeckling/utils/utils.py index b9bc3ee..cb8e23c 100644 --- a/deepdespeckling/utils/utils.py +++ b/deepdespeckling/utils/utils.py @@ -234,7 +234,7 @@ def symetrise_real_and_imaginary_parts(real_part: np.array, imag_part: np.array) shift_az_2 = int( round(-(d1 - 1 - p.shape[0]) / 2)) % p.shape[0] + int(p.shape[0] / 2) p2_2 = np.roll(p, shift_az_2) - window = signal.gaussian(p.shape[0], std=0.2 * p.shape[0]) + window = signal.windows.gaussian(p.shape[0], std=0.2 * p.shape[0]) test_1 = np.sum(window * p2_1) test_2 = np.sum(window * p2_2) # make sure the spectrum is symetrized and zeo-Doppler centered @@ -260,7 +260,7 @@ def symetrise_real_and_imaginary_parts(real_part: np.array, imag_part: np.array) shift_range_2 = int( round(-(d2 - 1 - q.shape[0]) / 2)) % q.shape[0] + int(q.shape[0] / 2) q2_2 = np.roll(q, shift_range_2) - window_r = signal.gaussian(q.shape[0], std=0.2 * q.shape[0]) + window_r = signal.windows.gaussian(q.shape[0], std=0.2 * q.shape[0]) test_1 = np.sum(window_r * q2_1) test_2 = np.sum(window_r * q2_2) if test_1 >= test_2: diff --git a/setup.py b/setup.py index d24b941..db896e8 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,6 @@ name='deepdespeckling', packages=find_packages(include=['deepdespeckling', 'deepdespeckling.*']), url='https://github.com/hi-paris/deepdespeckling', - version='0.5', + version='0.6', zip_safe=False, )