示例#1
0
        def do_kam_check(self, image_file, video_file):

            image_path = os.path.join(kamcheck_data_dir, image_file)
            video_path = os.path.join(kamcheck_data_dir, video_file)

            kamcheck = KamCheck()
            task = kamcheck.apply(image_file=image_path, video_file=video_path)
            print task
            return task
示例#2
0
        def do_kam_check(self, image_file, video_file):

            image_path = os.path.join(kamcheck_data_dir, image_file)
            video_path = os.path.join(kamcheck_data_dir, video_file)

            kamcheck = KamCheck(host=host)
            task = kamcheck.apply(image_file=image_path, video_file=video_path)
            print task
            return task
示例#3
0
from videoai import KamCheck
import os

kamcheck_data_dir = os.path.join('..', 'test-data', 'KamCheck')
#kamcheck_data_dir = '/ebuf/kieron/src/papillon/src/Data/Samples'

kamcheck = KamCheck()

# Example of tampering
image_file = os.path.join(kamcheck_data_dir, 'PTZRef.png')
video_file = os.path.join(kamcheck_data_dir, 'PTZ.avi')
task = kamcheck.apply(image_file, video_file)
print 'Reference {0}, video {1}, probability of tampering {2}%'.format(
    image_file, video_file, task['probability'])

# Example of no tampering
image_file = os.path.join(kamcheck_data_dir, 'parkingRef.png')
video_file = os.path.join(kamcheck_data_dir, 'parking.avi')
task = kamcheck.apply(image_file, video_file)
print 'Reference {0}, video {1}, probability of tampering {2}%'.format(
    image_file, video_file, task['probability'])
示例#4
0
from videoai import KamCheck
import os

kamcheck_data_dir = os.path.join("..", "test-data", "KamCheck")
# kamcheck_data_dir = '/ebuf/kieron/src/papillon/src/Data/Samples'

kamcheck = KamCheck()

# Example of tampering
image_file = os.path.join(kamcheck_data_dir, "PTZRef.png")
video_file = os.path.join(kamcheck_data_dir, "PTZ.avi")
task = kamcheck.apply(image_file, video_file)
print "Reference {0}, video {1}, probability of tampering {2}%".format(image_file, video_file, task["probability"])

# Example of no tampering
image_file = os.path.join(kamcheck_data_dir, "parkingRef.png")
video_file = os.path.join(kamcheck_data_dir, "parking.avi")
task = kamcheck.apply(image_file, video_file)
print "Reference {0}, video {1}, probability of tampering {2}%".format(image_file, video_file, task["probability"])
示例#5
0
parser.add_argument('--face-detect', dest='face_detect', action='store_true', help='Perform FaceDetect on video')
parser.add_argument('--face-detect-image', dest='face_detect_image', action='store_true', help='Perform FaceDetect on image')
parser.add_argument('--face-log', dest='face_log', action='store_true', help='Perform FaceLog on video')
parser.add_argument('--download', dest='download', action='store_true', help='Download any results')
parser.add_argument('--no-download', dest='download', action='store_false', help='Do not download any results')
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,