<!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>ARTEFACT DETECTION AND SEGMENTATION USING CASCADE R-CNN &amp; U-NET Hoang Manh Hung , Phan Tran Dac Thinh , Hyung-Jeong Yang, Soo-Hyung Kim, and Guee-Sang Lee</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Electronic and Computer Engineering, Chonnam National University</institution>
          ,
          <country country="KR">South Korea</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Endoscopy is a widely adopted procedure for the early detection of various types of cancers, therapeutic procedures and minimally invasive surgery. Nevertheless, the efficiency of this method is badly influenced by several artefacts, namely pixel saturations, motion blur, defocus, bubbles, specular reflections, etc. Providing that all of these artefacts are spotted comprehensively, contaminated frame could be restored to an adequate quality in order to better visualize the underlying tissue during diagnosis. In this paper, we present and discuss our methodology of detection and segmentation on endoscopy images. For artefact detection, we modified a deep neural network structure based on the cascade R-CNN with ResNeXt101 as backbone, including the deformable convolutions. Moreover, Feature Pyramid Network is added to refine the raw feature maps, enhancing the performance of feature extraction. In semantic segmentation task, U-Net is utilized with the support of SE-ResNeXt50 as backbone. The classification model appears to be legitimately dominant when compared to other models that we tested. At the end of the Endoscopy Artefact Detection challenge 2020, we attain the mAP score of 0.2366 with the deviation of 0.0762 on the test dataset of detection task and the dice score of 0.5700 on the test dataset of segmentation.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>In the last decade, medical imaging for disease diagnosis and
early treatment has a great step forward thanks to the surge of
machine learning application in computer vision. The
applications of this new technique are indisputably innumerable,
shortening the time of diagnose and accelerating the
treatment. Although the precision of the software related to
medical imaging currently still cannot be compared to that of
experts, recent advances have been proving its auspicious
capabilities of human replacement in differing tasks. Endoscopy
is one of those clinical procedure that can utterly benefit from
this burgeoning technology. In this procedure, a long, thin,
flexible tube along with a light source and a camera at the
*Both authors contributed equally to this manuscript</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).
tip captures the frames inside your body, observing the
uncommon specks which could be indications of disease or
cancer. Unfortunately, diagnosis is made difficult by corrupted
frames with multiple artefacts such as pixel saturations,
motion blur, defocus, fluid, debris, etc. However, a technique
called high-quality endoscopic frame restoration is able to
thoroughly solve this issue if undesired objects are accurately
tracked down. As a result, the task of detecting and
identifying those artefacts is crucial for the procedure of endoscopic
diagnosis. An amendment technique called high-quality
endoscopic frame restoration is able to thoroughly solve this
issue only if undesired objects are accurately tracked down.
Consequently, the task of detecting and identifying those
artefacts is crucial for the procedure of endoscopic diagnosis.
Each endoscopic frame is tainted by multiple artefacts and
the influence of them on each image is not even. Unless
the restoration technique has the knowledge of those artefacts
precise spatial location, the quality of image can be
guaranteed for further diagnosis.</p>
      <p>
        Object detection and segmentation has been gaining a lot
of attraction lately, leading to the advent of many powerful
neural network models. In terms of object detection, Zhang et
al proposed Mask-Aided R-CNN based on Mask R-CNN [1]
to modify its mask header for assisting training on pixel-level
labelled samples. RetinaNet [2] associated with focal loss
was introduced by Lin et al in order to predict bounding boxs
sizes more precisely and cope with class imbalance issue. To
reduce vanishing positive samples for large thresholds and
increase hypotheses quality, Cascade R-CNN [3] with feature
pyramid networks (FPN) [4] was presented by Cai et al. For
object segmentation, U-Net [
        <xref ref-type="bibr" rid="ref1">5</xref>
        ] built by Ronneberger et al is
one of the most popular models. It is favored for multiple
of applications and performs effectively. Moreover, DeepLab
[
        <xref ref-type="bibr" rid="ref2">6</xref>
        ] proposed by Chen et al is a vigorous model because it is
capable of enlarging the field of view of filters for larger
context learning but not compromise with the amount of
computation. With its high capability of global context information
exploitation, Pyramid Scene Parsing (PSP) [
        <xref ref-type="bibr" rid="ref3">7</xref>
        ] network
