<!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>A Preliminary Framework for Recognizing iStar Hand Drafts</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yuran Zhu</string-name>
          <email>zhuyuran@emails.bjut.edu.cn</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tong Li</string-name>
          <email>litong@bjut.edu.cn</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Beijing University of Technology</institution>
          ,
          <addr-line>100 Ping Le Yuan, Beijing 100124</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <fpage>7</fpage>
      <lpage>12</lpage>
      <abstract>
        <p>Despite the rapid development of iStar modeling tools, drafting iStar models on paper is convenient for illustration purposes and can be inspiring during brainstorming sessions. Digitizing such hand drafts and generating corresponding model files can enable modelers to save and reuse model snippets. This paper presents a preliminary technical framework for achieving this goal. Adopting the divide and conquer strategy, the proposed framework consists of three separate recognition modules dealing with node recognition, text recognition, and element composition. Upon implementing the framework, the recognized model drafts will be transformed into iStarML files to be easily imported to iStar modeling tools. This paper focuses on discussing the feasibility of the proposed approach and presents some preliminary.</p>
      </abstract>
      <kwd-group>
        <kwd>iStar model</kwd>
        <kwd>Hand draft</kwd>
        <kwd>Model recognition</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Despite the rapid development of iStar modeling tools [
        <xref ref-type="bibr" rid="ref1 ref2">1,2</xref>
        ], drafting iStar models on
paper is still popular given the convenience of producing illustrations by hand.
However, hand drafts of iStar models are difficult to archive and reuse. One solution
to this problem can be digitizing such hand drafts. The major challenge in
implementing this solution is the lack of methods for precise recognition of the
graphic iStar notations and assembling them into an iStar model.
      </p>
      <p>
        One existing relevant method uses a support vector machine (SVM) to recognize
