From 9fd7697c804be94ca4d925f1691130c63df73962 Mon Sep 17 00:00:00 2001 From: dokutan <54861821+dokutan@users.noreply.github.com> Date: Tue, 28 Jun 2022 18:44:49 +0200 Subject: [PATCH] Print skipped files --- autotagger/autotagger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autotagger/autotagger.py b/autotagger/autotagger.py index c2384ba..76edc29 100644 --- a/autotagger/autotagger.py +++ b/autotagger/autotagger.py @@ -1,6 +1,7 @@ from fastbook import * from pandas import DataFrame, read_csv import timm +import sys class Autotagger: def __init__(self, model_path="models/model.pth", data_path="test/tags.csv.gz", tags_path="data/tags.json"): @@ -32,6 +33,7 @@ class Autotagger: try: return PILImage.create(file) except: + print("skipped file " + file.name, file=sys.stderr) return None images = list(filter(lambda i: i != None, [create_image(file) for file in files])) dl = self.learn.dls.test_dl(images, bs=bs)