diff --git a/gnes/preprocessor/__init__.py b/gnes/preprocessor/__init__.py index ccae1ae2..e307389f 100644 --- a/gnes/preprocessor/__init__.py +++ b/gnes/preprocessor/__init__.py @@ -31,7 +31,7 @@ 'BaseVideoPreprocessor': 'base', 'FFmpegPreprocessor': 'video.ffmpeg', 'FFmpegVideoSegmentor': 'video.ffmpeg', - 'ShotDetectPreprocessor': 'video.shotdetect', + 'ShotDetectorPreprocessor': 'video.shot_detector', 'VideoEncoderPreprocessor': 'video.video_encoder', 'VideoDecoderPreprocessor': 'video.video_decoder', 'AudioVanilla': 'audio.audio_vanilla', diff --git a/gnes/preprocessor/video/shotdetect.py b/gnes/preprocessor/video/shot_detector.py similarity index 98% rename from gnes/preprocessor/video/shotdetect.py rename to gnes/preprocessor/video/shot_detector.py index 01b30e41..629706cb 100644 --- a/gnes/preprocessor/video/shotdetect.py +++ b/gnes/preprocessor/video/shot_detector.py @@ -23,7 +23,7 @@ from gnes.preprocessor.helper import compute_descriptor, compare_descriptor, detect_peak_boundary, compare_ecr -class ShotDetectPreprocessor(BaseVideoPreprocessor): +class ShotDetectorPreprocessor(BaseVideoPreprocessor): store_args_kwargs = True def __init__(self, diff --git a/tests/yaml/preprocessor-shotdetect_edge.yml b/tests/yaml/preprocessor-shotdetect_edge.yml index caff221b..7e6f60e3 100644 --- a/tests/yaml/preprocessor-shotdetect_edge.yml +++ b/tests/yaml/preprocessor-shotdetect_edge.yml @@ -1,8 +1,10 @@ -!ShotDetectPreprocessor +!ShotDetectorPreprocessor parameters: descriptor: "canny_edge" distance_metric: "edge_change_ration" frame_size: "192:168" frame_rate: 10 + kwargs: + max_shot_num: 5 gnes_config: is_trained: true \ No newline at end of file diff --git a/tests/yaml/preprocessor-shotdetect_histogram.yml b/tests/yaml/preprocessor-shotdetect_histogram.yml index 63ea5462..798995ba 100644 --- a/tests/yaml/preprocessor-shotdetect_histogram.yml +++ b/tests/yaml/preprocessor-shotdetect_histogram.yml @@ -1,4 +1,4 @@ -!ShotDetectPreprocessor +!ShotDetectorPreprocessor parameters: descriptor: "block_hsv_histogram" distance_metric: "bhattacharya"