Skip to content

Commit

Permalink
[detectors] Implement Koala-36M
Browse files Browse the repository at this point in the history
Work in progress. #441
  • Loading branch information
Breakthrough committed Nov 19, 2024
1 parent 2c55a55 commit b66d897
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scenedetect/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
ContentDetector,
HashDetector,
HistogramDetector,
KoalaDetector,
ThresholdDetector,
)
from scenedetect.platform import get_cv2_imwrite_params, get_system_version_info
Expand Down Expand Up @@ -1577,3 +1578,16 @@ def save_qp_command(
scenedetect.add_command(list_scenes_command)
scenedetect.add_command(save_images_command)
scenedetect.add_command(split_video_command)


@click.command("detect-koala", cls=Command, help="""WIP""")
@click.pass_context
def detect_koala_command(
ctx: click.Context,
):
ctx = ctx.obj
assert isinstance(ctx, CliContext)
ctx.add_detector(KoalaDetector, {"min_scene_len": None})


scenedetect.add_command(detect_koala_command)
1 change: 1 addition & 0 deletions scenedetect/detectors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from scenedetect.detectors.adaptive_detector import AdaptiveDetector
from scenedetect.detectors.hash_detector import HashDetector
from scenedetect.detectors.histogram_detector import HistogramDetector
from scenedetect.detectors.koala_detector import KoalaDetector

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
Expand Down
2 changes: 2 additions & 0 deletions tests/test_detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
ContentDetector,
HashDetector,
HistogramDetector,
KoalaDetector,
ThresholdDetector,
)

Expand All @@ -37,6 +38,7 @@
ContentDetector,
HashDetector,
HistogramDetector,
KoalaDetector,
)

ALL_DETECTORS: ty.Tuple[ty.Type[SceneDetector]] = (*FAST_CUT_DETECTORS, ThresholdDetector)
Expand Down

0 comments on commit b66d897

Please sign in to comment.