From d5579756b171bf2d08e465c98197bea98439f2ce Mon Sep 17 00:00:00 2001 From: CyJaySong Date: Thu, 17 Dec 2020 10:01:21 +0800 Subject: [PATCH] Iocr ClassifierId Auto ignore when equal to 0 --- vision/ocr/param.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vision/ocr/param.go b/vision/ocr/param.go index 66d4ac6..0765df8 100644 --- a/vision/ocr/param.go +++ b/vision/ocr/param.go @@ -120,6 +120,8 @@ func TemplateSign(templateSign string) RequestParam { //自定义模板文字识别 分类器Id func ClassifierId(classifierId int) RequestParam { return func(m map[string]interface{}) { - m["classifierId"] = classifierId + if classifierId != 0 { + m["classifierId"] = classifierId + } } }