introduced by Zhao et al is another model that achieved high
record in the task of segmentation.
      </p>
      <p>
        Endoscopy Artefact Detection 2020 (EAD) Challenge [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">8,
9, 10</xref>
        ] is one of the competitions that are interested in
optimizing the automatic artefact detection capability. The challenge
contributes two kinds of labelled data: for detection task, they
provide images with bounding box annotation and for
segmentation task, the data are images with pixel-level
annotation. In this paper, we present two different models for each
task of the EAD challenge after several preliminary tests with
a few models. Cascade R-CNN is utilized for former task
and U-Net with SE-ResNext50 is applied for the latter task.
Both models are discussed in Section 2 and we delineate the
progress of training them in Section 3.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. METHODS</title>
    </sec>
    <sec id="sec-3">
      <title>2.1. Artefact Detection</title>
      <p>
        Our approach is based on Cascade R-CNN [3], which is
trained sequentially by using cascaded bounding box
regression. This network can produce higher quality proposals
during the inference process than other models that we have
tested. In addition, the detector uses the resampling
mechanism which can reduce overfitting with the high intersection
over union (IoU) threshold and also dismiss some outliers.
The backbone ResNeXt-101 (64x4d), following by the
Feature Pyramid Networks (FPN) [4] in a top-down mode as the
neck, increases the networks capability of feature extraction
and improves recall. Furthermore, the deformable
convolution (DCN) [
        <xref ref-type="bibr" rid="ref7">11</xref>
        ] is added into the backbone stage 3 to stage 5,
which assists the model in perceiving the image content and
differentiating the desired objects from the large background.
Our modified model for detection is illustrated in Fig. 1.
      </p>
    </sec>
    <sec id="sec-4">
      <title>2.2. Semantic Segmentation</title>
      <p>
        The mask images for segmentation contain 5 classes, namely
instrument, specularity, artefact, bubbles and saturation. The
distribution of desired objects in each images is not even
and some artefacts doesnt appear much on the background,
especially the case of specularity. Moreover, sometimes,
the mask images are ambiguous when we try to point out
the foreground and background. Therefore, we need a tool
that is powerful enough to solve the previously-mentioned
problems. In this task, after assessing several models for
segmentation, we decide to take the advantage of
segmentation from U-Net [
        <xref ref-type="bibr" rid="ref1">5</xref>
        ] that have been verified through a lot
of papers which include papers about medical segmentation.
Many researches favored U-Net as their main network.
Usually, U-Net is preferred mostly because of its flexible and
interchangeable backbone. The competitive classification
performance of the neural network as backbone will
determine the success of the whole segmentation model. The
higher the accuracy of the backbone can achieve, the better
the U-Net model can tell the difference between desired pixels
and background. Therefore, through a few trials with some
backbones (variants of Resnet, ResNext and SE-ResNeXt),
we choose SE-ResNeXt50 model because of its equilibrium
among strong performance, reasonable computational cost
and acceptable time of training. Some models yielded greater
results than our chosen model but they took us a huge amount
of time to train. SE-ResNeXt50 is a modified version of
ResNeXt model with Squeeze and Excitation blocks [
        <xref ref-type="bibr" rid="ref8">12</xref>
        ],
improving the representational power of a network. This
model can tackle the problem of the imbalanced dataset
better than other models and retrieve more hidden fragments
inside the picture. Furthermore, binary cross entropy loss and
dice loss are combined to deal with the discrete distribution
of the foreground. Another important point is using the
pretrained model of the backbone. Not only does it increase the
accuracy of prediction but also reduces the total amount of
training time. The predicted mask is subsequently applied a
threshold value which is verified earlier. This threshold value
from 0.2 to 0.9 is picked if it satisfies the best result of dice
score on the total dataset.
      </p>
    </sec>
    <sec id="sec-5">
      <title>3. EXPERIMENTAL RESULTS</title>
    </sec>
    <sec id="sec-6">
      <title>3.1. Artefact Detection</title>
      <p>
        In multi-class artefact detection task, the dataset consists of
