加入外破

main
wangchunlin 3 years ago
parent 03fa20de33
commit ad3cc51f68

@ -86,6 +86,10 @@ def upload(request):
if(int(m_class)==3):
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"))
return JsonResponse({'img_name':img_path_res,'code':"【外破四类】"+RR+' <br/> '+mesg, 'flag': True})
def dlurl(request):
if request.method == 'GET':
@ -138,6 +142,9 @@ def dlurl(request):
if(int(m_class)==3):
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"))
return JsonResponse({'img_name':img_path_res,'code':"【外破四类】"+RR+' <br/> '+mesg, 'flag': True})

Loading…
Cancel
Save