-
Notifications
You must be signed in to change notification settings - Fork 351
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
Add configurable metadata file and advanced filtering options for BioMassters dataset #2405
base: main
Are you sure you want to change the base?
Add configurable metadata file and advanced filtering options for BioMassters dataset #2405
Conversation
@PedroConrado please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
I'm generally okay with making the metadata file configurable (I did the same thing for SatlasPretrain so I could override the defaults). I'm generally opposed to adding too much preprocessing/filtering to the data loader. Personally I would prefer to see this kind of stuff in the data module. @nilsleh wrote the original data loader so I'll let him review. Thanks for the contribution! |
metadata_filename: metadata file to be used | ||
max_cloud_percentage: maximum allowed cloud percentage for images | ||
max_red_mean: maximum allowed red_mean value for images | ||
include_corrupt: whether to include images marked as corrupted | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on what we decide, we need to add something like the following to the docstring:
.. versionadded:: 0.7
The *metadata_filename*, *max_cloud_percentage*, ... parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the reply. I agree with the filtering on the data loader, but I didn't find any datamodule for this one.
Trying to think whether it would make more sense to have a dedicated function, that can be overwritten to do the filtering. Otherwise there might be many more key words and a "default" is difficult to define. |
I implemented it this way because I needed specific filters, but I understand that a more general approach could be beneficial. I’m open to making adjustments if needed. |
This PR adds a parameter to allow passing different metadata files for the BioMassters dataset and implements new metadata-based filtering options. If the default metadata file is used, the behavior remains unchanged, ensuring backward compatibility. The additional filters, controlled by new parameters (max_cloud_percentage, max_red_mean, and include_corrupt), enable more refined dataset selection without impacting the default usage scenario.