Improve ANSCV

This commit is contained in:
2026-04-21 09:26:02 +10:00
parent 9f0a10a4c8
commit 7e772f76bc
15 changed files with 749 additions and 421 deletions

View File

@@ -28,8 +28,11 @@ bool RTOCRRecognizer::Initialize(const std::string& onnxPath, const std::string&
ANSCENTER::Options options;
options.deviceIndex = gpuId;
options.precision = ANSCENTER::Precision::FP16;
options.maxBatchSize = 1;
options.optBatchSize = 1;
// maxBatch=4 matches FaceRecognizer / ALPR configuration — allows the
// recognizer to process up to 4 detected text lines in one call,
// amortizing per-invocation overhead while keeping TRT workspace small.
options.maxBatchSize = 4;
options.optBatchSize = 4;
// Fixed height, dynamic width for recognition
options.minInputHeight = imgH_;