<!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>ENDOSCOPIC ARTEFACT DETECTION USING CASCADE R-CNN BASED MODEL Zhimiao Yu, and Yuanfan Guo</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Shanghai Jiao Tong University</institution>
          ,
          <addr-line>Shanghai</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Accurate detection of artefacts is a core challenge in a widerange of endoscopic applications addressing multiple different disease areas. Our work aims to localise bounding bboxes and predict class labels of 8 different artefact classes for given frames and clinical endoscopy video clips. To solve the task, we use Cascade R -CNN[1] as network architecture and adopt ImageNet pretrained ResNet101[2] as backbone with Feature Pyramid Network (FPN) [3] structure. To improve the network performance, methods like data augmentation and multi-scale are also be adopted. In the end, we analyze the major challenge of the task.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>Endoscopy is a widely used clinical procedure for the early
detection of numerous cancers (e.g., nasopharyngeal,
oesophageal adenocarcinoma, gastric, colorectal cancers,
bladder cancer etc.), therapeutic procedures and minimally
invasive surgery (e.g.,laparoscopy). However, video frames
captured by an endoscope usually contain multiple artefacts,
which not only present difficulty in visualising the
underlying tissue during diagnosis but also affect any post analysis
methods required for follow-ups. Existing endoscopy
workflows are not competent qualified for restoring high-quality
endoscopic frames because they can detect only one artefact
class in most cases. Generally, the same video frame can be
corrupted with multiple artefacts, e.g. motion blur, specular
reflections, and low contrast can be present in the same frame.
Besides, corruption varies with video frames in artefact types.
Therefore, improving detection accuracy is a core challenge
in a wide-range of endoscopic applications.</p>
      <p>
        Recently, deep ConvNets have significant improved
image classification and object detection accuracy[
        <xref ref-type="bibr" rid="ref3">4</xref>
        ]. In deep
learning era, object detection can be grouped into two genres:
“two-stage detection” (e.g. RCNN[
        <xref ref-type="bibr" rid="ref4">5</xref>
        ]) and “one-stage
detection” (e.g. [
        <xref ref-type="bibr" rid="ref5">6</xref>
        ])[
        <xref ref-type="bibr" rid="ref6">7</xref>
        ]. In this task, we use Cascade R-CNN[1]
as network architecture. It is a multi-stage object detection
architecture. The reason we adopt Cascade R-CNN as our
      </p>
      <p>Copyright c 2020 for this paper by its authors. Use permitted under
Creative Commons License Attribution 4.0 International (CC BY 4.0).
network architecture is it achieves state-of-art detection
performance.</p>
    </sec>
    <sec id="sec-2">
      <title>2. DATASETS</title>
      <p>
        The 8 artefact classes in the dataset for “Endoscopic
