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

Training a model with only normal data, gettting "RuntimeError: Found 0 abnormal images" #691

Closed
toon-vc opened this issue Nov 7, 2022 · 1 comment

Comments

@toon-vc
Copy link

toon-vc commented Nov 7, 2022

Describe the bug

When training a model with only normal images, getting "RuntimeError: Found 0 abnormal images "

image

The problem can be fixed by removing the abnormal dir in make_dataset in the folder module:
dirs = {"normal": normal_dir}
instead of
dirs = {"normal": normal_dir, "abnormal": abnormal_dir}

If I do this, training finishes successfully and I get a good model.

Should the abnormal_dir be made Optional, and the abnormal_dir left out of dirs when it is not specified? Or can this be due to issues in config/setup?

To Reproduce

Train a PatchCore model without any abnormal images.

Expected behavior

A successful training run.

Hardware and Software Configuration

  • OS: Ubuntu
  • anomalib: 0.3.7
@samet-akcay
Copy link
Contributor

Duplicate of #277.

@toon-vc, this is something we are currently working on. It will be available here once we merge this feature branch to main.

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

No branches or pull requests

2 participants