From 171a8a3161c13ff4747a39286b175db3de3a1d62 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Tue, 7 Jul 2026 22:56:36 +0200 Subject: [PATCH] move TF+Keras dependencies to `training` extra, replace by ONNX+TRT --- requirements.txt | 4 ++-- train/requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5bfb3b9..a707407 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # ocrd includes opencv, numpy, shapely, click ocrd >= 3.3.0 +onnxruntime-gpu[cuda,cudnn] # w/ .onnx models +tensorrt_cu12 < 11 # 11 incompatible with CUDA libs from onnxruntime-gpu[cuda,cudnn] scikit-learn >= 0.23.2 -tensorflow -tf-keras # avoid keras 3 (also needs TF_USE_LEGACY_KERAS=1) scikit-image tabulate diff --git a/train/requirements.txt b/train/requirements.txt index 090bc50..1734b67 100644 --- a/train/requirements.txt +++ b/train/requirements.txt @@ -6,5 +6,6 @@ imutils scipy tensorflow-addons # for connected_components, depublished and only compatible with tensorflow < 2.16 tensorflow < 2.16 # for tensorflow-addons, so only needed in training -tf_data < 2.16 # for tensorflow-addons, so only needed in training +tf-keras # avoid keras 3 (also needs TF_USE_LEGACY_KERAS=1) +tf-data < 2.16 # for tensorflow-addons, so only needed in training protobuf < 5 # for tensorflow-addons, so only needed in training