Repository navigation
Replies: 3 comments
|
Thanks for submitting this issue! It has been added to our triage queue. A maintainer will review it shortly. |
0 replies
|
Hi @Joe-Zz421, Any reason why you are not using |
0 replies
|
Thank you @rajeshgangireddy , |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Your Question
My training code:
`from anomalib.data import MVTecAD
from anomalib.engine import Engine
from anomalib.models import Patchcore
from pathlib import Path
from anomalib.data import Folder
Initialize PatchCore model with specific parameters
model = Patchcore(
backbone="wide_resnet50_2", # Feature extraction backbone
layers=["layer2", "layer3"], # Layers to extract features from
pre_trained=True, # Use pretrained weights
coreset_sampling_ratio=0.1,
)
datamodule = Folder(
name="bottle",
root=Path("./datasets/bottle"),
normal_dir="good",
abnormal_dir='defect',
num_workers=0,
)
Initialize training engine with specific settings
engine = Engine(
max_epochs=1, # Patchcore typically needs only one epoch
accelerator="auto", # Automatically detect GPU/CPU
devices=1, # Number of devices to use
limit_val_batches=0, # Skip validation batches
)
Train the model
engine.fit(
model=model,
datamodule=datamodule,
)
`
result:
Forum Check
All reactions