This commit is contained in:
2025-09-02 23:06:36 +08:00
parent 2a59bdcffc
commit 062ee6c70d
4 changed files with 47 additions and 22 deletions

View File

@ -99,7 +99,7 @@ class OCRViolationDetector:
"""初始化RapidOCR引擎"""
self.logger.info("正在初始化RapidOCR引擎...")
config_path = r"../ocr/config/1.yaml"
config_path = r"D:\Git\bin\video\ocr\config\1.yaml"
try:
# 检查配置文件是否存在
if not os.path.exists(config_path):
@ -157,4 +157,3 @@ class OCRViolationDetector:
# 返回检测结果(是否有违禁词、所有违禁词列表、对应置信度列表)
return len(all_prohibited) > 0, all_prohibited, all_confidences