Exemple #1
0
 def __init__(self, session_runner):
     self.__detection = AgeDetection()
     self.__detector_ip = self.__detection.get_in_pipe()
     self.__detector_op = self.__detection.get_out_pipe()
     self.__session_runner = session_runner
     self.__detection.use_session_runner(self.__session_runner)
     self.__detection.use_threading()
     self.__session_runner.start()
     self.__detection.run()
Exemple #2
0
class AgeApiRunner(object):

    def __init__(self, session_runner):
        self.__detection = AgeDetection()
        self.__detector_ip = self.__detection.get_in_pipe()
        self.__detector_op = self.__detection.get_out_pipe()
        self.__session_runner = session_runner
        self.__detection.use_session_runner(self.__session_runner)
        self.__detection.use_threading()
        self.__session_runner.start()
        self.__detection.run()

    def get_detector_ip(self):
        return self.__detector_ip
    def get_detector_op(self):
        return self.__detector_op
Exemple #3
0
from age_detection_api.age_detection.age_api import AgeDetection
from age_detection_api.age_detection.sort import Sort
from tf_session.tf_session_runner import SessionRunner
from tf_session.tf_session_utils import Inference
import numpy as np

cap = cv2.VideoCapture(-1)
# cap = cv2.VideoCapture(videos_path.get()+'/Hitman Agent 47 - car chase scene HD.mp4')

session_runner = SessionRunner()
while True:
    ret, image = cap.read()
    if ret:
        break

detection = AgeDetection()
detector_ip = detection.get_in_pipe()
detector_op = detection.get_out_pipe()
detection.use_session_runner(session_runner)
detection.use_threading()
session_runner.start()
detection.run()
tracker = Sort()

frame_no = 0


def read_video():
    # start = time.time()
    while True:
        ret, image = cap.read()