Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Tile Pipeline yaml configuration class_path Class Folder not supported #2409

Open
1 task done
federicocaccialanzaabb opened this issue Nov 5, 2024 · 1 comment · May be fixed by #2414
Open
1 task done

Comments

@federicocaccialanzaabb
Copy link

Describe the bug

I was trying the new tiling pipeline of the version 1.2.0 and when trying to use a custom dataset and setting class path as anomalib.data.Folder and not as mvtec I was getting an error because of category, because there is no category in Folder class Category must be passed to the yaml file if not I am getting an error here in the creation of the ensemble environment category. My quick fix was to copy the code and change category with name (which is a must in Folder class and can function as the category in the ensemble engine).

Also in the docs, in the tile pipeline the accelerator was set as gpu while for me only cuda works: probably for this here

Dataset

Other (please specify in the text field below)

Model

PADiM

Steps to reproduce the behavior

just following the how to guide with a custom dataset

OS information

Python 3.10.12
anomalib 1.2.0

Expected behavior

I think that the pipeline should be able to get both folder and mvtec as an input in class path in the yaml configuration file and work accordingly

Screenshots

No response

Pip/GitHub

pip

What version/branch did you use?

No response

Configuration YAML

seed: 42
accelerator: "gpu"  # needed to be changed to cuda
default_root_dir: "results"
tiling:
  tile_size: [256, 256]
  stride: 256

normalization_stage: image 
thresholding:
  method: F1AdaptiveThreshold 
  stage: image 

data:
  class_path: anomalib.data.MVTec # error when I changed to anomalib.data.Folder
  init_args: ...

TrainModels:
    class_path: Padim

Logs

-

Code of Conduct

  • I agree to follow this project's Code of Conduct
@blaz-r
Copy link
Contributor

blaz-r commented Nov 5, 2024

Thanks for reporting this 😄. Looking at the code, there is indeed a problem if category is not present, which is handled correctly inside the Engine but not ensemble subclass. Also thanks for the heads-up on the gpu not working, that needs to be set to cuda.
I'll fix these things asap.

@blaz-r blaz-r linked a pull request Nov 11, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants