Skip to content
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

Error in Argument Usage in filter_results_masking.py and filter_results_noise.py #2

Open
OrBerebi opened this issue Dec 9, 2024 · 0 comments

Comments

@OrBerebi
Copy link

OrBerebi commented Dec 9, 2024

GitHub Issue: Error in Argument Usage in filter_results_masking.py and filter_results_noise.py

There is an error in the argument usage within both filter_results_masking.py and filter_results_noise.py. Specifically, this occurs in the lines where ambient_utils.dataset_utils.ImageFolderDataset is used. For example:

masks_dataset_obj = ambient_utils.dataset_utils.ImageFolderDataset(
    path=input_dir, 
    use_labels=False, 
    xflip=False,
    cache=cache, 
    corruption_probability=0.0, 
    delta_probability=0.0, 
    resolution=1024, 
    must_contain="mask", 
    must_not_contain="masked"
)

The arguments corruption_probability and delta_probability are not defined in ambient_utils/dataset_utils.py, resulting in the following error:

TypeError: __init__() got an unexpected keyword argument 'corruption_probability'

Quick Fix

A temporary fix was to remove both corruption_probability and delta_probability from the ImageFolderDataset calls and rely on the default values, which seem to work as intended.

Assumptions

It seems these arguments might actually refer to:

  • corruption_probability_per_image
  • corruption_probability_per_pixel
  • delta_probability_per_pixel

However, I'll leave it up to the maintainers to decide the correct fix and whether these parameters need to be explicitly set or removed altogether.

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

No branches or pull requests

1 participant