using anomalib for training my own dataset #2671
Unanswered
yousra1672
asked this question in
Q&A
Replies: 1 comment 8 replies
-
Hello, You can use Folder datamodule: from anomalib.data import Folder
custom_datamodule = Folder(
name="custom_folder",
root="./datasets/custom",
normal_dir="good",
abnormal_dir="defect"
) After this you can follow the default example for training: from anomalib.models import Patchcore
from anomalib.engine import Engine
# Initialize components
model = Patchcore()
engine = Engine()
# Train the model
engine.fit(datamodule=custom_datamodule, model=model) |
Beta Was this translation helpful? Give feedback.
8 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.
-
Hi everyone, I want to train a model that can classify and detect defects in a product. I’m using Google Colab and created my dataset following the MVTec dataset structure. If anyone has done something similar, could you please show me how to train the model?
Beta Was this translation helpful? Give feedback.
All reactions