Skip to content

Commit

Permalink
Merge main the feature branch. (#2376)
Browse files Browse the repository at this point in the history
* Update timm requirement from <=1.0.7,>=1.0.7 to >=1.0.7,<=1.0.9 (#2274)

* Update timm requirement from <=1.0.7,>=1.0.7 to >=1.0.7,<=1.0.9

Updates the requirements on [timm](https://github.com/huggingface/pytorch-image-models) to permit the latest version.
- [Release notes](https://github.com/huggingface/pytorch-image-models/releases)
- [Commits](huggingface/pytorch-image-models@v1.0.7...v1.0.9)

---
updated-dependencies:
- dependency-name: timm
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update pyproject.toml

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samet Akcay <[email protected]>

* 🐞Update `setuptools` requirement for PEP 660 support (#2320)

Update setup tools

Signed-off-by: Samet Akcay <[email protected]>

* Fix transforms for draem, dsr and rkde (#2324)

Signed-off-by: Blaz Rolih <[email protected]>

* Add check before loading metrics data from checkpoint (#2323)

Add check before loading from checkpoint

Signed-off-by: Blaz Rolih <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>

* Add PIMO (#2329)

* PIMO (#1726)

* update

Signed-off-by: jpcbertoldo <[email protected]>

* test binclf curves numpy and numba and fixes

Signed-off-by: jpcbertoldo <[email protected]>

* correct som docstrings

Signed-off-by: jpcbertoldo <[email protected]>

* torch interface and tests

Signed-off-by: jpcbertoldo <[email protected]>

* torch interface and tests

Signed-off-by: jpcbertoldo <[email protected]>

* constants regrouped in dataclass as class vars

Signed-off-by: jpcbertoldo <[email protected]>

* result class was unneccesary for per_image_binclf_curve

Signed-off-by: jpcbertoldo <[email protected]>

* factorize function _get_threshs_minmax_linspace

Signed-off-by: jpcbertoldo <[email protected]>

* small docs fixes

Signed-off-by: jpcbertoldo <[email protected]>

* add pimo numpy version and test

Signed-off-by: jpcbertoldo <[email protected]>

* move validation

Signed-off-by: jpcbertoldo <[email protected]>

* add `shared_fpr_metric` option

Signed-off-by: jpcbertoldo <[email protected]>

* add pimo torch functional version and test

Signed-off-by: jpcbertoldo <[email protected]>

* add torchmetrics interface and test

Signed-off-by: jpcbertoldo <[email protected]>

* renames and put things in init

Signed-off-by: jpcbertoldo <[email protected]>

* validate inputs in result objects

Signed-off-by: jpcbertoldo <[email protected]>

* result objects to from dict and tests

Signed-off-by: jpcbertoldo <[email protected]>

* add save and load methods to result objects and test

Signed-off-by: jpcbertoldo <[email protected]>

* refactor validations and minor changes

Signed-off-by: jpcbertoldo <[email protected]>

* test result objects' properties

Signed-off-by: jpcbertoldo <[email protected]>

* minor refactors

Signed-off-by: jpcbertoldo <[email protected]>

* add missing docstrings

Signed-off-by: jpcbertoldo <[email protected]>

* minore vocabulary fix for consistency

Signed-off-by: jpcbertoldo <[email protected]>

* add per image scores statistics and test it

Signed-off-by: jpcbertoldo <[email protected]>

* refactor constants notation

Signed-off-by: jpcbertoldo <[email protected]>

* add stats tests and test it

Signed-off-by: jpcbertoldo <[email protected]>

* change the meaning of AUPIMO.num_thresh

Signed-off-by: jpcbertoldo <[email protected]>

* interface to format pairwise test results

Signed-off-by: jpcbertoldo <[email protected]>

* improve doc

Signed-off-by: jpcbertoldo <[email protected]>

* add optional `paths` to result objects and some minor fixes and refactors

Signed-off-by: jpcbertoldo <[email protected]>

* remove frozen from dataclasses and some done todos

Signed-off-by: jpcbertoldo <[email protected]>

* review headers

Signed-off-by: jpcbertoldo <[email protected]>

* doc modifs

Signed-off-by: jpcbertoldo <[email protected]>

* refactor `score_less_than_thresh` in `_binclf_one_curve_python`

Signed-off-by: jpcbertoldo <[email protected]>

* correct license comments

Signed-off-by: jpcbertoldo <[email protected]>

* fix doc

Signed-off-by: jpcbertoldo <[email protected]>

* numba as extra requirement

Signed-off-by: jpcbertoldo <[email protected]>

* refactor copyrights from jpcbertoldo

Signed-off-by: jpcbertoldo <[email protected]>

* remove from __future__ import annotations

Signed-off-by: jpcbertoldo <[email protected]>

* refactor validations names

Signed-off-by: jpcbertoldo <[email protected]>

* dedupe file path validation

Signed-off-by: jpcbertoldo <[email protected]>

* fix tests

Signed-off-by: jpcbertoldo <[email protected]>

* Add todo

Signed-off-by: jpcbertoldo <[email protected]>

* refactor enums

Signed-off-by: jpcbertoldo <[email protected]>

* only logger.warning

Signed-off-by: jpcbertoldo <[email protected]>

* refactor test imports

Signed-off-by: jpcbertoldo <[email protected]>

* refactor docs

Signed-off-by: jpcbertoldo <[email protected]>

* refactor some docs

Signed-off-by: jpcbertoldo <[email protected]>

* correct pre commit errors

Signed-off-by: jpcbertoldo <[email protected]>

* remove author tag

Signed-off-by: jpcbertoldo <[email protected]>

* add thrid party program

Signed-off-by: jpcbertoldo <[email protected]>

* Update src/anomalib/metrics/per_image/pimo.py

* move HAS_NUMBA

Signed-off-by: jpcbertoldo <[email protected]>

* remove PIMOSharedFPRMetric

Signed-off-by: jpcbertoldo <[email protected]>

* make torchmetrics compute avg by dft

Signed-off-by: jpcbertoldo <[email protected]>

* pre-commit hooks corrections

Signed-off-by: jpcbertoldo <[email protected]>

* correct numpy.trapezoid

Signed-off-by: jpcbertoldo <[email protected]>

---------

Signed-off-by: jpcbertoldo <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>

* 🗑️ Remove numba (#2313)

* remove numba

Signed-off-by: Ashwin Vaidya <[email protected]>

* fix pre-commit checks

Signed-off-by: Ashwin Vaidya <[email protected]>

* add third-party-programs.txt

Signed-off-by: Ashwin Vaidya <[email protected]>

---------

Signed-off-by: Ashwin Vaidya <[email protected]>

* 🗑️ Remove unused methods (#2315)

* remove numba

Signed-off-by: Ashwin Vaidya <[email protected]>

* fix pre-commit checks

Signed-off-by: Ashwin Vaidya <[email protected]>

* remove all unused methods

Signed-off-by: Ashwin Vaidya <[email protected]>

---------

Signed-off-by: Ashwin Vaidya <[email protected]>

* PIMO: Port Numpy → Torch (#2316)

* remove numba

Signed-off-by: Ashwin Vaidya <[email protected]>

* fix pre-commit checks

Signed-off-by: Ashwin Vaidya <[email protected]>

* remove all unused methods

Signed-off-by: Ashwin Vaidya <[email protected]>

* replace numpy with torch

Signed-off-by: Ashwin Vaidya <[email protected]>

---------

Signed-off-by: Ashwin Vaidya <[email protected]>

* 🔨Refactor methods across files (#2321)

* remove numba

Signed-off-by: Ashwin Vaidya <[email protected]>

* fix pre-commit checks

Signed-off-by: Ashwin Vaidya <[email protected]>

* remove all unused methods

Signed-off-by: Ashwin Vaidya <[email protected]>

* replace numpy with torch

Signed-off-by: Ashwin Vaidya <[email protected]>

* refactor code

Signed-off-by: Ashwin Vaidya <[email protected]>

* refactor
move functional inside update
remove path from the metric

* Add changes from comments

Signed-off-by: Ashwin Vaidya <[email protected]>

---------

Signed-off-by: Ashwin Vaidya <[email protected]>

* Remove model to model comparison (#2325)

* rename to pimo

Signed-off-by: Ashwin Vaidya <[email protected]>

* minor refactor

Signed-off-by: Ashwin Vaidya <[email protected]>

* remove model to model comparison

Signed-off-by: Ashwin Vaidya <[email protected]>

* fix test

Signed-off-by: Ashwin Vaidya <[email protected]>

* PR comments

Signed-off-by: Ashwin Vaidya <[email protected]>

* Minor refactor

Signed-off-by: Ashwin Vaidya <[email protected]>

---------

Signed-off-by: Ashwin Vaidya <[email protected]>

* PR comments

Signed-off-by: Ashwin Vaidya <[email protected]>

* Remove unused enums

Signed-off-by: Ashwin Vaidya <[email protected]>

* update doc strings

Signed-off-by: Ashwin Vaidya <[email protected]>

* update param names

Signed-off-by: Ashwin Vaidya <[email protected]>

* add aupimo basic usage tutorial notebook (#2330)

* add aupimo basic usage tutorial notebook

Signed-off-by: jpcbertoldo <[email protected]>

* update scipy import

Signed-off-by: jpcbertoldo <[email protected]>

* add cite us

Signed-off-by: jpcbertoldo <[email protected]>

* minor

Signed-off-by: jpcbertoldo <[email protected]>

* modify texts and add illustration

Signed-off-by: jpcbertoldo <[email protected]>

* udpate working dir

Signed-off-by: jpcbertoldo <[email protected]>

---------

Signed-off-by: jpcbertoldo <[email protected]>

---------

Signed-off-by: jpcbertoldo <[email protected]>
Signed-off-by: Ashwin Vaidya <[email protected]>
Co-authored-by: Joao P C Bertoldo <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>

* Makes batch size dynamic (#2339)

Made batch dimension of ONNX export dynamic when specifying input shape.

* Add pimo tutorial advanced i (fixed) (#2336)

* uset all padim features to make it deterministic

Signed-off-by: jpcbertoldo <[email protected]>

* add aupimo notebook advanced i

Signed-off-by: jpcbertoldo <[email protected]>

* update readme

Signed-off-by: jpcbertoldo <[email protected]>

* modify changelog

Signed-off-by: jpcbertoldo <[email protected]>

* correct readme

Signed-off-by: jpcbertoldo <[email protected]>

* correct again

Signed-off-by: jpcbertoldo <[email protected]>

* minor corrections

Signed-off-by: jpcbertoldo <[email protected]>

---------

Signed-off-by: jpcbertoldo <[email protected]>

* Pimo tutorials/02 advanced ii (#2347)

* uset all padim features to make it deterministic

Signed-off-by: jpcbertoldo <[email protected]>

* add aupimo notebook advanced i

Signed-off-by: jpcbertoldo <[email protected]>

* update readme

Signed-off-by: jpcbertoldo <[email protected]>

* modify changelog

Signed-off-by: jpcbertoldo <[email protected]>

* correct readme

Signed-off-by: jpcbertoldo <[email protected]>

* correct again

Signed-off-by: jpcbertoldo <[email protected]>

* minor corrections

Signed-off-by: jpcbertoldo <[email protected]>

* add aupimo notebook advanced ii (pimo curve and integration bounds)

Signed-off-by: jpcbertoldo <[email protected]>

* fix links

Signed-off-by: jpcbertoldo <[email protected]>

* correct change log

Signed-off-by: jpcbertoldo <[email protected]>

---------

Signed-off-by: jpcbertoldo <[email protected]>

* Create epic.yaml

* 🔨 Update the issue templates (#2363)

* Update epic.yaml

* Update epic.yaml

* Update epic.yaml

* Update epic.yaml

* Update task.yaml

* Create user_story.yaml

* Update epic.yaml

* Pimo tutorials/03 advanced iii (#2348)

* add aupimo notebook advanced iii (aupimo score of a random model)

Signed-off-by: jpcbertoldo <[email protected]>

* add cite us

Signed-off-by: jpcbertoldo <[email protected]>

* update notebooks readme

Signed-off-by: jpcbertoldo <[email protected]>

---------

Signed-off-by: jpcbertoldo <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>

* 🔨 Deprecate try import and replace it with Lightning's package_available (#2373)

Replace try_import with lightnings package_available function

Signed-off-by: Samet Akcay <[email protected]>

* Refactor folder3d to avoid complex-structure (C901) issue (#2185)

* Refactored-make_folder3d_dataset-ruff-error-C901 (#1926)

Signed-off-by: sahusiddharth <[email protected]>

* Simplify folder 3d dataset (#2184)

---------

Signed-off-by: sahusiddharth <[email protected]>
Co-authored-by: Siddharth Sahu <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Samet Akcay <[email protected]>
Signed-off-by: Blaz Rolih <[email protected]>
Signed-off-by: jpcbertoldo <[email protected]>
Signed-off-by: Ashwin Vaidya <[email protected]>
Signed-off-by: sahusiddharth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blaž Rolih <[email protected]>
Co-authored-by: Ashwin Vaidya <[email protected]>
Co-authored-by: Joao P C Bertoldo <[email protected]>
Co-authored-by: Marcus Pertlwieser <[email protected]>
Co-authored-by: Siddharth Sahu <[email protected]>
  • Loading branch information
7 people authored Oct 16, 2024
1 parent 06daad9 commit 95115f9
Show file tree
Hide file tree
Showing 35 changed files with 7,349 additions and 70 deletions.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 🎯 Epic
description: A large body of work that can be broken down into smaller stories
title: "🎯 [EPIC] "
labels: ["epic"]
assignees: []
body:
- type: markdown
attributes:
value: "## 🎯 Epic Description"
- type: textarea
id: description
attributes:
label: Describe the epic
description: Provide a clear and concise description of what this epic encompasses
validations:
required: true
- type: textarea
id: goals
attributes:
label: Goals
description: What are the main goals of this epic?
validations:
required: true
- type: textarea
id: tasks
attributes:
label: Tasks
description: Break down the epic into smaller tasks. Add or remove tasks as needed.
value: |
- [ ] Task 1:
- [ ] Task 2:
- [ ] Task 3:
- [ ] Task 4:
- [ ] Task 5:
validations:
required: true
- type: markdown
attributes:
value: "Remember to create separate issues for each task and link them to this epic."
74 changes: 52 additions & 22 deletions .github/ISSUE_TEMPLATE/task.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,65 @@
name: Tasks
description: This is used to capture tasks being implemented/to implement such as features, maintenance, refactor, etc.
title: "[Task]: "
labels: ["Task"]
name: 📋 Task
description: A specific piece of work to be completed
title: "📋 [TASK] "
labels: ["task"]
assignees: []
body:
- type: markdown
attributes:
value: |
We encourage our users to submit feature requests in our [Discussion forum](https://github.com/openvinotoolkit/anomalib/discussions/categories/ideas-feature-requests). You can use this template for consistency.
value: "## 📋 Task Description"
- type: textarea
id: motivation
id: description
attributes:
label: What is the motivation for this task?
description: A clear and concise description of what the problem is.
placeholder: |
1. I'm always frustrated when [...]. It would be better if we could [...]
2. I would like to have [...] model/dataset to be supported in Anomalib.
label: Describe the task
description: Provide a clear and concise description of the task to be completed
validations:
required: true
- type: textarea
id: solution
id: acceptance-criteria
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen. Add screenshots or code-blocks if necessary.
placeholder: |
I would like to have [...] to do this we would need to [...]
Here is what I would like to see [...]
label: Acceptance Criteria
description: List the specific criteria that must be met for this task to be considered complete
validations:
required: true
- type: dropdown
id: priority
attributes:
label: Priority
options:
- Low
- Medium
- High
validations:
required: true
- type: input
id: epic-link
attributes:
label: Related Epic
description: If this task is part of an epic, provide the epic's issue number (e.g., #123)
validations:
required: false
- type: input
id: estimated-time
attributes:
label: Estimated Time
description: Provide an estimate of how long this task will take (e.g., 2h, 1d)
validations:
required: false
- type: dropdown
id: status
attributes:
label: Current Status
options:
- Not Started
- In Progress
- Blocked
- Ready for Review
validations:
required: true
- type: textarea
id: additional-context
id: additional-info
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
label: Additional Information
description: Any other relevant details or context for this task
validations:
required: false
69 changes: 69 additions & 0 deletions .github/ISSUE_TEMPLATE/user_story.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: 📖 User Story
description: A small, self-contained unit of development work describing a feature from an end-user perspective
title: "📖 [STORY] "
labels: ["user-story"]
assignees: []
body:
- type: markdown
attributes:
value: "## 📖 User Story Description"
- type: textarea
id: user-story
attributes:
label: User Story
description: As a [type of user], I want [an action] so that [a benefit/a value]
placeholder: As a computer vision researcher, I want to implement a new anomaly detection algorithm so that I can improve detection accuracy for industrial defect scenarios.
validations:
required: true
- type: textarea
id: acceptance-criteria
attributes:
label: Acceptance Criteria
description: List the acceptance criteria for this user story
placeholder: |
1. The new algorithm is implemented and integrated into the anomalib framework
2. Unit tests are written and pass for the new implementation
3. Performance benchmarks show improvement over existing methods on specified datasets
4. Documentation is updated to include usage instructions and theory behind the new algorithm
5. An example notebook is provided demonstrating the algorithm's application
validations:
required: true
- type: input
id: story-points
attributes:
label: Story Points
description: Estimate the complexity of this story (e.g., 1, 2, 3, 5, 8, 13)
validations:
required: true
- type: input
id: epic-link
attributes:
label: Related Epic
description: If this story is part of an epic, provide the epic's issue number (e.g., #123)
validations:
required: false
- type: dropdown
id: model-category
attributes:
label: Category
description: Select the category this story primarily relates to
options:
- Data
- Anomaly Detection Algorithms
- Pre-processing
- Post-processing
- Evaluation Metrics
- Visualization
- Performance Optimization
- API/Interface
- Documentation
- Others
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context, background, or relevant research papers about the user story here
validations:
required: false
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added

- Add `AUPIMO` tutorials notebooks in https://github.com/openvinotoolkit/anomalib/pull/2330 and https://github.com/openvinotoolkit/anomalib/pull/2336
- Add `AUPIMO` metric by [jpcbertoldo](https://github.com/jpcbertoldo) in https://github.com/openvinotoolkit/anomalib/pull/1726 and refactored by [ashwinvaidya17](https://github.com/ashwinvaidya17) in https://github.com/openvinotoolkit/anomalib/pull/2329

### Changed

### Deprecated
Expand Down
Loading

0 comments on commit 95115f9

Please sign in to comment.