加入泛模型

main
wangchunlin 4 years ago
parent 79e28a8cb0
commit 61e8419027

@ -22,6 +22,7 @@
<select id="model", style="width: 300px; font-size:30px;">
<option value="1">小模型</option>
<option value="2">大模型</option>
<option value="3">泛模型</option>
</select>
<select id="class", style="width: 300px; font-size:30px;">
<option value="1">火焰与烟雾</option>

@ -30,6 +30,9 @@ def upload(request):
if(int(m_model)==2): #大模型
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})
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):
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})
@ -62,6 +65,9 @@ def dlurl(request):
if(int(m_model)==2): #大模型
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})
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):
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})

@ -1 +1 @@
Subproject commit db920e09e3becdf7496b9f0a520e02b94c79cf67
Subproject commit 52ab9417e60e436fbfe93d377a5845bbae78fb51
Loading…
Cancel
Save