Skip to content

MVTecAD URL Deprecated? #3167

@mxrdck

Description

@mxrdck

Describe the bug

I tried running the following Code:
`# 1. Import required modules
from anomalib.data import MVTecAD
from anomalib.deploy import ExportType
from anomalib.engine import Engine
from anomalib.models import Patchcore

2. Create a dataset

MVTecAD is a popular dataset for anomaly detection

datamodule = MVTecAD(
root="./datasets/MVTecAD", # Path to download/store the dataset
category="bottle", # MVTec category to use
train_batch_size=32, # Number of images per training batch
eval_batch_size=32, # Number of images per validation/test batch
)

3. Initialize the model

Patchcore is a good choice for beginners

model = Patchcore(
num_neighbors=6, # Override default model settings
)

4. Create the training engine

engine = Engine(
max_epochs=1, # Override default trainer settings
)

5. Train the model

This produces a lightning model (.ckpt)

engine.fit(datamodule=datamodule, model=model)

6. Test the model performance

test_results = engine.test(datamodule=datamodule, model=model)

7. Export the model

Different formats are available: Torch, OpenVINO, ONNX

engine.export(
model=model,
export_type=ExportType.OPENVINO,
)`

Which fails because the Dataset cannot be downloaded. This gives an HTTP 404 Error. Opening the URL in the MVTecAD class
DOWNLOAD_INFO = DownloadInfo( name="mvtecad", url="https://www.mydrive.ch/shares/38536/3830184030e49fe74747669442f0f282/" ...

Shows that the data is no longer available here. Has the dataset been moved?

Dataset

MVTecAD

Model

PatchCore

Steps to reproduce the behavior

  1. Install Anomalib using pip install anomalib (Python 3.12)
  2. Run the Code Snippet from the anomalib documentation "Anomalib in 15 Minutes" in the Training section

`# 1. Import required modules
from anomalib.data import MVTecAD
from anomalib.deploy import ExportType
from anomalib.engine import Engine
from anomalib.models import Patchcore

2. Create a dataset

MVTecAD is a popular dataset for anomaly detection

datamodule = MVTecAD(
root="./datasets/MVTecAD", # Path to download/store the dataset
category="bottle", # MVTec category to use
train_batch_size=32, # Number of images per training batch
eval_batch_size=32, # Number of images per validation/test batch
)

3. Initialize the model

Patchcore is a good choice for beginners

model = Patchcore(
num_neighbors=6, # Override default model settings
)

4. Create the training engine

engine = Engine(
max_epochs=1, # Override default trainer settings
)

5. Train the model

This produces a lightning model (.ckpt)

engine.fit(datamodule=datamodule, model=model)

6. Test the model performance

test_results = engine.test(datamodule=datamodule, model=model)

7. Export the model

Different formats are available: Torch, OpenVINO, ONNX

engine.export(
model=model,
export_type=ExportType.OPENVINO,
)`

OS information

Windows 11
Python 3.12
anomalib 2.2.0

Expected behavior

Expected is to load the dataset successfully i guess.

Screenshots

No response

Pip/GitHub

pip

What version/branch did you use?

2.2.0

Configuration YAML

-

Logs

-

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions