Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
📝 Description
without
numba, aupimo became annoyingly slow for full resolution test, so this idea show speed it up by removing unnecessayr computationthis parameter is what mostly makes it so inefficient (
num_thresholds = 300_000)https://github.com/openvinotoolkit/anomalib/blob/1465b05fd9ff5c20bfe6df661187e6866e04cec7/src/anomalib/metrics/pimo/functional.py#L118
it has to be so big to make sure that there will be enough points in the AUC integration within the integration range
the current implementation thresholds the anomaly score maps from their min to max value, which is the inefficient because we only need it in a much smaller range
strategy to improve it:
- use binary search to find the thresholds corresponding to the fpr integration bounds
- compute the binary classification curves within those bounds
- decrease the number of thresholds from
300_000to300✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.