Skip to content

Commit

Permalink
[RC Release] - v0.4.0rc1 (#887)
Browse files Browse the repository at this point in the history
* Changed the version number

* Remove v0.4.0 references from the code base and the readme file

* Updated the changelog

* Remove configs directory. Will be added once CLI is ready
  • Loading branch information
samet-akcay authored Feb 7, 2023
1 parent d390fb5 commit 2ae2123
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 1,206 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
## [v0.4.0rc1] - 2023-02-07

### Added

- Bump up PyTorch Lightning version to v.1.9.\* (<https://github.com/openvinotoolkit/anomalib/pull/870>)
- Add ShanghaiTech Campus video anomaly detection dataset (<https://github.com/openvinotoolkit/anomalib/pull/869>)
- Add `pyupgrade` to `pre-commit` configs, and refactor based on `pyupgrade` and `refurb` (<https://github.com/openvinotoolkit/anomalib/pull/845>)
- Add [CFA](https://arxiv.org/abs/2206.04325) model implementation (<https://github.com/openvinotoolkit/anomalib/pull/783>)
Expand All @@ -30,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changed

- Bump PyTorch Lightning version to v.1.9.\* (<https://github.com/openvinotoolkit/anomalib/pull/870>)
- Make input image normalization and center cropping configurable from config (https://github.com/openvinotoolkit/anomalib/pull/822)
- Improve flexibility and configurability of subset splitting (https://github.com/openvinotoolkit/anomalib/pull/822)
- Switch to new datamodules design (https://github.com/openvinotoolkit/anomalib/pull/822)
Expand Down
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ pip install -e .

# Training

## ⚠️ Anomalib < v.0.4.0

By default [`python tools/train.py`](https://github.com/openvinotoolkit/anomalib/blob/main/tools/train.py)
runs [PADIM](https://arxiv.org/abs/2011.08785) model on `leather` category from the [MVTec AD](https://www.mvtec.com/company/research/datasets/mvtec-ad) [(CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/) dataset.

Expand Down Expand Up @@ -134,24 +132,11 @@ Tips:

The backbone can be set in the config file, two examples below.

Anomalib < v.0.4.0

```yaml
model:
name: cflow
backbone: wide_resnet50_2
pre_trained: true
Anomalib > v.0.4.0 Beta - Subject to Change
```

Anomalib >= v.0.4.0

```yaml
model:
class_path: anomalib.models.Cflow
init_args:
backbone: wide_resnet50_2
pre_trained: true
```
## Custom Dataset
Expand Down Expand Up @@ -187,26 +172,8 @@ dataset:
random_tile_count: 16
```

## ⚠️ Anomalib > v.0.4.0 Beta - Subject to Change

We introduce a new CLI approach that uses [PyTorch Lightning CLI](https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_cli.html). To train a model using the new CLI, one would call the following:

```bash
anomalib fit --config <path/to/new/config/file>
```

For instance, to train a [PatchCore](https://github.com/openvinotoolkit/anomalib/tree/main/anomalib/models/patchcore) model, the following command would be run:

```bash
anomalib fit --config ./configs/model/patchcore.yaml
```

The new CLI approach offers a lot more flexibility, details of which are explained in the [documentation](https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_cli.html).

# Inference

## ⚠️ Anomalib < v.0.4.0

Anomalib includes multiple tools, including Lightning, Gradio, and OpenVINO inferencers, for performing inference with a trained model.

The following command can be used to run PyTorch Lightning inference from the command line:
Expand Down
2 changes: 1 addition & 1 deletion anomalib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

__version__ = "0.4.0dev"
__version__ = "0.4.0rc1"
2 changes: 1 addition & 1 deletion anomalib/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def get_configurable_parameters(

# thresholding
if "metrics" in config.keys():
# NOTE: Deprecate this after v0.4.0.
# NOTE: Deprecate this once the new CLI is implemented.
if "adaptive" in config.metrics.threshold.keys():
warn(
DeprecationWarning(
Expand Down
2 changes: 1 addition & 1 deletion anomalib/models/components/feature_extractors/timm.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ class FeatureExtractor(TimmFeatureExtractor):
def __init__(self, *args, **kwargs):
logger.warning(
"FeatureExtractor is deprecated. Use TimmFeatureExtractor instead."
" Both FeatureExtractor and TimmFeatureExtractor will be removed in version 2023.1"
" Both FeatureExtractor and TimmFeatureExtractor will be removed in a future release."
)
super().__init__(*args, **kwargs)
107 changes: 0 additions & 107 deletions configs/model/cfa.yaml

This file was deleted.

113 changes: 0 additions & 113 deletions configs/model/cflow.yaml

This file was deleted.

Loading

0 comments on commit 2ae2123

Please sign in to comment.