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