2531 images and each image can contain one or many classes
in the total of 8 classes, namely specularity, saturation,
artifact, blur, contrast, bubbles, instrument and blood. First, we
preprocess the images by transforming all of them in to the
size of 608x608. Then, they are normalized by our mean and
standard and augmented with random flip and crop.
Stochastic gradient descent is the chosen optimization along with the
initiated learning rate of 0.02. The backbone uses the
pretrained model on COCO dataset (2017) to enhance the
performance of the main model. The 5-fold cross validation is used
for stable deviation. In the testing phase, weights from
training 5 folds are used to detect the online testing dataset.
Nonmax suppression (NMS) [
        <xref ref-type="bibr" rid="ref9">13</xref>
        ] is selected to filter redundant
detections in post-processing for each fold. Subsequently, to
combine the predictions from 5 weights, we employ Weighted
Boxes Fusion (WBF) [
        <xref ref-type="bibr" rid="ref10">14</xref>
        ] method instead of the commonly
NMS. WBF not only deletes redundant boxes but also takes
advantage of information from these boxes to align the final
boxes more accurately. At the end, we get mAP score of
0.2366 with a deviation of 0.0762 in the testing set as shown
in Table 1. The Fig. 2 below is one of our predicted images
from the test dataset.
      </p>
    </sec>
    <sec id="sec-7">
      <title>3.2. Semantic Segmentation</title>
      <p>The challenge provides 643 pixel-level annotation images for
semantic segmentation. The size of images is not fixed so it
needs to be preprocessed before training. There is no
separate validation data so we use 5-fold cross validation to
ensure the correctness of our own evaluation. First, we set the
size of all images into 256x256. The original size of images
is varied and bigger than the normalized size. Empirically,
if the normalized size is set at higher value, the overall
result of segmentation task is absolutely enhanced. Second, we
train the U-Net segmentation model with the backbone
network of SE-ResNeXt50. We also use the pretrained model of
SE-ResNext50 to boost the performance of segmentation and
reduce the duration of training. The backbone is not frozen
for fine-tuning at the beginning. We load the weight of the
backbone and train it at the same time with the main model.
Augmentation is not applied in our training method due to
lower results when it is compared to training without
augmentation on a few lighter-weight neural network models. We did
not check if augmentation could boost the performance of the
model due to lack of time. The GPU we have is Nvidia RTX
2080Ti so we set the batch size of 32. Adam optimizer is used
for our network and the learning is kept constant at 3x10 4.
Due to overlay in pixel-level labels, which means one pixel
could contain more than one class, we train each class once
at the same time. Thus, we have to train 25 times in total for
5 classes, which is evaluated by 5 fold cross validation. The</p>
      <sec id="sec-7-1">
        <title>Dataset Test</title>
      </sec>
      <sec id="sec-7-2">
        <title>Model</title>
        <p>U-Net + SE ResNeXt50
sscore
0.5700
sstd
0.2703
amount of epochs for one training time is 100. The predicted
mask of one class is the average score of 5 model weights
from 5 folds. After training, we find the threshold for our
predicted images. 0.4 is the threshold value which leads us to our
own best score as shown in Table 2.</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>4. CONCLUSION</title>
      <p>In this paper, we demonstrate two verified models for the
EAD2020 Challenge. The difficulty that we met when
participating in this challenge is how to pick up the most suitable
component for our network that performs excellently on the
given dataset. It proves that there are still a lot of approaches
that we havent tested and the development of artefact
detection related to endoscopy is very promising.</p>
    </sec>
    <sec id="sec-9">
      <title>5. ACKNOWLEDGMENT</title>
      <p>This research was supported by the Bio &amp; Medical
Technology Development Program of the National Research
Foundation (NRF) &amp; funded by the Korean government (MSIT)
(NRF-2019M3E5D1A02067961) and a grant (HCRI 19136)
Chonnam National University Hwasun Hospital Institute for
Biomedical Science and National Research Foundation of
Korea(NRF) grant funded by the Korea government(MSIP)
(NRF-2017R1A2B4011409).</p>
    </sec>
    <sec id="sec-10">
      <title>6. REFERENCES</title>
      <p>[1] Kaiming He, Georgia Gkioxari, Piotr Dollr, and Ross
