Skip to content

Commit 74001a2

Browse files
author
Alejandro Monroy Muñoz
committed
exclude grid images from fid computation
1 parent f762d9f commit 74001a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

utils/evaluation_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ def read_samples(path):
1414

1515
tensor_list = []
1616
for p in Path(path).rglob("*.png"):
17-
img = Image.open(p).convert("RGB")
18-
tensor_list.append(transform(img))
17+
if "grid" not in str(p).split("/")[-1]:
18+
img = Image.open(p).convert("RGB")
19+
tensor_list.append(transform(img))
1920

2021
stacked_tensor = torch.stack(tensor_list, dim=0)
2122
print(f"Read {len(stacked_tensor)} images")

0 commit comments

Comments
 (0)