<!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>Siamese Spatio-temporal convolutional neural network for stroke classification in Table Tennis games</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pierre-Etienne Martin</string-name>
          <email>pierre-etienne.martin@u-bordeaux.fr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jenny Benois-Pineau</string-name>
          <email>jenny.benois-pineau@u-bordeaux.fr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Boris Mansencal</string-name>
          <email>boris.mansencal@labri.fr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Renaud Péteri</string-name>
          <email>renaud.peteri@univ-lr.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Julien Morlier</string-name>
          <email>julien.morlier@u-bordeaux.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IMS, University of Bordeaux</institution>
          ,
          <addr-line>Talence</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>MIA, La Rochelle University</institution>
          ,
          <addr-line>La Rochelle</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Univ. Bordeaux</institution>
          ,
          <addr-line>CNRS, Bordeaux INP, LaBRI, UMR 5800, F-33400, Talence</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>27</fpage>
      <lpage>29</lpage>
      <abstract>
        <p>This work presents a Table Tennis stroke classification approach through a siamese spatio-temporal convolutional neural network SSTCNN. The videos are recorded at 120 frames per second with players performing in natural conditions. The frames are extracted, resized and processed to compute the optical flow. From the optical lfow, a region of interest - ROI - is inferred. The SSTCNN is then feed by RGB and optical flow ROIs stream to give a probabilistic classification over all the table tennis strokes.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        In the scope of video processing, action recognition and
classification is one of the main challenge. In the Sport task of MediaEval 2019
[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], this aspect is underlined by providing a dataset of Tennis table
recordings, TTStroke-21 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], where strokes have to be extracted
and classified with the aim of improving athletes performances. As
a first step, videos are provided with temporal segmentation and
the task is to classify those segments. However, contrary to the
common datasets widely used in image and video processing such
as UCF-101 [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], HMDB [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or Kinetics [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]; this task focuses on fined
grained classification with the classification of strokes highly
similar. The dificulty of this task is to be able to find the characteristics
of each kind of stroke using a limited dataset without over-fitting
it. In this paper, we present an approach aiming at providing data
with enough inter-dissimilarity and focusing on intra-similarity
to feed a neural network able to classify without over-fitting on a
limited dataset.
      </p>
    </sec>
    <sec id="sec-2">
      <title>APPROACH</title>
      <p>
        To deal with the low inter-variability of the classes in TTStroke-21
and avoid over-fitting on this sample of the dataset, we decided
to use cuboids of optical flow in addition to cuboids of RGB
images with spatio-temporal convolutions processed simultaneously
through a Siamese architecture as presented in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>Optical Flow estimator</title>
      <p>
        As shown in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], flow estimators can have a strong impact on the
