|
|
|
|
@ -93,6 +93,9 @@ def upload(request):
|
|
|
|
|
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/vehicle_4class_ljp_v7.0m.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)==7):
|
|
|
|
|
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})
|
|
|
|
|
|
|
|
|
|
@ -155,6 +158,9 @@ def dlurl(request):
|
|
|
|
|
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/vehicle_4class_ljp_v7.0m.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)==7):
|
|
|
|
|
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})
|
|
|
|
|
|
|
|
|
|
|