|
|
|
@ -30,6 +30,9 @@ def upload(request):
|
|
|
|
if(int(m_model)==2): #大模型
|
|
|
|
if(int(m_model)==2): #大模型
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/v6m6.pt"), source=img_path, imgsz=(1280, 1280), project=(curPath+"/static/detected"))
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/v6m6.pt"), source=img_path, imgsz=(1280, 1280), project=(curPath+"/static/detected"))
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【烟火 大模型】"+RR, 'flag': True})
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【烟火 大模型】"+RR, 'flag': True})
|
|
|
|
|
|
|
|
if(int(m_model)==3): #泛模型
|
|
|
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/best.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【烟火 泛模型】"+RR, 'flag': True})
|
|
|
|
if(int(m_class)==2):
|
|
|
|
if(int(m_class)==2):
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/yolov5s.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/yolov5s.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【一般物体检测】"+RR, 'flag': True})
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【一般物体检测】"+RR, 'flag': True})
|
|
|
|
@ -62,6 +65,9 @@ def dlurl(request):
|
|
|
|
if(int(m_model)==2): #大模型
|
|
|
|
if(int(m_model)==2): #大模型
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/v6m6.pt"), source=img_path, imgsz=(1280, 1280), project=(curPath+"/static/detected"))
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/v6m6.pt"), source=img_path, imgsz=(1280, 1280), project=(curPath+"/static/detected"))
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【烟火 大模型】"+RR, 'flag': True})
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【烟火 大模型】"+RR, 'flag': True})
|
|
|
|
|
|
|
|
if(int(m_model)==3): #泛模型
|
|
|
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/best.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【烟火 泛模型】"+RR, 'flag': True})
|
|
|
|
if(int(m_class)==2):
|
|
|
|
if(int(m_class)==2):
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/yolov5s.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/yolov5s.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【一般物体检测】"+RR, 'flag': True})
|
|
|
|
return JsonResponse({'img_name':img_path_res,'code':"【一般物体检测】"+RR, 'flag': True})
|
|
|
|
|