From 491b4089ec508b81a419e3b48275fd773920c596 Mon Sep 17 00:00:00 2001 From: YaoFANGUK Date: Wed, 27 Dec 2023 20:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/config.py | 4 ++-- backend/main.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/config.py b/backend/config.py index c769e69..53396c0 100644 --- a/backend/config.py +++ b/backend/config.py @@ -20,8 +20,8 @@ DET_MODEL_BASE = os.path.join(BASE_DIR, 'models') DET_MODEL_PATH = os.path.join(DET_MODEL_BASE, MODEL_VERSION, 'ch_det') # ×××××××××××××××××××× [可以改] start ×××××××××××××××××××× -# 是否使用全局mask -SKIP_DETECTION = False +# 是否使用跳过检测 +SKIP_DETECTION = True # 单个字符的高度大于宽度阈值 HEIGHT_WIDTH_DIFFERENCE_THRESHOLD = 10 # 容忍的像素点偏差 diff --git a/backend/main.py b/backend/main.py index b0144fe..4e6635c 100644 --- a/backend/main.py +++ b/backend/main.py @@ -859,8 +859,10 @@ class SubtitleRemover: if __name__ == '__main__': multiprocessing.set_start_method("spawn") - # 提示用户输入视频路径 + # 1. 提示用户输入视频路径 video_path = input(f"Please input video file path: ").strip() - # 新建字幕提取对象 - sd = SubtitleRemover(video_path) + # 2. 按以下顺序传入字幕区域 + # sub_area = (ymin, ymax, xmin, xmax) + # 3. 新建字幕提取对象 + sd = SubtitleRemover(video_path, sub_area=None) sd.run()