From 78bdd134aa200c3bc9e313be19577bd779ae0f95 Mon Sep 17 00:00:00 2001 From: wangchunlin Date: Mon, 6 Mar 2023 17:57:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=BB=9D=E7=BC=98=E5=AD=90?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- learn/templates/home.html | 1 + learn/views.py | 6 ++++++ 2 files changed, 7 insertions(+) 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})