Skip to content

Add update_freq_mask method #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: feat-preprocess
Choose a base branch
from

Conversation

t-sasatani
Copy link
Collaborator

@t-sasatani t-sasatani commented Feb 16, 2025

This PR adds a method for updating the frequency mask during processing. If we want to do adaptive frequency masking in the mio process denoise module, adding freq_mask_processor.update_freq_mask(params) right before the following code (which processes each frame in the for loop) should be most straightforward.

freq_masked_frame = freq_mask_processor.process_frame(patched_frame)


📚 Documentation preview 📚: https://miniscope-io--105.org.readthedocs.build/en/105/

@t-sasatani t-sasatani requested a review from MarcelMB February 16, 2025 07:53
@MarcelMB
Copy link
Contributor

As I see it it basically just preparing the code for an adaptive filtering right? There is no mechanism for the mask to change based on feedback from the processed frames (like a noise estimation). It would still take the user pre-defined values for all frames.

Copy link
Contributor

@MarcelMB MarcelMB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than my question and one comment I'm fine with it!

Comment on lines +386 to +388
"""

self._freq_mask = self._gen_freq_mask(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to add logging here:

logging.info(f"Updating frequency mask with vertical_BEF_cutoff={vertical_BEF_cutoff}, "
f"horizontal_BEF_cutoff={horizontal_BEF_cutoff}, "
f"spatial_LPF_cutoff_radius={spatial_LPF_cutoff_radius}")

               to see successfully updated values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants