From 8c82eebf29e251fec9e38f6b72af6762726287fb Mon Sep 17 00:00:00 2001 From: "552068321@qq.com" Date: Tue, 8 Nov 2022 14:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/AlgorithmController.py | 9 +++------ app/yolov5/detect_server.py | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app/controller/AlgorithmController.py b/app/controller/AlgorithmController.py index 25897d7..7e54e85 100644 --- a/app/controller/AlgorithmController.py +++ b/app/controller/AlgorithmController.py @@ -102,8 +102,8 @@ def start_download_pt(): @bp.route('/start_download_pt', methods=['get']) def wrapped_function_start_download_pt(): param = request.args.get('param') - func(param) - return output_wrapped(0, 'success', '成功') + data = func(param) + return output_wrapped(0, 'success', data) return wrapped_function_start_download_pt @@ -309,9 +309,6 @@ def Export_model_RODY(params_str): zipf.write(file, arcname=Path(file).name) # 将torchscript和onnx模型压缩 return exp_outputPath - zipf.write(modellist[1], arcname=modellist[1]) - zip_inputpath = os.path.join(exp_outputPath, "inference_model") - zip_outputPath = os.path.join(exp_outputPath, "inference_model.zip") @obtain_train_param() @@ -397,7 +394,7 @@ def returnDownloadParams(): params_list = [ {"index": 0, "name": "exp_inputPath", "value": 'E:/alg_demo-master/alg_demo/app/yolov5/圆孔_123_RODY_1_640.pt', "description": '转化模型输入路径', - "default": '/mnt/sdc/IntelligentizeAI/IntelligentizeAI/data_set/weights/new磁环检测test_183504733393264640_R-DDM_11.pt/', + "default": 'E:/alg_demo-master/alg_demo/app/yolov5/圆孔_123_RODY_1_640.pt/', "type": "S", 'show': False}, {"index": 1, "name": "device", "value": 'gpu', "description": 'CPU或GPU', "default": 'gpu', "type": "S", 'show': False} diff --git a/app/yolov5/detect_server.py b/app/yolov5/detect_server.py index 16b03ec..3d14e40 100644 --- a/app/yolov5/detect_server.py +++ b/app/yolov5/detect_server.py @@ -224,10 +224,10 @@ def run(id, # 原始图像路径/结果图像路径 传参 #online_img_tools.get_res_img(res_path=save_path, img_path=path, proj_no=pro) - print('数量:',count) - print('总量:',len(os.listdir(source))) - print('path:',path) - print('path:', str(save_path)) + # print('数量:',count) + # print('总量:',len(os.listdir(source))) + # print('path:',path) + # print('path:', str(save_path)) report_cellback(count,len(os.listdir(source)),path,str(save_path)) # Print time (inference-only) LOGGER.info(f"{s}{'' if len(det) else '(no detections), '}{dt[1].dt * 1E3:.1f}ms")