<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Replay Detection and Multi-stream Synchronization in CS:GO Game Streams Using Content-based Image Retrieval and Image Signature Matching</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Van-Tu Ninh</string-name>
          <email>tu.ninhvan@adaptcentre.ie</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tu-Khiem Le</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Duc-Tien Dang-Nguyen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Cathal Gurrin</string-name>
          <email>cathal.gurrin@dcu.ie</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dublin City University</institution>
          ,
          <country country="IE">Ireland</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Bergen</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>27</fpage>
      <lpage>29</lpage>
      <abstract>
        <p>In GameStory: The 2019 Video Game Analytics Challenge, two main tasks are nominated to solve in the challenge, which are replay detection - multi-stream synchronization, and game story summarization. In this paper, we propose a data-driven based approach to solve the first task: replay detection - multi-stream synchronization. Our solution aims to determine the replays which lie between two logo-transitional endpoints and synchronize them with their sources by extracting frames from videos, then applying image processing and retrieval remedies. In detail, we use the Bag of Visual Words approach to detect the logo-transitional endpoints, which contains multiple replays in between, then employ an Image Signature Matching algorithm for multi-stream synchronization and replay boundaries refinement 1. The best configuration of our proposed solution manages to achieve the second-highest scores in all evaluation metrics of the challenge.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Game analytics is a new research area in recent years that has
become popular due to the explosion of both modern live streaming
technologies (e.g., Twitch, Discord, Youtube) and e-sports
developments [
        <xref ref-type="bibr" rid="ref2 ref4">2, 4</xref>
        ]. Although e-sports has gained significant attention
from audiences across a variety of ages, not much research has
been conducted to analyse the game play to provide the spectator
with either a quick look into a match (e.g., player’s performance
statistics, highlights, critical moments, summary) or a deep insight
into a game (e.g., whole game statistics, outstanding team’s playing
style analysis, playing strategy trending analysis).
      </p>
      <p>
        In GameStory: The 2019 Video Game Analytics Challenge, the
