From 4d02e4415291686d94ca08cc03975e6682f9c97a Mon Sep 17 00:00:00 2001 From: Ashwin Vaidya Date: Wed, 1 Jun 2022 09:36:21 +0200 Subject: [PATCH] Minor fix: Update folder dataset + notebooks link (#338) * Update folder dataset + notebooks link * update readme * Upgrade wandb version Co-authored-by: Samet Akcay --- README.md | 17 +++++++++++++---- anomalib/data/__init__.py | 2 +- requirements/base.txt | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 94e1d53957..1a255f7b4a 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,13 @@ ___ To get an overview of all the devices where `anomalib` as been tested thoroughly, look at the [Supported Hardware](https://openvinotoolkit.github.io/anomalib/#supported-hardware) section in the documentation. +### Jupyter Notebooks + +For getting started with a Jupyter Notebook, please refer to the [Notebooks](./notebooks) folder of this repository. Additionally, you can refer to a few created by the community: + +- [Google Colab](https://colab.research.google.com/drive/1K4a4z2iZGBNhWdmt9Aqdld7kTAxBfAmi?usp=sharing) by @bth5 +- [Kaggle](https://www.kaggle.com/code/ipythonx/mvtec-ad-anomaly-detection-with-anomalib-library) by @innat + ### PyPI Install You can get started with `anomalib` by just using pip. @@ -110,18 +117,20 @@ dataset: name: format: folder path: - normal: normal # name of the folder containing normal images. - abnormal: abnormal # name of the folder containing abnormal images. + normal_dir: normal # name of the folder containing normal images. + abnormal_dir: abnormal # name of the folder containing abnormal images. + normal_test_dir: null # name of the folder containing normal test images. task: segmentation # classification or segmentation mask: #optional extensions: null split_ratio: 0.2 # ratio of the normal images that will be used to create a test split - seed: 0 image_size: 256 train_batch_size: 32 test_batch_size: 32 num_workers: 8 - transform_config: null + transform_config: + train: null + val: null create_validation_set: true tiling: apply: false diff --git a/anomalib/data/__init__.py b/anomalib/data/__init__.py index 9ab65b72ee..925ab57f38 100644 --- a/anomalib/data/__init__.py +++ b/anomalib/data/__init__.py @@ -76,7 +76,7 @@ def get_datamodule(config: Union[DictConfig, ListConfig]) -> LightningDataModule mask_dir=config.dataset.mask, extensions=config.dataset.extensions, split_ratio=config.dataset.split_ratio, - seed=config.dataset.seed, + seed=config.project.seed, image_size=(config.dataset.image_size[0], config.dataset.image_size[1]), train_batch_size=config.dataset.train_batch_size, test_batch_size=config.dataset.test_batch_size, diff --git a/requirements/base.txt b/requirements/base.txt index 3d6e4a663d..b976dd6ac8 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -5,7 +5,7 @@ omegaconf>=2.1.1 opencv-python>=4.5.3.56 pandas>=1.1.0 pytorch-lightning>=1.6.0 -torchmetrics>=0.8.0 +torchmetrics==0.8.0 torchvision>=0.9.1 torchtext>=0.9.1 wandb==0.12.17