Skip to content

Commit 905e586

Browse files
authored
fix: no calibration datasets bug (#277)
1 parent 89716d3 commit 905e586

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/export.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ def export_tflite(onnx_path: str, img_shape, img_path):
361361

362362
def representative_dataset():
363363
datasets = [
364-
osp.join(img_path, i) for i in os.listdir(img_path) if i.endswith(".jpg")
364+
osp.join(img_path, i)
365+
for i in os.listdir(img_path)
366+
if i.lower().endswith((".jpg", ".jpeg", ".png"))
365367
]
366368
for ps in tqdm(datasets[:300]):
367369
img = cv2.imread(ps)

0 commit comments

Comments
 (0)