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

working on perturbation detectors #51

Merged
merged 22 commits into from
Aug 13, 2024
Merged

Conversation

rabah-khalek
Copy link
Contributor

@rabah-khalek rabah-khalek commented Aug 8, 2024

  • For now only coloring and blurring are supported for models that have "predict_gray_image" implemented (only hf models for now)
  • To add later: resizing by half but this requires also rescaling the labels of the object_detection

We can keep the scope limited to coloring and blurring for now. @bmalezieux maybe you can support predict_gray_image for the rest of the models we have?

@rabah-khalek rabah-khalek marked this pull request as draft August 8, 2024 14:03
@rabah-khalek rabah-khalek marked this pull request as ready for review August 8, 2024 14:32
Copy link
Collaborator

@bmalezieux bmalezieux left a comment

Choose a reason for hiding this comment

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

We can also add a NoisePerturbationDetector to evaluate robustness to noise

giskard_vision/core/detectors/perturbation.py Outdated Show resolved Hide resolved
giskard_vision/core/detectors/perturbation.py Outdated Show resolved Hide resolved
giskard_vision/core/detectors/perturbation.py Outdated Show resolved Hide resolved
except (ImportError, ModuleNotFoundError) as e:
raise GiskardImportError(["giskard"]) from e

relative_delta = (test_result.metric_value_test - test_result.metric_value_ref) / test_result.metric_value_ref
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should use what we implemented in the meta data detector for this function, for instance here the metric can be absolute or relative

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

taken care of in #53

@rabah-khalek rabah-khalek merged commit b9ab6b8 into main Aug 13, 2024
5 checks passed
@rabah-khalek rabah-khalek deleted the perturbation-detectors branch August 13, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants