diff --git a/app/service/project_detect_service.py b/app/service/project_detect_service.py index 095fccf..a650a74 100644 --- a/app/service/project_detect_service.py +++ b/app/service/project_detect_service.py @@ -178,6 +178,7 @@ async def run_detect_img(weights: str, source: str, project: str, name: str, log stderr=subprocess.STDOUT, # 这里可以显示yolov5训练过程中出现的进度条等信息 text=True, # 缓存内容为文本,避免后续编码显示问题 encoding='utf-8', + errors='ignore' ) as process: while process.poll() is None: line = process.stdout.readline() diff --git a/app/service/project_train_service.py b/app/service/project_train_service.py index 405cf74..efd0611 100644 --- a/app/service/project_train_service.py +++ b/app/service/project_train_service.py @@ -218,6 +218,7 @@ async def run_commend(data: str, project: str, name: str, epochs: int, patience: stderr=subprocess.STDOUT, # 这里可以显示yolov5训练过程中出现的进度条等信息 text=True, # 缓存内容为文本,避免后续编码显示问题 encoding='utf-8', + errors='ignore' ) as process: while process.poll() is None: line = process.stdout.readline() diff --git a/requirements_gpu.txt b/requirements_gpu.txt index fbd11a3..a779af3 100644 --- a/requirements_gpu.txt +++ b/requirements_gpu.txt @@ -21,7 +21,6 @@ requests-toolbelt==1.0.0 python-socketio == 5.12.1 setuptools==75.8.0 - # YOLOV5 ---------------------------------------------------------------------- gitpython>=3.1.30 matplotlib==3.7.0