加入绝缘子缺陷检测

main
wangchunlin 3 years ago
parent 09257ac1f1
commit 78bdd134aa

@ -30,6 +30,7 @@
<option value="3">烟火与塔吊</option>
<option value="4">外破ljp4500张四类v5v3</option>
<option value="5">外破ljp4500张四类v5v7</option>
<option value="6">绝缘子缺陷ljp2000张两类v5v7</option>
</select>
</h1>
</p>

@ -92,6 +92,9 @@ def upload(request):
if(int(m_class)==5):
RR = DL.run(weights=(curPath+"/yolov5/vehicle_4class_ljp_v7.0.pt"), source=img_path, project=(curPath+"/static/detected"))
return JsonResponse({'img_name':img_path_res,'code':"【外破四类】"+RR+' <br/> '+mesg, 'flag': True})
if(int(m_class)==6):
RR = DL.run(weights=(curPath+"/yolov5/birdpecked_unnormal_version1.pt"), source=img_path, project=(curPath+"/static/detected"))
return JsonResponse({'img_name':img_path_res,'code':"【绝缘子两类】"+RR+' <br/> '+mesg, 'flag': True})
def dlurl(request):
@ -151,6 +154,9 @@ def dlurl(request):
if(int(m_class)==5):
RR = DL.run(weights=(curPath+"/yolov5/vehicle_4class_ljp_v7.0.pt"), source=img_path, project=(curPath+"/static/detected"))
return JsonResponse({'img_name':img_path_res,'code':"【外破四类】"+RR+' <br/> '+mesg, 'flag': True})
if(int(m_class)==6):
RR = DL.run(weights=(curPath+"/yolov5/birdpecked_unnormal_version1.pt"), source=img_path, project=(curPath+"/static/detected"))
return JsonResponse({'img_name':img_path_res,'code':"【绝缘子两类】"+RR+' <br/> '+mesg, 'flag': True})

Loading…
Cancel
Save