classification, so we tested classification using two diferent flow
estimators: DeepFlow [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and Dense Inversive Search - DIS [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
Because of the strong motion artefacts observed on DIS flow, this
one is smoothed with a Gaussian blur using a kernel of size 3 × 3
and then multiplied by the computed foreground [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] to keep only
foreground motion.
2.2
      </p>
    </sec>
    <sec id="sec-4">
      <title>Spatial segmentation</title>
      <p>
        RGB and Optical Flow are spatially segmented using a region of
interest - ROI - of center Croi = (xr oi , yr oi ) estimated from the
maximum of the optical flow norm and the center of gravity of all
pixels [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] as follows:
      </p>
      <p>Cmax = (xmax , ymax ) = arдmax (||D||1)</p>
      <p>x ,y
Cg = (xд, yд ) = Í δ1(C) Í Cδ (C)</p>
      <p>C∈Ω C∈Ω
with δ (C) =
if ||D||1(C) , 0
otherwise
(1)
xr oi = α fωx (xmax , W ) + (1 − α ) fωx (xд, W )
yr oi = α fωy (ymax , H ) + (1 − α ) fωy (xд, H )
with parameters α = 0.6, Ω = (ωx , ωy ) = (320 × 180) the size of
the resized video frames, (W , H ) the size of the data inputted to our
network. The function fω (u, V ) = max (min(u, V − ω2 ), ω2 ) allows
to have input data extracted within the boundaries of our data. To
avoid jittering, we apply a Gaussian blur along the time dimension
to average the center position using a kernel of size 40 and scale
parameter σblur = 4.44.
2.3</p>
    </sec>
    <sec id="sec-5">
      <title>Data normalization</title>
      <p>
        The RGB image channels are normalized by their theoretical
maximum value, 255 in our case, to map them into interval [
        <xref ref-type="bibr" rid="ref1">0,1</xref>
        ]. As done
in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] which compare diferent normalization methods, we decide
to normalize the optical flow V = (vx , vy ) using the mean µ and
standard deviation σ of the maximum absolute values distribution
of each optical flow components over the whole dataset. In the
following equation v and v N represent respectively one component
of the OF V and its normalization.
      </p>
      <p>
        v N (i, j) = vSI′G(i,Nj)(v ′(i, j)) iofth|ve′r(wi,ijs)e| .&lt; 1 (2)
This normalization method maps the values into interval [
        <xref ref-type="bibr" rid="ref1">-1,1</xref>
        ]
and increases the magnitude of most vectors making the optical
lfow easier to process for classification of very similar actions such
as Table Tennis strokes.
      </p>
      <p>v
v ′ = µ +3×σ
2.4</p>
    </sec>
    <sec id="sec-6">
      <title>SSTCNN</title>
      <p>Our Siamese Spatio-Temporal Convolutional Neural Network
SSTCNN, see Fig. 1, is constituted of 2 branches with three 3D
convolutional layers with 30, 60, 80 filter response maps, followed by a
fully connected layer of size 500. They take respectively cuboides of
RGB values and optical flow computed from them of size ( W × H ×
T )= (120 × 120 × 100). The 3D convolutional layers use 3 × 3 × 3
spacetime filters with a dense stride and padding of 1 in each direction.
The two branches are fused through a final fully connected layer
of size 21 followed by a Softmax function to output a probabilistic
classification.
Data augmentation is made online and is diferent for each epoch.
Each stroke feed our SSTCNN once per epoch. For each stroke, we
extract one video sample of size (W × H × T ). The T successive
frames from the RGB and Optical Flow are extracted following a
normal distribution around the center of our stroke with standard
deviation of σ = ∆ t6−T . We also spatially augment the data by
applying random rotation in the range ±10◦, random translation
in range ±0.1 in x and y directions, random homothety in range
1 ± 0.1 and a 0.5 chance flip in horizontal direction and random
channel swaps on the RGB data. We take extra care of applying
those changing on the Optical Flow by updating its values according
to the transformations. Transformations are applied and centered
on the region of interest avoiding crops outside of the camera range.
2.6</p>
    </sec>
    <sec id="sec-7">
      <title>Training and submitted runs</title>
      <p>All models were trained from scratch. We used firstly 250 epochs
with the data samples split randomly between all strokes and then
split using only two videos for validation. However we noticed
the results obtained by splitting the dataset between videos were
not satisfying. After looking at the dataset in detail, this is due to
the fact that most of the videos contain only one kind of stroke
performed by the same player. So the model will over-fit easily
to the player appearance and not the characteristics of the stroke
itself. With such a limited dataset and a limited time window we
preferred to focus on the random distribution of the strokes among
our training and validation sets. The two first runs are the
classiifcation obtained with the model trained on the split dataset and
saved on the minimum loss obtained on the validation set with two
diferent flows presented in section 2.1. The other two runs are the
same models but retrained from scratch using all data samples with
the number of epochs used for obtaining best performance on the
ifrst validation set.
3</p>
    </sec>
    <sec id="sec-8">
      <title>RESULTS</title>
      <p>On the left side of the Table 1 we can see results of the first two
runs from the models trained on the split database with 250 epochs;
and on the right side two others runs obtained from the models
trained with all the data.</p>
      <p>
        Compared to what has been obtained in previous work [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], the
results are very low. The main diferences are i) the lack of a negative
class and ii) the split of the dataset in train and test sets between
videos. It directly leads to an over-fitting of the dataset and makes
the model much less able to do a proper classification. Best results
were obtained by using DeepFlow estimator.
      </p>
      <p>Furthermore, if we consider the confusion matrix of our best run,
Fig. 2, and group strokes in larger classes as: ’Forehand’, ’Backhand’
or ’Service’, ’Ofensive’, ’Defensive’ or their intersection (6 classes),
we respectively get accuracies of 76.8%, 65.8% and 54.8%.
4</p>
    </sec>
    <sec id="sec-9">
      <title>CONCLUSION</title>
      <p>
        Despite a strong over-fitting, by grouping strokes together in larger
classes, we can notice that some characteristics to recognize strokes
are still learned. Furthermore, the work on TTStroke-21 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is
still in progress and the enrichment of the dataset will be a big
contribution in the domain of action detection and classification
especially for very similar actions.
      </p>
    </sec>
    <sec id="sec-10">
      <title>ACKNOWLEDGMENTS</title>
      <p>This work was supported by Region of Nouvelle Aquitaine grant
