Skip to content

Commit

Permalink
feat(#6): add example
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Jul 23, 2019
1 parent 7ff66f5 commit 97ceeb9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ script:
- python classify_with_svm.py
- python cut_and_classify.py
- python multi_video.py
- python mini.py
21 changes: 21 additions & 0 deletions example/mini.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from stagesepx.cutter import VideoCutter
from stagesepx.classifier import SSIMClassifier
from stagesepx.reporter import Reporter

# cut
video_path = '../test.mp4'
cutter = VideoCutter()
res = cutter.cut(video_path)
stable = res.get_stable_range()

# classify
cl = SSIMClassifier()
cl.load(stable)

res = cl.classify(
video_path,
stable,
)

# draw
Reporter.draw(res)

0 comments on commit 97ceeb9

Please sign in to comment.