UPDATE Vision 更新模型

This commit is contained in:
HJW
2024-12-02 15:51:32 +08:00
parent 157e7edce5
commit e2821f7e48
9 changed files with 1228822 additions and 20 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
# @Time : 2024/9/25 11:47
# @Author : hjw
@ -23,7 +24,7 @@ class DetectionPerson:
:return: person [bool], img [ndarray]
"""
def __init__(self) -> None:
model_path = ''.join([os.getcwd(), '/Vision/model/pt/person.pt'])
model_path = ''.join([os.getcwd(), '/Vision/model/pt/person_detect.pt'])
ip = "192.168.1.65"
port = 554
name = "admin"
@ -61,10 +62,10 @@ class DetectionPerson:
# cv2.imshow('img2', img_src)
# cv2.waitKey(1)
for result in results:
if self.names[result[5]]=="person":
if self.names[result[5]] == "person":
person = True
conf = round(result[4], 2)
#print(conf)
# print(conf)
self.draw_box(img_src, result[:4], conf, self.names[result[5]], lw, sf, tf)
return person, img_src