diff --git a/learn/templates/home.html b/learn/templates/home.html index dd097f8..7e382dc 100644 --- a/learn/templates/home.html +++ b/learn/templates/home.html @@ -30,6 +30,7 @@ +

diff --git a/learn/views.py b/learn/views.py index 33560dd..38efb93 100644 --- a/learn/views.py +++ b/learn/views.py @@ -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+'
'+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+'
'+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+'
'+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+'
'+mesg, 'flag': True})