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