Example #1
0
 def do_alarm_verification(self, video_file):
     video_path = os.path.join(alarm_verification_data_dir, video_file)
     alarm_verification = AlarmVerification()
     task = alarm_verification.apply(video_file=video_path)
     print task
     return task
Example #2
0
 def do_alarm_verification(self, video_file):
     video_path = os.path.join(alarm_verification_data_dir, video_file)
     alarm_verification = AlarmVerification(host=host, verbose=True)
     task = alarm_verification.apply(video_file=video_path)
     print task
     return task
Example #3
0
from videoai import AlarmVerification
import os

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

alarm_verification = AlarmVerification()

video_file = os.path.join(alarm_verification_data_dir, 'officeEntry.mp4')
task = alarm_verification.apply(video_file)
print 'Video {}, probability of alarm {}%'.format(video_file, task['probability'])

# OK we can download the video which contains the OSD
alarm_verification.download_file(task['results_video'], 'somevideo.avi')
Example #4
0
from videoai import AlarmVerification
import os

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

alarm_verification = AlarmVerification()

video_file = os.path.join(alarm_verification_data_dir, 'officeEntry.mp4')
task = alarm_verification.apply(video_file)
print 'Video {}, probability of alarm {}%'.format(video_file,
                                                  task['probability'])

# OK we can download the video which contains the OSD
alarm_verification.download_file(task['results_video'], 'somevideo.avi')
Example #5
0
parser.add_argument('--blur', dest='blur', type=zero_or_one, default=0, help='If doing some face-detection, blur the faces in the output media')
parser.add_argument('--start-frame', dest='start_frame', default=0, help='Start processing at this frame in the video')
parser.add_argument('--max-frames', dest='max_frames', default=0, help='Process this many frames (0 do all)')
parser.add_argument('--min-size', dest='min_size', type=min_size, default=30, help='If searching for objects (e.g. faces) then this is the minimum size')
parser.add_argument('--verbose', dest='verbose', action='store_true', help='Be more verbose')
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)