From 03fa20de3311dc4834058be1b4a7856aa8d5d500 Mon Sep 17 00:00:00 2001
From: wangchunlin
Date: Wed, 8 Jun 2022 15:54:30 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=A1=94=E5=90=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ImageDetect/ImageDetectConfig.h | 3 +++
learn/templates/home.html | 3 ++-
learn/views.py | 6 ++++++
learn/yolov5 | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ImageDetect/ImageDetectConfig.h b/ImageDetect/ImageDetectConfig.h
index e69de29..5cf4174 100644
--- a/ImageDetect/ImageDetectConfig.h
+++ b/ImageDetect/ImageDetectConfig.h
@@ -0,0 +1,3 @@
+// the configured options and settings for ImageDetect
+#define ImageDetect_VERSION_MAJOR 6
+#define ImageDetect_VERSION_MINOR 0
diff --git a/learn/templates/home.html b/learn/templates/home.html
index a1f24f3..1bfe530 100644
--- a/learn/templates/home.html
+++ b/learn/templates/home.html
@@ -27,7 +27,8 @@
diff --git a/learn/views.py b/learn/views.py
index c26a1f1..e11655b 100644
--- a/learn/views.py
+++ b/learn/views.py
@@ -83,6 +83,9 @@ def upload(request):
if(int(m_class)==2):
RR = DL.run(weights=(curPath+"/yolov5/yolov5s.pt"), source=img_path, project=(curPath+"/static/detected"))
return JsonResponse({'img_name':img_path_res,'code':"【一般物体检测】"+RR+'
'+mesg, 'flag': True})
+ 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+'
'+mesg, 'flag': True})
def dlurl(request):
if request.method == 'GET':
@@ -132,6 +135,9 @@ def dlurl(request):
if(int(m_class)==2):
RR = DL.run(weights=(curPath+"/yolov5/yolov5s.pt"), source=img_path, project=(curPath+"/static/detected"))
return JsonResponse({'img_name':img_path_res,'code':"【一般物体检测】"+RR+'
'+mesg, 'flag': True})
+ 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+'
'+mesg, 'flag': True})
diff --git a/learn/yolov5 b/learn/yolov5
index 52ab941..dd0e074 160000
--- a/learn/yolov5
+++ b/learn/yolov5
@@ -1 +1 @@
-Subproject commit 52ab9417e60e436fbfe93d377a5845bbae78fb51
+Subproject commit dd0e0749fb8110bc202dfb7e9a77babec6a7097b