-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtest_media_matching.py
48 lines (32 loc) · 1.12 KB
/
test_media_matching.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""Test defines a number of test scenarios that are informative of how the API works
"""
from deeplens.utils.ui import *
from deeplens.media.segmentation import *
from deeplens.struct import *
from deeplens.media.youtube import *
from deeplens.media.matching import *
#filename = '/tmp/gbinYbEuL-M.mp4'
#youtube_fetch('gbinYbEuL-M')
youtube_fetch('otFsePa6MnI')
#exit()
#filename1 = '/tmp//q5BbWNXfw0s.mp4'
filename2 = '/tmp//otFsePa6MnI.mp4'
#files1 = shot_segmentation(filename1, threshold=75, skip=1)
files2 = shot_segmentation(filename2, threshold=75, skip=1)
#for seg1, file1 in files1:
# for seg2, file2 in files2:
# if is_video_match(file1, file2, thresh=55, sampling=0.01):
# print(seg1, seg2, file1, file2, 'match')
#out = is_video_match('/tmp//otFsePa6MnI.mp4.10.avi', '/tmp//q5BbWNXfw0s.mp4.14.avi', sampling=0.01)
#print(out)
"""
cv2.imshow('Player',img)
if cv2.waitKey(0) & 0xFF == ord('q'):
exit()
"""
#youtube_fetch('otFsePa6MnI')
#files = shot_segmentation(filename, threshold=50, skip=1)
#seg, file1 = files[0]
#seg, file2 = files[1]
#print(is_video_match(file1, file1))
#print(is_video_match(file1, file2))