1 Star 0 Fork 2

明哥/openV2X-hippocampus

forked from OpenV2X/hippocampus 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
BaseDetector.py 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
sunruixue 提交于 2023-06-20 14:45 . feat: dynamically adjusted resolution
import cv2
from tracker import update_tracker
class baseDet(object):
def __init__(self):
self.img_size = 640
self.threshold = 0.3
self.stride = 1
def build_config(self):
self.faceTracker = {}
self.faceClasses = {}
self.faceLocation1 = {}
self.faceLocation2 = {}
self.frameCounter = 0
self.currentCarID = 0
self.recorded = []
self.font = cv2.FONT_HERSHEY_SIMPLEX
def feedCap(self, im):
retDict = {"frame": None, "faces": None, "list_of_ids": None, "face_bboxes": []}
self.frameCounter += 1
im, faces, face_bboxes, bboxes2draw = update_tracker(self, im)
retDict["frame"] = im
retDict["faces"] = faces
retDict["face_bboxes"] = face_bboxes
retDict["bboxes2draw"] = bboxes2draw
return retDict
def init_model(self):
raise EOFError("Undefined model type.")
def preprocess(self):
raise EOFError("Undefined model type.")
def detect(self):
raise EOFError("Undefined model type.")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mingge8886/hippocampus.git
git@gitee.com:mingge8886/hippocampus.git
mingge8886
hippocampus
openV2X-hippocampus
master

搜索帮助