Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit 394a007

Browse files
authored
Merge pull request #340 from gnes-ai/set_max_shots_num
fix(shot-detector): rename shot detector
2 parents c35b27e + a641d5c commit 394a007

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

gnes/preprocessor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
'BaseVideoPreprocessor': 'base',
3232
'FFmpegPreprocessor': 'video.ffmpeg',
3333
'FFmpegVideoSegmentor': 'video.ffmpeg',
34-
'ShotDetectPreprocessor': 'video.shotdetect',
34+
'ShotDetectorPreprocessor': 'video.shot_detector',
3535
'VideoEncoderPreprocessor': 'video.video_encoder',
3636
'VideoDecoderPreprocessor': 'video.video_decoder',
3737
'AudioVanilla': 'audio.audio_vanilla',

gnes/preprocessor/video/shotdetect.py renamed to gnes/preprocessor/video/shot_detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from gnes.preprocessor.helper import compute_descriptor, compare_descriptor, detect_peak_boundary, compare_ecr
2424

2525

26-
class ShotDetectPreprocessor(BaseVideoPreprocessor):
26+
class ShotDetectorPreprocessor(BaseVideoPreprocessor):
2727
store_args_kwargs = True
2828

2929
def __init__(self,
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!ShotDetectPreprocessor
1+
!ShotDetectorPreprocessor
22
parameters:
33
descriptor: "canny_edge"
44
distance_metric: "edge_change_ration"
55
frame_size: "192:168"
66
frame_rate: 10
7+
kwargs:
8+
max_shot_num: 5
79
gnes_config:
810
is_trained: true

tests/yaml/preprocessor-shotdetect_histogram.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!ShotDetectPreprocessor
1+
!ShotDetectorPreprocessor
22
parameters:
33
descriptor: "block_hsv_histogram"
44
distance_metric: "bhattacharya"

0 commit comments

Comments
 (0)