Automatic extraction of sequence diagram semantic information

Kai You Wang, Wei Liu, Yongan Mu, Sheng Dong Gao · 2023

In the realm of software reuse, particular attention has been devoted to the reuse of software design. The UML (Unified Modeling Language) sequence diagram, serving as a dynamic representation, adeptly reflects the evolution and progression of a system. During the software verification phase, it proves instrumental in examining the correctness and consistency of the system. Consequently, the automatic identification and extraction of semantic elements within UML sequence diagrams have become imperative. To address this issue, a Sequence Diagram Extraction (SDE) method based on object detection and text extraction is proposed. This method employs grayscale processing coupled with morphological operations to preprocess distorted images, thereby reducing noise from the original images. The You Only Look Once-version 5 (YOLOv5) algorithm, a deep learning model, is applied to detect each role, object, control focus, and message on the image. Precise localization, segmentation, and cropping of each region are performed. The results are input into the EasyOCR(A text recognition model that has been trained many times) algorithm to execute accurate optical character recognition for every extracted block region. Finally, the detection outcomes undergo semantic merging to obtain comprehensive semantic information for the entire sequence diagram. The effectiveness of the proposed approach is validated through the application of the method to fifty different sequence diagrams, affirming its viability.

Read the paper · More papers on PaperTik