From 09257ac1f17935322eb7fd09a1b8755f00efb3a5 Mon Sep 17 00:00:00 2001
From: wangchunlin
Date: Mon, 6 Mar 2023 11:28:29 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E7=A0=B4yolov5=20ljp=E5=AE=8C?=
=?UTF-8?q?=E7=BB=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
learn/templates/home.html | 5 +++--
learn/views.py | 12 +++++++++---
learn/yolov5 | 2 +-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/learn/templates/home.html b/learn/templates/home.html
index 7307648..dd097f8 100644
--- a/learn/templates/home.html
+++ b/learn/templates/home.html
@@ -24,11 +24,12 @@
-
diff --git a/learn/views.py b/learn/views.py
index 833e24a..33560dd 100644
--- a/learn/views.py
+++ b/learn/views.py
@@ -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+'
'+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+'
'+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+'
'+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+'
'+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+'
'+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+'
'+mesg, 'flag': True})
def home(request):
- return render(request, 'home.html')
\ No newline at end of file
+ return render(request, 'home.html')
diff --git a/learn/yolov5 b/learn/yolov5
index 526fcb2..f6e27fa 160000
--- a/learn/yolov5
+++ b/learn/yolov5
@@ -1 +1 @@
-Subproject commit 526fcb2194eb30261f91e04115a671f9807dcf4e
+Subproject commit f6e27faf7e565f7ec35617f51e0154f88ce6e32f