This commit is contained in:
wudong 2022-11-08 14:34:17 +08:00
commit 012b878e5e
2 changed files with 7 additions and 10 deletions

View File

@ -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}

View File

@ -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")