Girshick. Mask r-cnn. IEEE Transactions on Pattern
Analysis and Machine Intelligence, 42, 2020.
[2] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He,
and Piotr Dollr. Focal loss for dense object detection.
IEEE Transactions on Pattern Analysis and Machine
Intelligence, 2017.
[3] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn:
High quality object detection and instance
segmentation. IEEE Transactions on Pattern Analysis and
Machine Intelligence, 2019.
[4] Tsung-Yi Lin, Piotr Dollr, Ross Girshick, Kaiming He,
Bharath Hariharan, , and Serge Belongie. Feature
pyramid networks for object detection. IEEE Conference
on Computer Vision and Pattern Recognition (CVPR),
2017.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Olaf</given-names>
            <surname>Ronneberger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Philipp</given-names>
            <surname>Fischer</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Brox</surname>
          </string-name>
          .
          <article-title>U-net: Convolutional networks for biomedical image segmentation</article-title>
          .
          <source>Lecture Notes in Computer Science: Medical Image Computing and Computer-Assisted Intervention (MICCAI)</source>
          ,
          <volume>9351</volume>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Liang-Chieh</surname>
            <given-names>Chen</given-names>
          </string-name>
          , George Papandreou, Iasonas Kokkinos, Kevin Murphy,
          <string-name>
            <given-names>and Alan L.</given-names>
            <surname>Yuille</surname>
          </string-name>
          . Deeplab:
          <article-title>Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs</article-title>
          .
          <source>IEEE Transactions on Pattern Analysis and Machine Intelligence</source>
          ,
          <volume>40</volume>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Hengshuang</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Jianping</given-names>
            <surname>Shi</surname>
          </string-name>
          , Xiaojuan Qi,
          <string-name>
            <given-names>Xiaogang</given-names>
            <surname>Wang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Jiaya</given-names>
            <surname>Jia</surname>
          </string-name>
          .
          <article-title>Pyramid scene parsing network</article-title>
          .
          <source>IEEE Conference on Computer Vision and Pattern Recognition (CVPR)</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Sharib</given-names>
            <surname>Ali</surname>
          </string-name>
          ,
          <string-name>
            <surname>Felix Zhou</surname>
            , Christian Daul, Barbara Braden, Adam Bailey, Stefano Realdon, James East, Georges Wagnieres, Victor Loschenov,
            <given-names>Enrico</given-names>
          </string-name>
          <string-name>
            <surname>Grisan</surname>
          </string-name>
          , et al.
          <article-title>Endoscopy artifact detection (ead 2019) challenge dataset</article-title>
          .
          <source>arXiv preprint arXiv:1905.03209</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <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="ref6">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Sharib</surname>
            <given-names>Ali</given-names>
          </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="ref7">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Jifeng</surname>
            <given-names>Dai</given-names>
          </string-name>
          , Haozhi Qi, Yuwen Xiong,
          <string-name>
            <given-names>Yi</given-names>
            <surname>Li</surname>
          </string-name>
          , Guodong Zhang, Han Hu, and
          <string-name>
            <given-names>Yichen</given-names>
            <surname>Wei</surname>
          </string-name>
          .
          <article-title>Deformable convolutional networks</article-title>
          .
          <source>IEEE International Conference on Computer Vision</source>
          (ICCV),
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Jie</surname>
            <given-names>Hu</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Li</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Samuel</given-names>
            <surname>Albanie</surname>
          </string-name>
          , Gang Sun, and
          <string-name>
            <given-names>Enhua</given-names>
            <surname>Wu</surname>
          </string-name>
          .
          <article-title>Squeeze-and-excitation networks</article-title>
          .
          <source>IEEE Transactions on Pattern Analysis and Machine Intelligence</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>Alexander</given-names>
            <surname>Neubeck and Luc Van Gool</surname>
          </string-name>
          .
          <article-title>Efficient nonmaximum suppression</article-title>
          .
          <source>18th International Conference on Pattern Recognition (ICPR)</source>
          ,
          <volume>3</volume>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Roman</given-names>
            <surname>Solovyev</surname>
          </string-name>
          and
          <string-name>
            <given-names>Weimin</given-names>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>Weighted boxes fusion: ensembling boxes for object detection models</article-title>
          .
          <source>CoRR</source>
          , abs/
          <year>1910</year>
          .13302,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>