Exemplo n.º 1
0
Arquivo: psd.py Projeto: oclis/ROS-EYE
    def __init__(self):
        super().__init__()
        self.c = img_client.ClientSocket(self)
        #self.d = MysqlController.MysqlController('223.171.42.36','mgt','aA!12345','maviz')

        #self.d = MysqlController.MysqlController('172.17.1.153','mgt','aA!12345','maviz')
        #self.d = MysqlController.MysqlController('172.17.0.161','mgt','aA!12345','maviz')
        #self.d = MysqlController.MysqlController('192.168.0.183','mgt','aA!12345','maviz')
        self.d = MysqlController.MysqlController('localhost', 'mgt',
                                                 'aA!12345', 'maviz')
        self.f = recognizer.featureMatcher()
        self.iv = QMUtil.ImageViewer()
        self.det = detect.Detector()
        self.initUI()
Exemplo n.º 2
0
            if len(res_target) > 0:
                for res_one in res_target:
                    detects.append({
                        "type": targettype,
                        "rect": [int(x) for x in res_one[:4]],
                        "accuracy": float(res_one[4]),
                    })
        detects.sort(key=lambda o: o["accuracy"], reverse=True)

    return detects


if __name__ == '__main__':
    cap = cv2.VideoCapture(0)

    detector = detect.Detector(0.5, 0.5)

    while True:
        ret, frame = cap.read()
        frame = cv2.resize(frame,
                           dsize=(416, 416),
                           interpolation=cv2.INTER_NEAREST)

        # Detect
        start = time.time()
        result = detector.detect(frame)
        print("***TIME:", time.time() - start)

        # Show Result
        res_ordered = result_ordered(result, {
            "person": 0,
Exemplo n.º 3
0
def _init_detector(args):
    d = detect.Detector(args.graph, args.labels, args.box_line_size)
    d.step = 0
    return d
Exemplo n.º 4
0
 def __init__(self, detType):
     if detType == "object":
         self.detector = detect.Detector(self.objmodel)
     else:
         print("Passing parameter error!!!")