Example #1
0
 def do_face_detect(self, test_data):
     video_path = os.path.join(face_detect_data_dir, test_data.video_file)
     face_detect = FaceDetect(verbose=test_data.verbose)
     task = face_detect.apply(video_file=video_path, max_frames=test_data.max_frames)
     return task
Example #2
0
from videoai import FaceDetect
import os

alarm_verification_data_dir = os.path.join('..', 'test-data',
                                           'AlarmVerification')

face_detect = FaceDetect()

video_file = os.path.join(alarm_verification_data_dir, 'officeEntry.mp4')
task = face_detect.apply(video_file)
print task
print 'Video {}'.format(video_file)

# OK we can download the video which contains the OSD
face_detect.download_file(task['results_video'])
Example #3
0
 def do_face_detect(self, test_data):
     video_path = os.path.join(face_detect_data_dir, test_data.video_file)
     face_detect = FaceDetect(host=host, verbose=test_data.verbose)
     task = face_detect.apply(video_file=video_path, max_frames=test_data.max_frames)
     return task
Example #4
0
parser.set_defaults(download=True)
args = parser.parse_args()

if args.kamcheck:
    print "performing kamcheck"
    kamcheck = KamCheck(verbose=args.verbose)
    task = kamcheck.apply(image_file=args.image, video_file=args.video)

if args.alarm_verification:
    print "performing alarm verification"
    alarm_verification = AlarmVerification(key_file=args.key_file, verbose=args.verbose)
    task = alarm_verification.apply(video_file=args.video, download=args.download)

if args.face_detect:
    print "performing face detection"
    face_detect = FaceDetect(verbose=args.verbose)
    task = face_detect.apply(video_file=args.video,
                             download=args.download,
                             blur=args.blur,
                             start_frame=args.start_frame,
                             max_frames=args.max_frames,
                             min_size=args.min_size)

if args.face_detect_image:
    print "performing face detection on image"
    face_detect_image = FaceDetectImage(verbose=args.verbose)
    task = face_detect_image.apply(image_file=args.image,
                                   download=args.download,
                                   blur=args.blur,
                                   min_size=args.min_size)