def main(): parser = VideoProcessor.make_parser( "Apply mask to every frame of a video and save as a new video.") parser.add_argument("mask_file") args = parser.parse_args() app = VideoMasker(args) return app.run()
def make_parser(help_string): parser = VideoProcessor.make_parser(help_string, with_output=False) BackgroundSubtractor.prep_parser(parser) parser.add_argument("-cpu", "--caffe_cpu", action="store_true", help="Use Caffe in CPU mode.", default=False) parser.add_argument("-od", "--output_datafile", default=None) parser.add_argument("-bc", "--boundary_check", action="store_true", help="Whether to mark frame as 'subject out-of-view' for frames when the" + " subject's bounding box intersects with the frame's bounding box.") parser.add_argument("-v", "--vgg_model_path", type=str, default=None, help="Path to the vgg model file.") parser.add_argument("-vm", "--vgg_model_filename", type=str, default="VGG_ILSVRC_16_layers_deploy.prototxt", help="Path to the vgg model file.") parser.add_argument("-vp", "--vgg_pretrained_filename", type=str, default="VGG_ILSVRC_16_layers.caffemodel", help="Path to the vgg model file.") parser.add_argument("-aug", "--augment_file", action="store_true", help="Augment exisiting file instead of overwriting " + "(useful when not all features are collected)", default=False) parser.add_argument("-nv", "--no_vgg", action="store_true", help="skip actual vgg feature extraction", default=False) return parser
def make_parser(help_string): parser = VideoProcessor.make_parser(help_string) parser.add_argument("-mo", "--mask_output_video", default="") BackgroundSubtractor.prep_parser(parser) return parser