Closed yxl23 closed 2 months ago
What do you image masks look like? How do the output images look like? If you cant show them: are you sure the groundtruth masks are correct?
My mask is correct, but it is very small because my industrial defects are very small
My mask is correct, but it is very small because my industrial defects are very small
The same case with me. Even we can't fine-tune or train the model more than 1 epoch. Do you know if there is any solution?
My mask is correct, but it is very small because my industrial defects are very small
The same case with me. Even we can't fine-tune or train the model more than 1 epoch. Do you know if there is any solution?
@krupeshp, if you are using Padim
model you should not train the model more than 1 epoch. The model does not need any training or fine-tuning, it just needs 1 epoch to go over the dataset and extract the features.
I am closing this as I wouldn't categorize this as a bug. The issue seems very specific to the dataset. The Padim model passes the internal regression tests, and from the logs it looks like only the pixel-level performance is poor. It might be related to the dataset. If it is still an issue, we can continue in the discussions page. Also, a few examples of the dataset will help inform those discussions.
Describe the bug
Dataset
N/A
Model
N/A
Steps to reproduce the behavior
from typing import Any
import numpy as np from matplotlib import pyplot as plt from PIL import Image from torchvision.transforms import ToPILImage
from anomalib import TaskType from anomalib.data import Folder from anomalib.data.utils import read_image from anomalib.deploy import OpenVINOInferencer, ExportType from anomalib.engine import Engine from anomalib.models import Padim
if name == 'main': datamodule = Folder(num_workers=8, name='shuju', root='shuju', mask_dir='mask/ng', normal_dir='good', abnormal_dir='ng', task=TaskType.SEGMENTATION, image_size=[640, 640]) datamodule.prepare_data() # Downloads the dataset if it's not in the specified
root
directory datamodule.setup() # Create train/val/test/prediction sets. i, data = next(enumerate(datamodule.val_dataloader())) print(data.keys()) print(data["image"].shape, data["mask"].shape)OS information
OS information:
Expected behavior
no have
Screenshots
No response
Pip/GitHub
pip
What version/branch did you use?
Latest version
Configuration YAML
Logs
Code of Conduct