Artefact Detection” include specularity, specularity saturation,
artifact, blur, contrast, bubbles, instrument and blood. The
visualization of ground truth bboxes are shown in Fig 2. The
artefact detection task will be evaluated based on the results of
the test dataset provided from a subset of the data collected for
training. Specifically, the training dataset for detection
consists in total 2200 annotated frames over all 8 artifact classes
and test dataset 100[
        <xref ref-type="bibr" rid="ref7">8</xref>
        ] [?] [
        <xref ref-type="bibr" rid="ref8">9</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. METHODS</title>
    </sec>
    <sec id="sec-4">
      <title>3.1. Architecture</title>
      <p>
        The model architecture is shown in Fig 1. We use Cascade
R-CNN[1] as network architecture and adopt ImageNet
pretrained ResNet101[2] as backbone with Feature Pyramid
Network (FPN)[
        <xref ref-type="bibr" rid="ref2">3</xref>
        ] structure. Taking the areas of artefacts into
consideration, the anchors base areas are tuned from 162 to
5122 on P 2 to P 6 . Specifically, anchor scales, ratios and
strides are [
        <xref ref-type="bibr" rid="ref7">8</xref>
        ], [0.5, 1.0, 2.0] and [
        <xref ref-type="bibr" rid="ref3 ref7">4, 8, 16, 32, 64</xref>
        ],
respectively.
      </p>
    </sec>
    <sec id="sec-5">
      <title>3.2. Implement Details</title>
      <p>
        For data augmentation, each image will be horizontally
flipped with a 50 percent chance. We replace the nms
operation with the sof t-nms[
        <xref ref-type="bibr" rid="ref9">10</xref>
        ] operation in the architecture and
set the learning rate scheduling strategy as consine decay[
        <xref ref-type="bibr" rid="ref10">11</xref>
        ].
The classification and regression loss function are
CrossEntropyLoss and SmoothL1Loss, respectively. The model is
trained for 24 epochs.
      </p>
      <p>In the experiment, we find that specularity, artifact and
bubbles are hard to classify. A probable reason is these three
artefacts have similar appearance (e.g. Some of them all
appears as spots of light). To solve this problem, we modify
the loss function. In specific, we up-weight loss when model
mistakenly classify these three artefacts. The result turns out
to be an improvement of AP for these three artefacts but a
decline of mAP.</p>
    </sec>
    <sec id="sec-6">
      <title>4. RESULTS</title>
      <p>We randomly divide the data provided into 5 subsets and use
one of them for validation while others for training. The
following metrics are based on the validation set.</p>
    </sec>
    <sec id="sec-7">
      <title>4.1. Data augmentation of resizing</title>
      <p>We report our results obtained from baseline in Table 1. Our
baseline achieves 0:26 mAP. To improve the model
performance, we added image resizing operation to the data
augmentation pipeline. Specifically, each image will be randomly
resized among the range from (512, 512) to (1024, 1024) with
the same aspect ratio as the original. Considering the image
size varies, we believe this operation will be effective.</p>
      <p>The results are shown in Table 2. According to the
results, we argue that resizing operation can obvious improve
the model performance with an increase in mAP of 0.017.
We notice that the improvement is mainly on APsmall. The
main reason is that in most cases the resizing operation
enlarges image size and thus makes it possible to detect more
small objects.</p>
      <p>Note that the scales of test images are often larger than
train images, i.e. images in testset often with height and width
larger than 1000 while images in trainset around 500, so the
resizing operation can solve the scale mismatch problem
between training images and testing images.</p>
    </sec>
    <sec id="sec-8">
      <title>4.2. Difficult classification among specularity, artifact and bubbles</title>
      <p>In the experiment, we found that network has some
difficulties in distinguishing classes among specularity, artifact and
bubbles. To demonstrate the problem clearly, we calculated
the confusion matrix, which is shown in Table 4. According
to the Table 4, the network has two drawbacks. Firstly, the
network tends to confuse specularity, artifact and bubbles in
the classification procedure. Secondly, the network has poor
performance in detecting blur.</p>
      <p>To solve the first problem, we modified the loss
function. Specifically, we increased the loss weights to the
misclassification of specularity, artifact and bubbles. The result
turned out to be an improvement of AP for these three
artefacts but a decline for mAP.</p>
    </sec>
    <sec id="sec-9">
      <title>4.3. Qualitative Results</title>
      <p>To find out what kinds of artefact our model can successfully
detect, we show some qualitative results in Fig 3 and Fig 4.
The qualitative results indicate a). for artefacts with not so
small size, our model tends to generate accurate detections;
b). more artefacts in an image lead to more difficulties in
detecting; c). our model generates a fair number of true negative
blur. We are not sure the reason for problem c) mentioned
above is whether the shortcomings of the model itself or the
absence of annotation blur, because the corresponding images
show blur characters.</p>
    </sec>
    <sec id="sec-10">
      <title>4.4. Leaderboard Result</title>
      <p>to 300. Then we used the model to obtain the testset results
and the performance is shown in Table 3.</p>
    </sec>
    <sec id="sec-11">
      <title>5. DISCUSSION &amp; CONCLUSION</title>
      <p>In our work, we found the major challenge in “Endoscopic
Artefact Detection” task is the difficult classification among
specularity, artifact and bubbles. One intuitive explanation is
that some of them all appears as spots of light, sharing a high
degree of similarity. In the future, we intend to train 3 separate
classifiers for these 3 artefacts and adopt more advanced
feature extraction networks, which may solve this challenge to
some extent. Boxes ensemble method was performed in our
experiment. However, it seemed this method caused lower
mAP.</p>
      <p>To sum up, we constructed a Cascade R-CNN based
model to solve the “Endoscopic Artefact Detection” task.
We adopted several methods to improve the network
performance, including data augmentation, modifying loss function
and boxes ensemble. We also identified the major challenge
in this task.</p>
    </sec>
    <sec id="sec-12">
      <title>6. REFERENCES</title>
      <p>We added image resizing operation to the data augmentation