CRISP and Bordeaux Idex Initiative.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Will</given-names>
            <surname>Kay</surname>
          </string-name>
          , Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, Mustafa Suleyman, and
          <string-name>
            <given-names>Andrew</given-names>
            <surname>Zisserman</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>The Kinetics Human Action Video Dataset</article-title>
          .
          <source>CoRR abs/1705</source>
          .06950 (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Till</given-names>
            <surname>Kroeger</surname>
          </string-name>
          , Radu Timofte, Dengxin Dai, and Luc Van Gool.
          <year>2016</year>
          .
          <article-title>Fast Optical Flow Using Dense Inverse Search</article-title>
          .
          <source>In ECCV (LNCS)</source>
          , Vol.
          <volume>9908</volume>
          . Springer,
          <fpage>471</fpage>
          -
          <lpage>488</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Hildegard</given-names>
            <surname>Kuehne</surname>
          </string-name>
          , Hueihan Jhuang, Estíbaliz Garrote, Tomaso A.
          <string-name>
            <surname>Poggio</surname>
            , and
            <given-names>Thomas</given-names>
          </string-name>
          <string-name>
            <surname>Serre</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>HMDB: A large video database for human motion recognition</article-title>
          .
          <source>In ICCV. IEEE Computer Society</source>
          ,
          <fpage>2556</fpage>
          -
          <lpage>2563</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Pierre-Etienne</surname>
            <given-names>Martin</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jenny</surname>
          </string-name>
          Benois-Pineau, Boris Mansencal, Renaud Péteri, Laurent Mascarilla,
          <string-name>
            <surname>Jordan Calandre</surname>
            , and
            <given-names>Julien</given-names>
          </string-name>
          <string-name>
            <surname>Morlier</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Sports Video Annotation: Detection of Strokes in Table Tennis task for MediaEval 2019</article-title>
          .
          <source>In Proc. of the MediaEval 2019 Workshop</source>
          , Sophia Antipolis, France,
          <fpage>27</fpage>
          -
          <lpage>29</lpage>
          October
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Pierre-Etienne</surname>
            <given-names>Martin</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Jenny</given-names>
            <surname>Benois-Pineau</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Renaud</given-names>
            <surname>Péteri</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Fine-Grained Action Detection and Classification in Table Tennis with Siamese Spatio-Temporal Convolutional Neural Network</article-title>
          .
          <source>In ICIP 2019. IEEE</source>
          ,
          <fpage>3027</fpage>
          -
          <lpage>3028</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Pierre-Etienne</surname>
            <given-names>Martin</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jenny</surname>
            Benois-Pineau,
            <given-names>Renaud</given-names>
          </string-name>
          <string-name>
            <surname>Péteri</surname>
            , and
            <given-names>Julien</given-names>
          </string-name>
          <string-name>
            <surname>Morlier</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Sport Action Recognition with Siamese Spatio-Temporal CNNs: Application to Table Tennis</article-title>
          .
          <source>In CBMI 2018. IEEE</source>
          , 1-
          <fpage>6</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Pierre-Etienne</surname>
            <given-names>Martin</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jenny</surname>
            Benois-Pineau,
            <given-names>Renaud</given-names>
          </string-name>
          <string-name>
            <surname>Péteri</surname>
            , and
            <given-names>Julien</given-names>
          </string-name>
          <string-name>
            <surname>Morlier</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Optimal choice of motion estimation methods for finegrained action classification with 3D convolutional networks</article-title>
          .
          <source>In ICIP 2019. IEEE</source>
          ,
          <fpage>554</fpage>
          -
          <lpage>558</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Khurram</given-names>
            <surname>Soomro</surname>
          </string-name>
          , Amir Roshan Zamir, and
          <string-name>
            <given-names>Mubarak</given-names>
            <surname>Shah</surname>
          </string-name>
          .
          <year>2012</year>
          .
          <article-title>UCF101: A Dataset of 101 Human Actions Classes From Videos in The Wild</article-title>
          .
          <source>CoRR 1212</source>
          .0402 (
          <year>2012</year>
          ). arXiv:
          <volume>1212</volume>
          .
          <fpage>0402</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Philippe</given-names>
            <surname>Weinzaepfel</surname>
          </string-name>
          , Jérôme Revaud, Zaïd Harchaoui, and
          <string-name>
            <given-names>Cordelia</given-names>
            <surname>Schmid</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>DeepFlow: Large Displacement Optical Flow with Deep Matching</article-title>
          .
          <source>In IEEE ICCV. 1385-1392.</source>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Zoran</given-names>
            <surname>Zivkovic</surname>
          </string-name>
          and Ferdinand van der Heijden.
          <year>2006</year>
          .
          <article-title>Eficient adaptive density estimation per image pixel for the task of background subtraction</article-title>
          .
          <source>Pattern Recognition Letters</source>
          <volume>27</volume>
          ,
          <issue>7</issue>
          (
          <year>2006</year>
          ),
          <fpage>773</fpage>
          -
          <lpage>780</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>