def runOnVideo(self, worker, inputData):
    self.worker = self.workers.get(worker)
    self.worker.buildModel()
    cap = cv2.VideoCapture(inputData)
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    path = ((definitions.ROOT_DIR + '/outputs/tiny_yolo/') + opencv_utilities.getFileNameFromPath(inputData))
    out = cv2.VideoWriter(path, fourcc, 20.0, (854, 356))
    while cap.isOpened():
        (ret, frame) = cap.read()
        self.getGender(frame)
        cv2.imshow('V', frame)
        if ((cv2.waitKey(1) & 255) == ord('q')):
            break
    cap.release()
    cv2.destroyAllWindows()
def runOnVideo(self, worker, inputData):
    self.worker = self.workers.get(worker)
    self.worker.buildModel()
    cap = cv2.VideoCapture(inputData)
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    path = ((definitions.ROOT_DIR + '/outputs/tiny_yolo/') + opencv_utilities.getFileNameFromPath(inputData))
    out = cv2.VideoWriter(path, fourcc, 20.0, (854, 356))
    while cap.isOpened():
        (ret, frame) = cap.read()
        self.getGender(frame)
        cv2.imshow('V', frame)
        if ((cv2.waitKey(1) & 255) == ord('q')):
            break
    cap.release()
    cv2.destroyAllWindows()