nodes [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. However, SVMs do not support multi-object detection. Object detection
using deep learning provides another option [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Given the similarity between the
node and object detection tasks, it is possible to apply object detection methods to
recognize nodes in iStar hand drafts.
      </p>
      <p>This paper presents a preliminary framework for automatically recognizing iStar hand
drafts and generating corresponding iStar model files while preserving the position
* Corresponding author
Copyright © 2020 for this paper by its authors. Use permitted under
Creative Commons License Attribution 4.0 International (CC BY 4.0).
information of all drafted elements. In particular, the paper reports on our ongoing
research on the text recognition and element composition modules with an emphasis
on discussing the feasibility, advantages, and disadvantages of our proposal.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Proposal</title>
      <p>
        The proposed framework for transforming iStar hand drafts to iStarML files
comprises six modules: preprocessing, node recognition, edge recognition, text
recognition, element composition, and outputting iStarML files. Some parts of the
framework are simplified based on some features of the iStar 2.0 model such as the
arrangement in position of parent and child nodes. The framework takes original
images as input and outputs corresponding iStarML files. Fig. 1 illustrates the
modules and data flows within the framework.
The preprocessing module takes an original image as input and outputs the
corresponding binarized and grayscale processed images. This module first converts
three-channel RGB images to one-channel original grayscale images. After that,
image denoising algorithms such as NL-Means Algorithm [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] would be applied to the
original grayscale images to remove noise and output denoised grayscale images.
Binarized images would be generated based on the denoised grayscale images. For the
convenience of applying edge recognition using Breadth First Search (BFS), the
denoised grayscale images should be transformed to matrices of 0s and 1s, where 0
represents “white” and 1 represents “black.” Any pixel under an empirical threshold
selected manually would be set to 0; otherwise, pixels would be set to 1. Resizing the
denoised grayscale images is not necessary in the proposed framework given that it
uses the YOLOv3 network [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] in the node recognition module. If another method is
employed for node recognition, then resizing may become necessary.
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Among other YOLOv3 network architectures, YOLOv3-tiny network was
selected as it can be easily trained using a small amount of training data; it was also
found to perform well enough in the node recognition task.
      </p>
      <p>The node recognition module of the proposed framework takes the denoised grayscale
image output by the preprocessing module as input and outputs node information
comprising the category and position of the node. Fig. 2 shows the preliminary node
recognition result generated by the YOLOv3-tiny network. While the preliminary
result was obtained using a software draft rather than a hand draft, the network is
expected to perform well in recognizing hand drafts after collecting enough
handdraft samples for training the network.
In the future implementation, elements containing the information of edges, such as
whether the arrow is present at the tail of an edge, will be added to the node
recognition module. While the module will not recognize edges as objects, it will
indicate their types.
2.3</p>
      <sec id="sec-2-1">
        <title>Text Recognition</title>
        <p>
          While text recognition is a well-developed area [
          <xref ref-type="bibr" rid="ref7 ref8">7-8</xref>
          ], associating recognized text with
iStar nodes is still a remaining task. In the proposed framework, node information and
its denoised grayscale image are fed into the text recognition module. A text
recognition method would be applied only to the pixels within the border of an iStar
node; then, the result of text recognition would be associated with the specific iStar
node that shares the same area in the image. The combination of a convolutional
neural network (CNN), Seq2Seq, and an attention network is selected as the text
recognition method [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
2.4
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Edge Recognition</title>
        <p>In the preliminary framework, all edges in an image are assumed to be solid lines. The
basic idea of solving the edge recognition problem is that one node is associated with
another node if the head and tail of an edge are close enough to these nodes
separately. To quantify the notion of “close enough,” a concept called buffer area is
introduced. The buffer area is a rectangular area around a node, which indicates the
potential area where an edge starts or ends. Fig. 3 shows the buffer area around a
node. The edge recognition module would generate edge recognition result
comprising a pair of nodes associated together as output.</p>
        <p>If the head and tail of an edge fall into the buffer area of two nodes separately, then
these two nodes would be associated together. After detecting all nodes in an image,
the edge recognition module would retrieve the position of all the nodes from node
information generated by the node recognition module. The edge recognition module
would iterate through all the nodes sequentially. For each node, all its pixels would be
scanned through. If any pixel is 1, it would be fed as the start of the BFS process. The
BFS method would search through all the adjacent black pixels set to 1. If any black
pixel falls into any buffer area, then the node that buffer area belongs to would be
associated with the node containing the pixel used as the start of the BFS process.
Fig. 3. Buffer Area around a Node Fig. 4. Process of Associating Two
Nodes illustrates the process of associating two nodes.
Considering that pictures of hand drafts can be taken from different distances and
angles, the buffer area may appear on a different scale, leading to different results
from the same image. To solve this problem, the ratio of the node scale is set to be the
criterion for determining the scale of the buffer area.</p>
        <p>During the BFS process, if an edge overlaps with the area of any node containing the
element representing edge types, then the framework would mark that edge as being
of the found type. Considering the rules of refinement, edges pointing to one specific
parent node should be of the same type. While the edge recognition module may fail
to recognize and mark some edges correctly, the framework would still be able to
mark the remaining edges pointing to a specific parent node correctly, as long as the
type of any one edge pointing to that parent node is determined, which makes the
proposed framework robust.
To recognize the type of each edge, it is necessary to identify the parent node of a pair
of nodes. To simplify this task, a parent node can be considered as a node above a
child node. The framework exploits the positions of nodes output by the node
recognition module to determine whether a node is s parent or child node in a pair of
nodes.
2.5</p>
      </sec>
      <sec id="sec-2-3">
        <title>Element Composition &amp; Outputting iStarML File</title>
        <p>The element composition module would take the edge recognition result, node
information, and text recognition result as input, and output the structural
representation of the identified elements. Due to the modular architecture on the
proposed framework, the results necessary for generating a final iStarML file do not
share a uniform representation. In the element composition module, the edge
recognition result, node information, and text recognition result would be merged to a
uniform and structural representation of all elements representing the entire iStar
model structure in the original image. The output iStarML file module would take the
structural representation of all elements as input and output an iStarML file, which
could be easily imported to iStar modeling tools.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Related Work</title>
      <p>
        There are several related studies aiming at solving the problem of transforming iStar
hand drafts into machine-readable model files, e.g., iStarML files. For example,
Gilbert and Rusli [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] applied a faster R-CNN network to detect separate elements in
hand-drafted iStar models; however, the authors did not address the relationship
recognition task and thus cannot assemble separate elements to form a complete
digital iStar model. Wu and Zhang used an SVM to classify nodes of a hand draft [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ];
however, traditional SVMs do not support multi-object detection and thus require
grouping the elements of an input image in advance.
      </p>
      <p>
        Shi and Luo [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] employed Random Forest to classify nodes according to their types
but not to construct complete models out of them. Feng and Zhao used the
Sketchsemantic Net, which combines AlexNet and WordNet, to transform model hand drafts
to machine-readable files [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. This approach relies on the semantic information
within nodes to determine the relationship between nodes. However, the semantic
information does not always reflect the relationship explicitly.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion &amp; Discussion</title>
      <p>This paper presented a preliminary framework for recognizing iStar hand drafts and
transforming them to iStarML files. The proposed framework consists of six modules,
namely, preprocessing, node recognition, edge recognition, text recognition, element
composition, and outputting iStarML files. We, in this paper, focus on discussing the
feasibility, advantages, and disadvantages of the methods employed in the proposed
framework, shedding light on plausible improvements in the future. As for our next
step work, for one thing, we plan to develop a prototype tool that implements our
proposed approach; for another thing, we aim to conduct case studies with iStar
modelers and iteratively improve our approach based on their feedback.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgment</title>
      <p>This work is partially supported by the National Natural Science of Foundation of
China (No.61902010), Beijing Excellent Talent Funding-Youth Project
(No.2018000020124G039), and Engineering Research Center of Intelligent
Perception and Autonomous Control, Ministry of Education.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Jennifer</given-names>
            <surname>Horkoff</surname>
          </string-name>
          ,
          <string-name>
            <surname>Neil A. M. Maiden.</surname>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Creative Leaf: A creative iStar modeling tool</article-title>
          .
          <year>2015</year>
          iStar, pp.
          <fpage>25</fpage>
          -
          <lpage>30</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Yiwen</given-names>
            <surname>Chen</surname>
          </string-name>
          , Yuanpeng Wang, Yixuan Hou,
          <string-name>
            <surname>Yunduo Wang.</surname>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>T-Star: A Text-Based iStar Modeling Tool</article-title>
          . 2019 IEEE International Conference on Requirements Engineering, pp.
          <fpage>490</fpage>
          -
          <lpage>491</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Jie</surname>
            <given-names>Wu</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liqing Zhang.</surname>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Sketch recognition with natural correction and editing</article-title>
          , pp.
          <fpage>951</fpage>
          -
          <lpage>957</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Zhong-Qiu</surname>
            <given-names>Zhao</given-names>
          </string-name>
          , Peng Zheng,
          <string-name>
            <surname>Shou-Tao</surname>
            <given-names>Xu</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xindong Wu.</surname>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>Object detection with deep learning: A review</article-title>
          .
          <source>2019 IEEE Transactions on Neural Networks</source>
          , vol.
          <volume>30</volume>
          , issue. 11, pp.
          <fpage>3212</fpage>
          -
          <lpage>3232</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>A.</given-names>
            <surname>Buades</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Coll</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.-M. Morel.</surname>
          </string-name>
          (
          <year>2005</year>
          ).
          <article-title>A non-local algorithm for image denoising</article-title>
          .
          <source>2005 Computer Vision and Pattern Recognition</source>
          , vol.
          <volume>2</volume>
          ,
          <issue>issue</issue>
          . 2, pp.
          <fpage>60</fpage>
          -
          <lpage>65</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Joseph</given-names>
            <surname>Redmon</surname>
          </string-name>
          , Ali Farhadi. (
          <year>2018</year>
          ).
          <article-title>YOLOv3: An Incremental Improvement</article-title>
          .
          <year>2018</year>
          arXiv:
          <article-title>Computer Vision</article-title>
          and Pattern Recognition.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>D</given-names>
            <surname>Ghosh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T</given-names>
            <surname>Dube</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A P</given-names>
            <surname>Shivaprasad.</surname>
          </string-name>
          (
          <year>2010</year>
          ). Script
          <string-name>
            <surname>Recognition-A Review</surname>
          </string-name>
          .
          <source>2010 IEEE Transactions on Pattern Analysis and Machine Intelligence</source>
          , vol.
          <volume>32</volume>
          , issue. 12, pp.
          <fpage>2142</fpage>
          -
          <lpage>2161</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Pratik</given-names>
            <surname>Madhukar</surname>
          </string-name>
          <string-name>
            <given-names>Manwatkar</given-names>
            ,
            <surname>Kavita</surname>
          </string-name>
          <string-name>
            <given-names>R.</given-names>
            <surname>Singh</surname>
          </string-name>
          . (
          <year>2015</year>
          ).
          <article-title>A technical review on text recognition from images</article-title>
          .
          <source>2015 IEEE International Conference on Intelligent Systems and Control</source>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Tao</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <article-title>Tianyi Zhou, Guodong Long</article-title>
          ,
          <string-name>
            <given-names>Jing</given-names>
            <surname>Jiang</surname>
          </string-name>
          , et al. (
          <year>2018</year>
          ).
          <article-title>DiSAN: Directional SelfAttention Network for RNN/CNN-Free Language Understanding</article-title>
          .
          <source>2018 National Conference on Artificial Intelligence</source>
          , pp.
          <fpage>5446</fpage>
          -
          <lpage>5455</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Nathanael</surname>
            <given-names>Gilbert</given-names>
          </string-name>
          , Andre Rusli. (
          <year>2020</year>
          ).
          <article-title>Single object detection to support requirements modeling using faster R-CNN</article-title>
          .
          <source>2020 TELKOMNIKA Telecommunication Computing Electronics and Control</source>
          , vol.
          <volume>18</volume>
          ,
          <issue>issue</issue>
          . 2, pp.
          <fpage>830</fpage>
          -
          <lpage>838</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Dapeng</surname>
            <given-names>Shi</given-names>
          </string-name>
          , Bin
          <string-name>
            <surname>Luo</surname>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Research in Domain-oriented Sketch Recognition Method</article-title>
          . Nanjing University.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Chencheng</surname>
            <given-names>Feng</given-names>
          </string-name>
          , Peng
          <string-name>
            <surname>Zhao</surname>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>The Research of Sketch Recognition Combining with Semantic Information</article-title>
          . Anhui University.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>