|
|
|
|
@ -87,7 +87,10 @@ def upload(request):
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/fire_smoke_towercrane.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)==4):
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/vehicle_4class_ljp.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/vehicle_4class_ljp_v3.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)==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})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -143,10 +146,13 @@ def dlurl(request):
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/fire_smoke_towercrane.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)==4):
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/vehicle_4class_ljp.pt"), source=img_path, project=(curPath+"/static/detected"))
|
|
|
|
|
RR = DL.run(weights=(curPath+"/yolov5/vehicle_4class_ljp_v3.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)==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})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def home(request):
|
|
|
|
|
return render(request, 'home.html')
|
|
|
|
|
return render(request, 'home.html')
|
|
|
|
|
|