organisers use the same dataset used in the previous year, which
was provided by ZNIPE.tv [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. More details of the data and task
descriptions can be found in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>RELATED WORKS</title>
      <p>
        A lot of research in sports videos was conducted to analyse the
highlights, the replays, and the story of the match. Jinjun Wang,
et.al. performed a shot classification followed by a proposed scene
transition structure analysis on the labels of the classified shots to
1https://github.com/nvtu/gamestory_mediaeval2019
detect replay scenes in sports [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Later, Bai Liang, Song-Yang Lao,
et.al. proposed the Perception Concept Network-Petri Net
(PCNPN) model to search and locate interesting events in sports videos
[
        <xref ref-type="bibr" rid="ref10 ref5">5, 10</xref>
        ], which is also a potential approach to detect replays as they
are usually critical events in the match. In 2019, Ali Javed, et.al.
proposed a novel approach for key-event detection and summarization
using Confined Elliptical Local Ternary Patterns (CE-LTPs) to
extract feature of motion history image for each key-event candidate
lying between the beginning and end of a gradual transition, then
applying Extreme Machine Learning (EML) to learn the pattern to
detect the key-events in sports videos [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The results of this work
can be used for both replay detection and story summarization of
diferent kinds of sports videos.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>APPROACH</title>
      <p>In the spirit of previous eforts in the field of video event detection
and segmentation, we propose a straightforward method to detect
replays in videos which are bounded by Intel Extreme Masters logo
transition scenes. The logo in these frames is shown in a plain
blue background and occupies approximately 80% of its image. We
propose to use a Bag-of-Visual-Words (BOVW) approach to detect
these two endpoints of each replay segment and use image signature
matching to synchronize multi-stream players’ views.
3.1</p>
    </sec>
    <sec id="sec-4">
      <title>Logo-bounded Video Detection</title>
      <p>
        3.1.1 Frame Extraction and Filtering: Firstly we use the fmpeg
tool to extract frames from commentator stream. To capture the
frames in which the Intel Extreme Masters logo is clearly visible,
we perform frame extraction at fps=2. As the video length is long
(approximately 12 hours), many redundant frames are generated.
We reduce the number of extracted frames by using a two pointers
technique to eliminate consecutive frames which have similar ORB
features [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and the degree of similarity of a gray-scaled color
histogram. For the ORB features, we only consider the top 500
features in total for comparison. Specifically, at frame i, we iterate
through its next consecutive frames until we reach a frame j (j &gt; i)
such that the number of matched ORB features does not exceed
α and the L2 distance between the two corresponding histograms
is greater than or equal to β . In our implementation, we choose
α = 200 and β = 0.8 (β ≤ 1), which means that 60% of the ORB
features are diferent and the degree of similarity between the two
color histograms is small. The ones between the frame i and j are
redundant and do not provide any extra information for the next
steps.
      </p>
      <p>
        3.1.2 Logo-bounded Video Detection using a Retrieval Approach:
From the result in section 3.1.1, we use this filtered data to construct
a dictionary of visual words (codebook). We run K-Means clustering
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] on the rootSIFT-feature data points [
        <xref ref-type="bibr" rid="ref1 ref7">1, 7</xref>
        ] extracted from
images in the same corpus. Before processing through the remaining
BOVW’s steps, frames are center-cropped to reduce background
noise. Another purpose is to force the model to focus on certain
parts of the frame, which have a high probability of containing the
Intel Extreme Masters logo only. After having retrieved the desired
frames, we can then select the proper endpoint pairs by assuming
that the replay’s length would not be more than 20 seconds.
      </p>
      <p>One problem in this stage is that we can only determine the
logo-bounded videos, which might contain many other replays
from either the same perspective or multiple perspectives. As the
transitions in these videos are smooth, we propose to use the results
generated from the section 3.2 to refine the replay detection result.
3.2</p>
    </sec>
    <sec id="sec-5">
      <title>Multi-stream Synchronization</title>
      <p>
        With the result obtained from the section 3.1.2, we extract frames
of these logo-bounded videos with their original fps, which is 59 for
the commentator stream. We apply the same process to the players’
videos with their corresponding fps. The problem now is to find in
the indexed database the image which is a near duplication of the
query one. Therefore, the players frames are then encoded by using
[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], added to the database, and then indexed for searching with
Elastic Search engine 2. Instead of searching the whole database
for the nearly duplicate images, we determine the match and shape
(roundness) of the logo-bounded videos based on provided metadata
and their time in the commentator stream. Thereby, we can both
narrow down the search space and locate the start frame of each
replay.
3.3
      </p>
    </sec>
    <sec id="sec-6">
      <title>Refine Replay Detection Result</title>
      <p>As stated in section 3.1.2, for a logo-bounded video with
multiplayer view, the problem could be solved easily using multi-stream
synchronization output. However, it would be harder for the one
with single-player view only as we now need to detect abrupt scene
changes in the video to split it into proper replays. By using the
searched rank list output from the section 3.2, for two
consecutive frames, we choose the most similar frame from the indexed
database, compute the absolute time diference in the synchronised
player stream, and then set a threshold. Thereby, we could reuse
the result of the previous step to detect abrupt scene transitions
between two replays in the stream with single-player view and
refine replay detection output based on the source time of similar
frames in player streams set.
4</p>
    </sec>
    <sec id="sec-7">
      <title>RESULTS AND ANALYSIS</title>
      <p>
        It can be seen from the graph shown in figure 1 that the best run
of our team (DCU-Computing) manages to gain a precision of
73.17% and a recall of 68.18%, yielding F1-score of 70.59%, which
is the second-highest score among the submissions for evaluation
at Jaccard threshold of 0.5. For evaluation at Jaccard threshold
of 0.75 shown in figure 2, all of our scores decrease significantly
(approximately 23.53%), except for the average overlapping score
2https://github.com/EdjoLabs/image-match
of multi-stream synchronization. The evaluation shows that our
algorithm works well to retrieve correctly more than 50%, but less
than 75% of a replay. Our result is lower than the best approach by
the AAU-Mekul team by around 20.98% [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. As we detect replays
based on two logo-transitional endpoint pairs, our algorithm cannot
handle the case that misses one endpoint.
      </p>
      <p>There are many situations that we mistakenly split the replays
of a player due to wrong image signature matching results. For
instance, in case that the player stands still and shoots, then moves
a little bit and finally returns to the original point and shoots again,
most of the frames will all find its source at one time point, while
a sudden player’s movement yields a diferent time point, which
causes our algorithm to consider it as a scene change and split
replays. Or when the player’s view is afected by smoke/blind grenade,
the features of the white scene are not distinctive enough to
determine its source. These cases all lead to the wrong replay splits that
reduces our detected replays’ length, which decreases our score.
Our approach works perfectly with logo-bounded streams
containing only one replay. For other cases, we can generate acceptable
results which might have few incorrect splits.</p>
    </sec>
    <sec id="sec-8">
      <title>ACKNOWLEDGMENTS</title>
      <p>This publication has emanated from research supported by
Science Foundation Ireland under grant numbers SFI/12/RC2289 and
13/RC/2106.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Arandjelović</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Zisserman</surname>
          </string-name>
          .
          <year>2012</year>
          .
          <article-title>Three things everyone should know to improve object retrieval</article-title>
          .
          <source>In 2012 IEEE Conference on Computer Vision and Pattern Recognition</source>
          .
          <fpage>2911</fpage>
          -
          <lpage>2918</lpage>
          . https://doi.org/10.1109/ CVPR.
          <year>2012</year>
          .6248018
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Nathan</given-names>
            <surname>Edge</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Evolution of the Gaming Experience: Live Video Streaming and the Emergence of a New Web Community</article-title>
          .
          <source>Elon Journal of Undergraduate Research in Communications 4</source>
          (
          <year>2013</year>
          ),
          <fpage>2153</fpage>
          -
          <lpage>5760</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Ali</given-names>
            <surname>Javed</surname>
          </string-name>
          , Aun Irtaza, Yasmeen Khaliq, Hafiz Malik, and Muhammad Tariq Mahmood.
          <year>2019</year>
          .
          <article-title>Replay and key-events detection for sports video summarization using confined elliptical local ternary patterns and extreme learning machine</article-title>
          .
          <source>Applied Intelligence</source>
          <volume>49</volume>
          ,
          <issue>8</issue>
          (
          <issue>01</issue>
          <year>Aug 2019</year>
          ),
          <fpage>2899</fpage>
          -
          <lpage>2917</lpage>
          . https://doi.org/10.1007/s10489-019-01410-x
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Mark</given-names>
            <surname>Johnson</surname>
          </string-name>
          and
          <string-name>
            <given-names>Jamie</given-names>
            <surname>Woodcock</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>The impacts of live streaming and Twitch.tv on the video game industry</article-title>
          .
          <source>Media Culture Society (12</source>
          <year>2018</year>
          ). https://doi.org/10.1177/0163443718818363
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Bai</given-names>
            <surname>Liang</surname>
          </string-name>
          ,
          <string-name>
            <surname>Song-Yang</surname>
            <given-names>Lao</given-names>
          </string-name>
          , Alan Smeaton,
          <string-name>
            <surname>Noel O'Connor</surname>
            ,
            <given-names>David</given-names>
          </string-name>
          <string-name>
            <surname>Sadlier</surname>
            ,
            <given-names>and David</given-names>
          </string-name>
          <string-name>
            <surname>Sinclair</surname>
          </string-name>
          .
          <year>2009</year>
          .
          <article-title>Semantic Analysis of Field Sports Video using a Petri-Net of Audio-Visual Concepts</article-title>
          .
          <source>Liang</source>
          , Bai and Lao, Songyang and Smeaton, Alan F.
          <article-title>and</article-title>
          <string-name>
            <surname>O'Connor</surname>
            ,
            <given-names>Noel E.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Sadlier</surname>
          </string-name>
          , David and Sinclair,
          <string-name>
            <surname>David</surname>
          </string-name>
          (
          <year>2009</year>
          )
          <article-title>Semantic analysis of field sports video using a petri-net of audio-visual concepts</article-title>
          .
          <source>The Computer Journal</source>
          ,
          <volume>52</volume>
          (
          <issue>7</issue>
          ). pp.
          <fpage>808</fpage>
          -
          <lpage>823</lpage>
          .
          <source>ISSN 0010-4620</source>
          <volume>52</volume>
          (
          <issue>10</issue>
          <year>2009</year>
          ). https://doi.org/10.1093/ comjnl/bxn058
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Lloyd</surname>
          </string-name>
          .
          <year>1982</year>
          .
          <article-title>Least squares quantization in PCM</article-title>
          .
          <source>IEEE Transactions on Information Theory 28</source>
          ,
          <issue>2</issue>
          (March
          <year>1982</year>
          ),
          <fpage>129</fpage>
          -
          <lpage>137</lpage>
          . https://doi.org/10. 1109/TIT.
          <year>1982</year>
          .1056489
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>David G.</given-names>
            <surname>Lowe</surname>
          </string-name>
          .
          <year>2004</year>
          .
          <article-title>Distinctive Image Features from Scale-Invariant Keypoints</article-title>
          .
          <source>International Journal of Computer Vision</source>
          <volume>60</volume>
          ,
          <issue>2</issue>
          (
          <issue>01</issue>
          <year>Nov 2004</year>
          ),
          <fpage>91</fpage>
          -
          <lpage>110</lpage>
          . https://doi.org/10.1023/B:VISI.
          <volume>0000029664</volume>
          .99615.94
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Mathias</given-names>
            <surname>Lux</surname>
          </string-name>
          , Michael Riegler, Duc Tien Dang Nguyen, Marcus Larson,
          <string-name>
            <given-names>Martin</given-names>
            <surname>Potthast</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Pål</given-names>
            <surname>Halvorsen</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>GameStory Task at MediaEval 2019</article-title>
          .
          <source>In Proceedings of MediaEval</source>
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Kevin</given-names>
            <surname>Mekul</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Automated Replay Detection and Multi-Stream Synchronization</article-title>
          .
          <source>In Proceedings of MediaEval</source>
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Wolfgang</given-names>
            <surname>Reisig</surname>
          </string-name>
          .
          <year>1985</year>
          .
          <source>Petri Nets: An Introduction</source>
          . Springer-Verlag, Berlin, Heidelberg.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Ethan</surname>
            <given-names>Rublee</given-names>
          </string-name>
          , Vincent Rabaud, Kurt Konolige, and
          <string-name>
            <given-names>Gary</given-names>
            <surname>Bradski</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>ORB: an eficient alternative to SIFT or SURF</article-title>
          .
          <source>Proceedings of the IEEE International Conference on Computer Vision</source>
          ,
          <fpage>2564</fpage>
          -
          <lpage>2571</lpage>
          . https: //doi.org/10.1109/ICCV.
          <year>2011</year>
          .6126544
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Jinjun</surname>
            <given-names>Wang</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eng Chng</surname>
            , and
            <given-names>Changsheng</given-names>
          </string-name>
          <string-name>
            <surname>Xu</surname>
          </string-name>
          .
          <year>2005</year>
          .
          <article-title>Soccer replay detection using scene transition structure analysis</article-title>
          .
          <source>IEEE International Conference on Acoustics, Speech, and Signal Processing</source>
          <volume>2</volume>
          , ii/433 - ii/436 Vol.
          <volume>2</volume>
          . https://doi.org/10.1109/ICASSP.
          <year>2005</year>
          .1415434
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Chi</surname>
            <given-names>Wong</given-names>
          </string-name>
          , Marshall W. Bern, and David Goldberg.
          <year>2002</year>
          .
          <article-title>An image signature for any kind of image</article-title>
          .
          <source>Proceedings. International Conference on Image Processing</source>
          <volume>1</volume>
          (
          <year>2002</year>
          ),
          <article-title>I-I.</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>