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