pipeline and fine-tuned the maximum box number per image
[1] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn:
Delving into high quality object detection. In
Proceedings of the IEEE conference on computer vision and
pattern recognition, pages 6154–6162, 2018.
[2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian
Sun. Deep residual learning for image recognition. In
Proceedings of the IEEE conference on computer vision</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <source>and pattern recognition</source>
          , pages
          <fpage>770</fpage>
          -
          <lpage>778</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Tsung-Yi</surname>
            <given-names>Lin</given-names>
          </string-name>
          , Piotr Dolla´r, Ross Girshick, Kaiming He,
          <string-name>
            <surname>Bharath Hariharan</surname>
            , and
            <given-names>Serge</given-names>
          </string-name>
          <string-name>
            <surname>Belongie</surname>
          </string-name>
          .
          <article-title>Feature pyramid networks for object detection</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          , pages
          <fpage>2117</fpage>
          -
          <lpage>2125</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Ross</given-names>
            <surname>Girshick. Fast</surname>
          </string-name>
          r-cnn.
          <source>In Proceedings of the IEEE international conference on computer vision</source>
          , pages
          <fpage>1440</fpage>
          -
          <lpage>1448</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Ross</given-names>
            <surname>Girshick</surname>
          </string-name>
          , Jeff Donahue, Trevor Darrell, and
          <string-name>
            <given-names>Jitendra</given-names>
            <surname>Malik</surname>
          </string-name>
          .
          <article-title>Region-based convolutional networks for accurate object detection and segmentation</article-title>
          .
          <source>IEEE transactions on pattern analysis and machine intelligence</source>
          ,
          <volume>38</volume>
          (
          <issue>1</issue>
          ):
          <fpage>142</fpage>
          -
          <lpage>158</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Joseph</given-names>
            <surname>Redmon</surname>
          </string-name>
          , Santosh Divvala,
          <string-name>
            <surname>Ross Girshick</surname>
            , and
            <given-names>Ali</given-names>
          </string-name>
          <string-name>
            <surname>Farhadi</surname>
          </string-name>
          .
          <article-title>You only look once: Unified, real-time object detection</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          , pages
          <fpage>779</fpage>
          -
          <lpage>788</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Zhengxia</given-names>
            <surname>Zou</surname>
          </string-name>
          , Zhenwei Shi,
          <string-name>
            <given-names>Yuhong</given-names>
            <surname>Guo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Jieping</given-names>
            <surname>Ye</surname>
          </string-name>
          .
          <article-title>Object detection in 20 years: A survey</article-title>
          . arXiv preprint arXiv:
          <year>1905</year>
          .05055,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Sharib</given-names>
            <surname>Ali</surname>
          </string-name>
          , Felix Zhou, Barbara Braden, Adam Bailey, Suhui Yang, Guanju Cheng, Pengyi Zhang, Xiaoqiong Li,
          <string-name>
            <given-names>Maxime</given-names>
            <surname>Kayser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Roger D.</given-names>
            <surname>Soberanis-Mukul</surname>
          </string-name>
          , Shadi Albarqouni, Xiaokang Wang,
          <string-name>
            <surname>Chunqing</surname>
            <given-names>Wang</given-names>
          </string-name>
          , Seiryo Watanabe, Ilkay Oksuz, Qingtian Ning, Shufan Yang, Mohammad Azam Khan, Xiaohong W. Gao, Stefano Realdon, Maxim Loshchenov, Julia A.
          <string-name>
            <surname>Schnabel</surname>
          </string-name>
          , James E. East, Geroges Wagnieres, Victor B.
          <string-name>
            <surname>Loschenov</surname>
            , Enrico Grisan, Christian Daul, Walter Blondel, and
            <given-names>Jens</given-names>
          </string-name>
          <string-name>
            <surname>Rittscher</surname>
          </string-name>
          .
          <article-title>An objective comparison of detection and segmentation algorithms for artefacts in clinical endoscopy</article-title>
          .
          <source>Scientific Reports</source>
          ,
          <volume>10</volume>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Sharib</given-names>
            <surname>Ali</surname>
          </string-name>
          , Felix Zhou, Adam Bailey, Barbara Braden, James East, Xin Lu, and
          <string-name>
            <given-names>Jens</given-names>
            <surname>Rittscher</surname>
          </string-name>
          .
          <article-title>A deep learning framework for quality assessment and restoration in video endoscopy</article-title>
          .
          <source>arXiv preprint arXiv:1904.07073</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Navaneeth</surname>
            <given-names>Bodla</given-names>
          </string-name>
          , Bharat Singh,
          <string-name>
            <given-names>Rama</given-names>
            <surname>Chellappa</surname>
          </string-name>
          , and Larry S Davis.
          <article-title>Soft-nms-improving object detection with one line of code</article-title>
          .
          <source>In Proceedings of the IEEE international conference on computer vision</source>
          , pages
          <fpage>5561</fpage>
          -
          <lpage>5569</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Tong</surname>
            <given-names>He</given-names>
          </string-name>
          , Zhi Zhang, Hang Zhang, Zhongyue Zhang, Junyuan Xie, and
          <string-name>
            <given-names>Mu</given-names>
            <surname>Li</surname>
          </string-name>
          .
          <article-title>Bag of tricks for image classification with convolutional neural networks</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source>
          , pages
          <fpage>558</fpage>
          -
          <lpage>567</lpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>