From d50a1b8ef3cefe51537300bd77119a3129adab99 Mon Sep 17 00:00:00 2001 From: wangchunlin Date: Tue, 7 Mar 2023 14:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=A4=96=E7=A0=B4m=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E5=8A=A0=E5=85=A5gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ learn/templates/home.html | 3 ++- learn/views.py | 6 ++++++ learn/yolov5 | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..28ec5b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +learn/static/ +__pycache__ diff --git a/learn/templates/home.html b/learn/templates/home.html index 7e382dc..a1024c8 100644 --- a/learn/templates/home.html +++ b/learn/templates/home.html @@ -30,7 +30,8 @@ - + +

diff --git a/learn/views.py b/learn/views.py index 38efb93..153d69f 100644 --- a/learn/views.py +++ b/learn/views.py @@ -93,6 +93,9 @@ def upload(request): 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/vehicle_4class_ljp_v7.0m.pt"), source=img_path, project=(curPath+"/static/detected")) + return JsonResponse({'img_name':img_path_res,'code':"【外破四类】"+RR+'
'+mesg, 'flag': True}) + if(int(m_class)==7): 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}) @@ -155,6 +158,9 @@ def dlurl(request): 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/vehicle_4class_ljp_v7.0m.pt"), source=img_path, project=(curPath+"/static/detected")) + return JsonResponse({'img_name':img_path_res,'code':"【外破四类】"+RR+'
'+mesg, 'flag': True}) + if(int(m_class)==7): 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}) diff --git a/learn/yolov5 b/learn/yolov5 index f6e27fa..aded494 160000 --- a/learn/yolov5 +++ b/learn/yolov5 @@ -1 +1 @@ -Subproject commit f6e27faf7e565f7ec35617f51e0154f88ce6e32f +Subproject commit aded49418b7c23dc1dcf7e62fcdaeef7f3feea5b