WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Wolfram|One
Mathematica
Wolfram|Alpha Notebook Edition
Finance Platform
System Modeler
Wolfram Player
Wolfram Engine
WolframScript
Enterprise Private Cloud
Application Server
Enterprise Mathematica
Wolfram|Alpha Appliance
Enterprise Solutions
Corporate Consulting
Technical Consulting
Wolfram|Alpha Business Solutions
Resource System
Data Repository
Neural Net Repository
Function Repository
Wolfram|Alpha
Wolfram|Alpha Pro
Problem Generator
API
Data Drop
Products for Education
Mobile Apps
Wolfram Player
Wolfram Cloud App
Wolfram|Alpha for Mobile
Wolfram|Alpha-Powered Apps
Services
Paid Project Support
Wolfram U
Summer Programs
All Products & Services »
Technologies
Wolfram Language
Revolutionary knowledge-based programming language.
Wolfram Cloud
Central infrastructure for Wolfram's cloud products & services.
Wolfram Science
Technology-enabling science of the computational universe.
Wolfram Notebooks
The preeminent environment for any technical workflows.
Wolfram Engine
Software engine implementing the Wolfram Language.
Wolfram Natural Language Understanding System
Knowledge-based broadly deployed natural language.
Wolfram Data Framework
Semantic framework for real-world data.
Wolfram Universal Deployment System
Instant deployment across cloud, desktop, mobile, and more.
Wolfram Knowledgebase
Curated computable knowledge powering Wolfram|Alpha.
All Technologies »
Solutions
Engineering, R&D
Aerospace & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Mechanical Engineering
Operations Research
More...
Finance, Statistics & Business Analysis
Actuarial Sciences
Bioinformatics
Data Science
Econometrics
Financial Risk Management
Statistics
More...
Education
All Solutions for Education
Trends
Machine Learning
Multiparadigm Data Science
Internet of Things
High-Performance Computing
Hackathons
Software & Web
Software Development
Authoring & Publishing
Interface Development
Web Development
Sciences
Astronomy
Biology
Chemistry
More...
All Solutions »
Learning & Support
Learning
Wolfram Language Documentation
Fast Introduction for Programmers
Wolfram U
Videos & Screencasts
Wolfram Language Introductory Book
Webinars & Training
Summer Programs
Books
Need Help?
Support FAQ
Wolfram Community
Contact Support
Premium Support
Paid Project Support
Technical Consulting
All Learning & Support »
Company
About
Company Background
Wolfram Blog
Events
Contact Us
Work with Us
Careers at Wolfram
Internships
Other Wolfram Language Jobs
Initiatives
Wolfram Foundation
MathWorld
Computer-Based Math
A New Kind of Science
Wolfram Technology for Hackathons
Student Ambassador Program
Wolfram for Startups
Demonstrations Project
Wolfram Innovator Awards
Wolfram + Raspberry Pi
Summer Programs
More...
All Company »
Search
WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
GROUPS:
Staff Picks
Data Science
Image Processing
Graphics and Visualization
Wolfram Language
Machine Learning
Wolfram Summer School
Video Processing
Neural Networks
6
Jiya Singh
[WSS21] Finding ways to pick optimal frames for video summarization
Jiya Singh
Posted
1 year ago
1955 Views
|
1 Reply
|
6 Total Likes
Follow this post
|
Finding ways to pick optimal frames for video summarization
by
Jiya Singh
With the growing amount of data on the web, it is hard to process and understand the information we need in short time. Video summarization process plays an important role in helping us with this problem. Video summarization is a procedure of finding key frames that highlight the most informative and representative parts of a video. In this project we focus on finding the best techniques to pick optimal frames for video summarization.
We explore different feature-based approaches and give a comparison between them using the Wolfram Language. This notebook highlights namely two feature extraction methods i.e. image feature extraction and video feature extraction using pretrained neural network models.
Image feature extraction
Video extraction
We use a “Live CEOing Ep 448: Geography Design Review for Wolfram Language 12.3”
https://www.youtube.com/watch?v=xVqtBY-sT2w
YouTube video in this notebook. We select 1 frame for every 10 seconds from the original video to work on.
I
n
[
]
:
=
v
i
d
e
o
=
V
i
d
e
o
[
I
m
p
o
r
t
[
"
/
U
s
e
r
s
/
j
i
y
a
/
p
r
o
j
e
c
t
s
/
l
i
v
e
c
e
o
1
.
m
k
v
"
]
,
R
a
s
t
e
r
S
i
z
e
3
0
0
,
A
u
d
i
o
T
r
a
c
k
S
e
l
e
c
t
i
o
n
-
>
N
o
n
e
]
I
n
[
]
:
=
n
=
1
0
;
d
u
r
=
Q
u
a
n
t
i
t
y
M
a
g
n
i
t
u
d
e
[
D
u
r
a
t
i
o
n
[
v
i
d
e
o
]
,
"
S
e
c
o
n
d
s
"
]
;
f
r
a
m
e
s
=
V
i
d
e
o
E
x
t
r
a
c
t
F
r
a
m
e
s
[
v
i
d
e
o
,
R
a
n
g
e
[
0
,
d
u
r
,
n
]
]
;
I
n
[
]
:
=
L
e
n
g
t
h
[
f
r
a
m
e
s
]
O
u
t
[
]
=
4
1
8
I
n
[
]
:
=
I
m
a
g
e
D
i
m
e
n
s
i
o
n
s
[
f
r
a
m
e
s
[
[
1
]
]
]
O
u
t
[
]
=
{
3
0
0
,
1
6
9
}
Video frames preprocessing
After getting a total of 418 frames from the video, we use different metrics to remove the similar frames without losing information and compare their performance.
Using ImageDistance
ImageDistance function is a metric used to find distance between two images according to different distance methods. We explore four of these distance methods CosineDistance, NormalizedSquaredEuclideanDistance, RootMeanSquare and CorrelationDistance for reducing the frames by eliminating similar ones.
We randomly pick 200 pairs frames from the video to find the heuristics of the above mentioned distance methods to eliminate similar frames. The threshold for each metric is chosen as 25% quantile of the image distances found between the randomly selected pairs of frames.
I
n
[
]
:
=
d
i
s
t
F
u
n
c
t
i
o
n
s
=
{
C
o
s
i
n
e
D
i
s
t
a
n
c
e
,
N
o
r
m
a
l
i
z
e
d
S
q
u
a
r
e
d
E
u
c
l
i
d
e
a
n
D
i
s
t
a
n
c
e
,
R
o
o
t
M
e
a
n
S
q
u
a
r
e
,
C
o
r
r
e
l
a
t
i
o
n
D
i
s
t
a
n
c
e
}
;
I
n
[
]
:
=
p
e
r
m
=
P
e
r
m
u
t
a
t
i
o
n
s
[
f
r
a
m
e
s
,
{
2
}
]
;
L
e
n
g
t
h
@
p
e
r
m
O
u
t
[
]
=
1
7
4
3
0
6
I
n
[
]
:
=
i
m
a
g
e
s
=
R
a
n
d
o
m
C
h
o
i
c
e
[
p
e
r
m
,
2
0
0
]
;
Cosine Distance
I
n
[
]
:
=
c
o
s
D
i
s
t
=
I
m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m
s
D
i
s
t
]
,
1
/
4
]
O
u
t
[
]
=
0
.
1
7
6
0
3
8
Correlation distance
I
n
[
]
:
=
c
o
r
r
D
i
s
t
=
I
m
a
g
e
D
i
s
t
a
n
c
e
[
S
e
q
u
e
n
c
e
@
@
#
,
D
i
s
t
a
n
c
e
F
u
n
c
t
i
o
n
-
>
C
o
r
r
e
l
a
t
i
o
n
D
i
s
t
a
n
c
e
]
&
/
@
i
m
a
g
e
s
;
I
n
[
]
:
=
H
i
s
t
o
g
r
a
m
[
c
o
r
r
D
i
s
t
]
O
u
t
[
]
=
I
n
[
]
:
=
Q
u
a
n
t
i
l
e
[
N
u
m
e
r
i
c
a
l
S
o
r
t
[
c
o
r
r
D
i
s
t
]
,
1
/
4
]
O
u
t
[
]
=
0
.
4
3
6
4
2
6
Finding reduced frames using different distance functions of ImageDistance
Using the above thresholds, we reduce the previously obtained 418 frames of the video to reduce the number of frames.
I
n
[
]
:
=
r
e
d
u
c
e
d
C
o
s
D
i
s
t
=
D
e
l
e
t
e
D
u
p
l
i
c
a
t
e
s
[
f
r
a
m
e
s
,
I
m
a
g
e
D
i
s
t
a
n
c
e
[
#
1
,
#
2
,
D
i
s
t
a
n
c
e
F
u
n
c
t
i
o
n
-
>
C
o
s
i
n
e
D
i
s
t
a
n
c
e
]
<
0
.
0
2
&
]
;
r
e
d
u
c
e
d
N
S
E
=
D
e
l
e
t
e
D
u
p
l
i
c
a
t
e
s
[
f
r
a
m
e
s
,
I
m
a
g
e
D
i
s
t
a
n
c
e
[
#
1
,
#
2
,
D
i
s
t
a
n
c
e
F
u
n
c
t
i
o
n
-
>
N
o
r
m
a
l
i
z
e
d
S
q
u
a
r
e
d
E
u
c
l
i
d
e
a
n
D
i
s
t
a
n
c
e
]
<
0
.
2
&
]
;
r
e
d
u
c
e
d
R
M
S
=
D
e
l
e
t
e
D
u
p
l
i
c
a
t
e
s
[
f
r
a
m
e
s
,
I
m
a
g
e
D
i
s
t
a
n
c
e
[
#
1
,
#
2
,
D
i
s
t
a
n
c
e
F
u
n
c
t
i
o
n
-
>
R
o
o
t
M
e
a
n
S
q
u
a
r
e
]
<
0
.
2
&
]
;
r
e
d
u
c
e
d
C
o
r
D
i
s
t
=
D
e
l
e
t
e
D
u
p
l
i
c
a
t
e
s
[
f
r
a
m
e
s
,
I
m
a
g
e
D
i
s
t
a
n
c
e
[
#
1
,
#
2
,
D
i
s
t
a
n
c
e
F
u
n
c
t
i
o
n
-
>
C
o
r
r
e
l
a
t
i
o
n
D
i
s
t
a
n
c
e
]
<
0
.
4
&
]
;
I
n
[
]
:
=
L
e
n
g
t
h
/
@
{
r
e
d
u
c
e
d
C
o
s
D
i
s
t
,
r
e
d
u
c
e
d
N
S
E
,
r
e
d
u
c
e
d
R
M
S
,
r
e
d
u
c
e
d
C
o
r
D
i
s
t
}
O
u
t
[
]
=
{
3
3
,
2
1
,
1
9
,
2
1
}
Using ColorDistance
ColorDistance is another metric used for the process of reducing frames on their similarity. This distance function compares the colors distances in the given images. We again use the randomly selected pairs of frames and run the function.
I
n
[
]
:
=
H
i
s
t
o
g
r
a
m
[
S
q
r
t
@
T
o
t
a
l
[
I
m
a
g
e
D
a
t
a
[
C
o
l
o
r
D
i
s
t
a
n
c
e
@
@
#
]
^
2
,
2
]
&
/
@
i
m
a
g
e
s
]
O
u
t
[
]
=
I
n
[
]
:
=
c
o
l
D
i
s
t
=
S
q
r
t
@
T
o
t
a
l
[
I
m
a
g
e
D
a
t
a
[
C
o
l
o
r
D
i
s
t
a
n
c
e
@
@
#
]
^
2
,
2
]
&
/
@
i
m
a
g
e
s
;
I
n
[
]
:
=
Q
u
a
n
t
i
l
e
[
N
u
m
e
r
i
c
a
l
S
o
r
t
[
c
o
l
D
i
s
t
]
,
1
/
4
]
O
u
t
[
]
=
4
3
.
1
6
0
4
I
n
[
]
:
=
r
e
d
u
c
e
d
F
r
a
m
e
s
C
o
l
D
i
s
t
=
D
e
l
e
t
e
D
u
p
l
i
c
a
t
e
s
[
f
r
a
m
e
s
,
S
q
r
t
@
T
o
t
a
l
[
I
m
a
g
e
D
a
t
a
[
C
o
l
o
r
D
i
s
t
a
n
c
e
@
@
{
#
1
,
#
2
}
]
^
2
,
2
]
<
4
3
&
]
;
The following table highlights the performance of above mentioned metrics, i.e. ImageDistance function with four different methods and the ColorDistance function, along with the selected thresholds. These reduced number of frames help in removing the redundancy of similar frames in the video and help in further steps.
I
n
[
]
:
=
t
a
b
l
e
=
{
{
"
C
o
l
o
r
D
i
s
t
a
n
c
e
"
,
4
8
,
L
e
n
g
t
h
[
r
e
d
u
c
e
d
F
r
a
m
e
s
C
o
l
D
i
s
t
]
}
,
{
"
C
o
s
i
n
e
D
i
s
t
a
n
c
e
"
,
0
.
0
2
,
3
3
}
,
{
"
N
o
r
m
a
l
i
z
e
d
S
q
u
a
r
e
d
E
u
c
l
i
d
e
a
n
D
i
s
t
a
n
c
e
"
,
0
.
2
,
2
1
}
,
{
"
R
o
o
t
M
e
a
n
S
q
u
a
r
e
"
,
0
.
2
,
1
9
}
,
{
"
C
o
r
r
e
l
a
t
i
o
n
D
i
s
t
a
n
c
e
"
,
0
.
4
,
2
1
}
}
;
I
n
[
]
:
=
G
r
i
d
[
P
r
e
p
e
n
d
[
t
a
b
l
e
,
{
"
D
i
s
t
a
n
c
e
F
u
n
c
t
i
o
n
s
"
,
"
T
h
r
e
s
h
o
l
d
s
"
,
"
N
u
m
b
e
r
o
f
r
e
d
u
c
e
d
f
r
a
m
e
s
"
}
]
,
B
a
c
k
g
r
o
u
n
d
-
>
{
N
o
n
e
,
{
L
i
g
h
t
e
r
[
Y
e
l
l
o
w
,
.
9
]
,
{
W
h
i
t
e
,
L
i
g
h
t
e
r
[
B
l
e
n
d
[
{
B
l
u
e
,
G
r
e
e
n
}
]
,
.
8
]
}
}
}
,
D
i
v
i
d
e
r
s
-
>
{
{
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
{
L
i
g
h
t
e
r
[
G
r
a
y
,
.
5
]
}
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
}
,
{
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
{
F
a
l
s
e
}
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
}
}
,
A
l
i
g
n
m
e
n
t
-
>
L
e
f
t
,
S
p
a
c
i
n
g
s
-
>
{
4
,
2
}
]
O
u
t
[
]
=
D
i
s
t
a
n
c
e
F
u
n
c
t
i
o
n
s
T
h
r
e
s
h
o
l
d
s
N
u
m
b
e
r
o
f
r
e
d
u
c
e
d
f
r
a
m
e
s
C
o
l
o
r
D
i
s
t
a
n
c
e
4
8
3
5
C
o
s
i
n
e
D
i
s
t
a
n
c
e
0
.
0
2
3
3
N
o
r
m
a
l
i
z
e
d
S
q
u
a
r
e
d
E
u
c
l
i
d
e
a
n
D
i
s
t
a
n
c
e
0
.
2
2
1
R
o
o
t
M
e
a
n
S
q
u
a
r
e
0
.
2
1
9
C
o
r
r
e
l
a
t
i
o
n
D
i
s
t
a
n
c
e
0
.
4
2
1
Feature Extractor using NN
Using Inception V3 feature extractor on the reduced number of frames to compare different frames
I
n
[
]
:
=
m
o
d
e
l
=
N
e
t
M
o
d
e
l
[
"
I
n
c
e
p
t
i
o
n
V
3
T
r
a
i
n
e
d
o
n
I
m
a
g
e
N
e
t
C
o
m
p
e
t
i
t
i
o
n
D
a
t
a
"
]
;
e
x
t
r
a
c
t
o
r
=
T
a
k
e
[
m
o
d
e
l
,
{
1
,
-
4
}
]
O
u
t
[
]
=
N
e
t
C
h
a
i
n
I
n
p
u
t
p
o
r
t
:
i
m
a
g
e
O
u
t
p
u
t
p
o
r
t
:
v
e
c
t
o
r
(
s
i
z
e
:
2
0
4
8
)
Clustering
Using clustering algorithms without predefined number of clusters
Clustering the reduced frames obtained after applying ImageDistance and ColorDistance functions.
I
n
[
]
:
=
f
c
l
u
s
t
e
r
s
1
=
F
i
n
d
C
l
u
s
t
e
r
s
[
e
x
t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
;
I
n
[
]
:
=
L
e
n
g
t
h
[
f
c
l
u
s
t
e
r
s
4
[
[
#
]
]
]
&
/
@
R
a
n
g
e
[
2
]
O
u
t
[
]
=
{
7
,
5
}
I
n
[
]
:
=
i
m
g
C
o
l
7
=
R
a
n
d
o
m
C
h
o
i
c
e
[
f
c
l
u
s
t
e
r
s
4
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
7
]
;
i
m
g
C
o
l
8
=
R
a
n
d
o
m
C
h
o
i
c
e
[
f
c
l
u
s
t
e
r
s
4
[
[
2
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
5
]
;
I
n
[
]
:
=
L
e
n
g
t
h
[
f
c
l
u
s
t
e
r
s
5
[
[
#
]
]
]
&
/
@
R
a
n
g
e
[
2
]
O
u
t
[
]
=
{
5
,
5
}
I
n
[
]
:
=
i
m
g
C
o
l
9
=
R
a
n
d
o
m
C
h
o
i
c
e
[
f
c
l
u
s
t
e
r
s
5
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
5
]
;
i
m
g
C
o
l
1
0
=
R
a
n
d
o
m
C
h
o
i
c
e
[
f
c
l
u
s
t
e
r
s
5
[
[
2
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
5
]
;
Equally spaced five frames from the original video for comparison with the clustered frames.
I
n
[
]
:
=
s
e
q
F
r
a
m
e
s
1
=
V
i
d
e
o
E
x
t
r
a
c
t
F
r
a
m
e
s
[
v
i
d
e
o
,
R
a
n
g
e
[
1
,
d
u
r
,
d
u
r
/
5
]
]
;
The following table gives a summary of the used metrics and their performance in video summarization process. The last column also gives a comparison of our methods with selecting equally spaced frames from the video for this task.
I
n
[
]
:
=
t
a
b
l
e
=
{
{
"
C
o
l
o
r
D
i
s
t
a
n
c
e
"
,
4
8
,
L
e
n
g
t
h
[
r
e
d
u
c
e
d
F
r
a
m
e
s
C
o
l
D
i
s
t
]
,
1
0
,
5
,
I
m
a
g
e
C
o
l
l
a
g
e
[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
a
m
e
s
"
}
]
,
C
o
l
u
m
n
W
i
d
t
h
s
-
>
{
8
,
6
,
6
,
8
,
6
,
2
5
}
,
B
a
c
k
g
r
o
u
n
d
-
>
{
N
o
n
e
,
{
L
i
g
h
t
e
r
[
Y
e
l
l
o
w
,
.
9
]
,
{
W
h
i
t
e
,
L
i
g
h
t
e
r
[
B
l
e
n
d
[
{
B
l
u
e
,
G
r
e
e
n
}
]
,
.
8
]
}
}
}
,
D
i
v
i
d
e
r
s
-
>
{
{
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
{
L
i
g
h
t
e
r
[
G
r
a
y
,
.
5
]
}
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
}
,
{
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
{
F
a
l
s
e
}
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
}
}
,
A
l
i
g
n
m
e
n
t
-
>
L
e
f
t
,
S
p
a
c
i
n
g
s
-
>
{
4
,
2
}
]
O
u
t
[
]
=
Final Summary by combining above methods
We finally use the frames obtained above after all frame reduction techniques and clustering using GaussianMixture method to give the best representation of the video.
I
n
[
]
:
=
a
l
l
C
l
u
s
t
e
r
e
d
I
m
a
g
e
s
=
F
l
a
t
t
e
n
[
{
i
m
g
C
o
l
2
,
i
m
g
C
o
l
4
,
i
m
g
C
o
l
6
,
i
m
g
C
o
l
8
,
i
m
g
C
o
l
1
0
}
]
;
I
n
[
]
:
=
c
l
u
s
t
e
r
s
=
F
i
n
d
C
l
u
s
t
e
r
s
[
a
l
l
C
l
u
s
t
e
r
e
d
I
m
a
g
e
s
,
4
,
M
e
t
h
o
d
-
>
"
K
M
e
a
n
s
"
]
;
l
e
n
g
t
h
=
L
e
n
g
t
h
[
c
l
u
s
t
e
r
s
[
[
#
]
]
]
&
/
@
R
a
n
g
e
[
4
]
;
I
n
[
]
:
=
i
m
a
g
e
s
=
R
a
n
d
o
m
C
h
o
i
c
e
[
c
l
u
s
t
e
r
s
[
[
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
4
]
;
We also use the length of clusters as weights to make a keyframe summary of the video using ImageCollage.
I
n
[
]
:
=
I
m
a
g
e
C
o
l
l
a
g
e
[
l
e
n
g
t
h
-
>
F
l
a
t
t
e
n
[
i
m
a
g
e
s
]
,
B
a
c
k
g
r
o
u
n
d
W
h
i
t
e
]
O
u
t
[
]
=
Using clustering algorithms with predefined number of clusters
We apply the same techniques on another video “Live CEOing Ep 446: Discrete Computation Design Review for Wolfram Language 12.3”
https://www.youtube.com/watch?v=2v7AGAt0Pw4
.
However, this time we use clustering algorithms that require predefined number of clusters as an input which are KMeans and KMedoids clustering algorithms.
I
n
[
]
:
=
v
i
d
e
o
2
=
V
i
d
e
o
[
I
m
p
o
r
t
[
"
/
U
s
e
r
s
/
j
i
y
a
/
p
r
o
j
e
c
t
s
/
l
i
v
e
c
e
o
2
.
m
k
v
"
]
,
R
a
s
t
e
r
S
i
z
e
3
0
0
,
A
u
d
i
o
T
r
a
c
k
S
e
l
e
c
t
i
o
n
-
>
N
o
n
e
]
I
n
[
]
:
=
n
=
1
0
;
d
u
r
=
Q
u
a
n
t
i
t
y
M
a
g
n
i
t
u
d
e
[
D
u
r
a
t
i
o
n
[
v
i
d
e
o
2
]
,
"
S
e
c
o
n
d
s
"
]
;
f
r
a
m
e
s
2
=
V
i
d
e
o
E
x
t
r
a
c
t
F
r
a
m
e
s
[
v
i
d
e
o
2
,
R
a
n
g
e
[
0
,
d
u
r
,
n
]
]
;
I
n
[
]
:
=
L
e
n
g
t
h
[
f
r
a
m
e
s
2
]
I
m
a
g
e
D
i
m
e
n
s
i
o
n
s
[
f
r
a
m
e
s
2
[
[
1
]
]
]
O
u
t
[
]
=
3
5
3
O
u
t
[
]
=
{
3
0
0
,
1
6
9
}
Selecting 200 random pairs of frames to determine the heuristics for reducing frames using different distance functions.
I
n
[
]
:
=
p
e
r
m
2
=
P
e
r
m
u
t
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6
]
;
i
m
g
C
o
l
K
M
e
a
n
s
5
=
R
a
n
d
o
m
C
h
o
i
c
e
[
c
l
u
s
t
e
r
s
5
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
6
]
;
I
n
[
]
:
=
i
m
g
C
o
l
K
M
e
d
1
=
R
a
n
d
o
m
C
h
o
i
c
e
[
c
l
u
s
t
e
r
s
1
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
6
]
;
i
m
g
C
o
l
K
M
e
d
2
=
R
a
n
d
o
m
C
h
o
i
c
e
[
c
l
u
s
t
e
r
s
2
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
6
]
;
i
m
g
C
o
l
K
M
e
d
3
=
R
a
n
d
o
m
C
h
o
i
c
e
[
c
l
u
s
t
e
r
s
3
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
6
]
;
i
m
g
C
o
l
K
M
e
d
4
=
R
a
n
d
o
m
C
h
o
i
c
e
[
c
l
u
s
t
e
r
s
4
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
6
]
;
i
m
g
C
o
l
K
M
e
d
5
=
R
a
n
d
o
m
C
h
o
i
c
e
[
c
l
u
s
t
e
r
s
5
[
[
1
,
#
]
]
,
1
]
&
/
@
R
a
n
g
e
[
6
]
;
Selecting equally spaced frames for getting a video summary
To give a comparison between using above methods and selecting equally spaced frames from the video for video summarization.
I
n
[
]
:
=
d
u
r
=
Q
u
a
n
t
i
t
y
M
a
g
n
i
t
u
d
e
[
D
u
r
a
t
i
o
n
[
v
i
d
e
o
2
]
,
"
S
e
c
o
n
d
s
"
]
;
s
e
q
F
r
a
m
e
s
2
=
I
m
a
g
e
C
o
l
l
a
g
e
[
V
i
d
e
o
E
x
t
r
a
c
t
F
r
a
m
e
s
[
v
i
d
e
o
2
,
R
a
n
g
e
[
1
,
d
u
r
,
d
u
r
/
6
]
]
]
;
The following table gives a summary of our results for different frame reduction techniques and the KMeans and KMedoids clustering algorithms. The last column also gives a comparison of our methods with selecting equally spaced frames from the video for this task.
I
n
[
]
:
=
t
a
b
l
e
=
{
{
"
C
o
l
o
r
D
i
s
t
a
n
c
e
"
,
3
0
,
L
e
n
g
t
h
[
r
e
d
u
c
e
d
F
r
a
m
e
s
C
o
l
D
i
s
t
2
]
,
I
m
a
g
e
C
o
l
l
a
g
e
[
L
e
n
g
t
h
[
c
l
u
s
t
e
r
s
1
[
[
1
,
#
]
]
]
&
/
@
R
a
n
g
e
[
6
]
-
>
F
l
a
t
t
e
n
[
i
m
g
C
o
l
K
M
e
a
n
s
1
]
,
B
a
c
k
g
r
o
u
n
d
W
h
i
t
e
]
,
I
m
a
g
e
C
o
l
l
a
g
e
[
L
e
n
g
t
h
[
c
l
u
s
t
e
r
s
1
[
[
2
,
#
]
]
]
&
/
@
R
a
n
g
e
[
6
]
-
>
F
l
a
t
t
e
n
[
i
m
g
C
o
l
K
M
e
d
1
]
,
B
a
c
k
g
r
o
u
n
d
W
h
i
t
e
]
,
s
e
q
F
r
a
m
e
s
2
}
,
{
"
C
o
s
i
n
e
D
i
s
t
a
n
c
e
"
,
0
.
0
1
,
L
e
n
g
t
h
[
r
e
d
u
c
e
d
C
o
s
D
i
s
t
2
]
,
I
m
a
g
e
C
o
l
l
a
g
e
[
L
e
n
g
t
h
[
c
l
u
s
t
e
r
s
2
[
[
1
,
#
]
]
]
&
/
@
R
a
n
g
e
[
6
]
-
>
F
l
a
t
t
e
n
[
i
m
g
C
o
l
K
M
e
a
n
s
2
]
,
B
a
c
k
g
r
o
u
n
d
W
h
i
t
e
]
,
I
m
a
g
e
C
o
l
l
a
g
e
[
L
e
n
g
t
h
[
c
l
u
s
t
e
r
s
2
[
[
2
,
#
]
]
]
&
/
@
R
a
n
g
e
[
6
]
-
>
F
l
a
t
t
e
n
[
i
m
g
C
o
l
K
M
e
d
2
]
,
B
a
c
k
g
r
o
u
n
d
W
h
i
t
e
]
,
s
e
q
F
r
a
m
e
s
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
[
G
r
a
y
,
.
5
]
}
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
}
,
{
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
,
{
F
a
l
s
e
}
,
D
a
r
k
e
r
[
G
r
a
y
,
.
6
]
}
}
,
A
l
i
g
n
m
e
n
t
-
>
L
e
f
t
,
S
p
a
c
i
n
g
s
-
>
{
4
,
2
}
]
O
u
t
[
]
=
Using a general video
To see the performance of our model on a general video, we implement our techniques on a
YouTube short film
and compare our summary with that using equally spaced frames from the video.
I
n
[
]
:
=
g
e
n
e
r
a
l
V
i
d
e
o
1
=
V
i
d
e
o
[
I
m
p
o
r
t
[
"
/
U
s
e
r
s
/
j
i
y
a
/
p
r
o
j
e
c
t
s
/
s
h
o
r
t
m
o
v
.
m
k
v
"
]
,
R
a
s
t
e
r
S
i
z
e
3
0
0
,
A
u
d
i
o
T
r
a
c
k
S
e
l
e
c
t
i
o
n
-
>
N
o
n
e
]
I
n
[
]
:
=
V
i
d
e
o
E
x
t
r
a
c
t
F
r
a
m
e
s
[
g
e
n
e
r
a
l
V
i
d
e
o
1
,
{
1
0
,
2
0
,
1
8
5
}
]
O
u
t
[
]
=
,
,
I
n
[
]
:
=
d
u
r
a
t
i
o
n
=
Q
u
a
n
t
i
t
y
M
a
g
n
i
t
u
d
e
[
D
u
r
a
t
i
o
n
[
g
e
n
e
r
a
l
V
i
d
e
o
1
]
,
"
S
e
c
o
n
d
s
"
]
;
m
o
v
F
r
a
m
e
s
=
V
i
d
e
o
E
x
t
r
a
c
t
F
r
a
m
e
s
[
g
e
n
e
r
a
l
V
i
d
e
o
1
,
R
a
n
g
e
[
0
,
d
u
r
a
t
i
o
n
-
1
]
]
;
I
n
[
]
:
=
L
e
n
g
t
h
[
m
o
v
F
r
a
m
e
s
]
O
u
t
[
]
=
1
8
6
I
n
[
]
:
=
i
m
a
g
e
s
3
=
R
a
n
d
o
m
C
h
o
i
c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