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

Ignore hidden directories when creating Folder dataset #1268

Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
501484c
Fix metadata path
samet-akcay Mar 10, 2023
15ad7e9
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Mar 20, 2023
a6bc69f
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Mar 22, 2023
7b53b78
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Mar 24, 2023
af2022f
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Mar 28, 2023
e4aadca
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Mar 31, 2023
c61472e
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Apr 4, 2023
1e708ba
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Apr 14, 2023
8a3cce7
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Apr 17, 2023
dca5744
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay May 5, 2023
68b7401
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay May 9, 2023
046d72d
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay May 12, 2023
3c4def3
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay May 12, 2023
545f08b
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay May 25, 2023
904e5e7
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 2, 2023
8aec0e2
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 4, 2023
c065af2
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 6, 2023
1efc3aa
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 7, 2023
7ea6f15
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 15, 2023
4931934
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 15, 2023
9ff0f73
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 26, 2023
fd5b138
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jun 30, 2023
5e22f99
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jul 5, 2023
a555eaf
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jul 7, 2023
70889d1
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jul 7, 2023
5ca8f5e
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Jul 21, 2023
ee42158
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Aug 4, 2023
8efd566
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Aug 7, 2023
6d86c68
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Aug 9, 2023
bca0325
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Aug 10, 2023
aba663d
Merge branch 'main' of github.com:openvinotoolkit/anomalib
samet-akcay Aug 14, 2023
0b6a39d
Ignore hidden directories in folder dataset
samet-akcay Aug 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/anomalib/data/utils/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def _prepare_files_labels(
if isinstance(extensions, str):
extensions = (extensions,)

filenames = [f for f in path.glob(r"**/*") if f.suffix in extensions and not f.is_dir()]
filenames = [
f
for f in path.glob("**/*")
if f.suffix in extensions and not f.is_dir() and not any(part.startswith(".") for part in f.parts)
]
if not filenames:
raise RuntimeError(f"Found 0 {path_type} images in {path}")

Expand Down