Skip to content

Commit

Permalink
Added tooltips for denoising parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffenhir committed Apr 29, 2024
1 parent 636873b commit 6c1af7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion graxpert/denoising.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def denoise(image, ai_path, strength, batch_size=4, window_size=256, stride=128,
if "1.0.0" in ai_path or "1.1.0" in ai_path:
model_threshold = 1.0
else:
model_threshold = 100.0
model_threshold = 10.0

last_progress = 0
for b in range(0, ith * itw + batch_size, batch_size):
Expand Down
4 changes: 2 additions & 2 deletions graxpert/ui/left_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ def create_children(self):
self.denoise_strength_slider = ValueSlider(
self.sub_frame, width=default_label_width, variable_name=_("Denoise Strength"), variable=self.denoise_strength, min_value=0.0, max_value=1.0, precision=2
)
tooltip.Tooltip(self.denoise_strength_slider, text=tooltip.bg_tol_text)
tooltip.Tooltip(self.denoise_strength_slider, text=tooltip.denoise_strength_text)

self.denoise_threshold_slider = ValueSlider(
self.sub_frame, width=default_label_width, variable_name=_("Denoise Threshold"), variable=self.denoise_threshold, min_value=0.1, max_value=10.0, precision=1
)
tooltip.Tooltip(self.denoise_threshold_slider, text=tooltip.bg_tol_text)
tooltip.Tooltip(self.denoise_threshold_slider, text=tooltip.denoise_threshold_text)

def setup_layout(self):
super().setup_layout()
Expand Down
1 change: 1 addition & 0 deletions graxpert/ui/tooltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def disable(self):

denoise_text = _("Use GraXpert's denoising AI model to reduce the noise in your image. This may take a while")
denoise_strength_text = _("Determines strength of denoising.")
denoise_threshold_text = _("Determines the upper bound up to which pixels are denoised. Pixels above this threshold are not denoised and taken from the original image.")

saveas_text = _("Choose the bitdepth of the saved pictures and the file format. " "If you are working with a .fits image the fits header will " "be preserved.")
save_bg_text = _("Save the background model")
Expand Down

0 comments on commit 6c1af7f

Please sign in to comment.