Feature/ssb benchmark#132
Merged
Merged
Conversation
Implements the Semantic Split Benchmark from "Dissecting Out-of-Distribution Detection and Open-Set Recognition: A Critical Analysis of Methods and Benchmarks" (IJCV 2024, arxiv 2408.16757). This is pytorch-ood's first fine-grained open-set recognition benchmark, evaluating OOD detectors on CUB-200-2011, Stanford Cars, and FGVC-Aircraft with semantic similarity-based splits (Easy=far-OOD, Hard=near-OOD). New files: - benchmark/img/ssb.py: Private dataset classes (_CUB200, _StanfordCars, _FGVCAircraft) and public benchmarks (CUB_SSB, StanfordCars_SSB, Aircraft_SSB). Includes load_ssb_splits() utility to fetch .pkl splits from the repo. - tests/test_benchmark_ssb.py: 25 unit tests covering dataset filtering, benchmark structure, and OSCR metric. - examples/benchmarks/example_ssb_cub.py: End-to-end usage example. New metric: - utils/metrics.py: oscr_score() for Open-Set Classification Rate. Measures joint accuracy on known classes + rejection of unknown classes. Also added proper __all__ export for public functions (calibration_error, aurra, fpr_at_tpr, oscr_score). Implementation details: - Datasets accept classes=[...] parameter for subsetting with label remapping. - CUB & Aircraft support auto-download via download=True. - Stanford Cars requires manual download (original host dead, guide provided). - All dataset implementations aligned with reference code from Visual-AI repo. - OSCR uses O(n log n) searchsorted for efficiency. Also: Added linting best practices to CLAUDE.md. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add :no-index: directive to all autoclass blocks in dataset/img/__init__.py to suppress duplicate documentation warnings. This tells Sphinx to use the source module as the primary documentation location instead of treating the __init__.py docstring as an alternative location. Also updated CLAUDE.md to document that docs should be built with the sphinx-39 conda environment. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.