簡易檢索 / 詳目顯示

研究生: 葉翰璋
Yeh, Han-Chang
論文名稱: 嵌入式系統方框圖拓撲提取方法
Methods for Extracting Topology from Block Diagram of Embedded System
指導教授: 周百祥
Chou, Pai H.
口試委員: 韓永楷
Hon, Wing-Kai
謝孫源
Hsieh, Sun-Yuan
李皇辰
Lee, Huang-Chen
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Computer Science
論文出版年: 2024
畢業學年度: 112
語文別: 英文
論文頁數: 57
中文關鍵詞: 嵌入式系統電子設計自動化拓譜提取方框圖
外文關鍵詞: Embedded System, Electronic Design Automation, Topologt Extraction, Block Diagram
相關次數: 點閱:83下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 這篇論文提出了一種自動化方法,旨在提取商用現成 (COTS) 元件數據表中的功能模塊圖拓撲結構,以便於構建嵌入式系統。這些方塊圖通常用於說明元件的內部結構或元件在系統架構中的應用。然而,這些圖表目前主要面向人類讀者,他們手動將這些知識應用於設計中,因為現今缺乏能夠利用數據表知識輔助設計師進行錯誤檢查或優化建議的工具。這導致設計人員不得不處理繁瑣且容易出錯的細節,造成設計反覆修改,不僅耗費了零件、印刷電路板 (PCB) 製造和組裝的成本,也耽誤了寶貴的上市時間。為了解決這個問題,需要新一代的設計工具能夠在元件建模中利用數據表知識,而本論文則著重於方塊圖提取這個子問題。

    我們提出的適應性方法結合了物體檢測模型 (RT-DETR) 和光學字符識別 (OCR),以識別方塊和標籤,並使用廣度優先搜索 (BFS) 演算法追踪連接,創建類似圖形的表示,有助於構建元件模型。這種自動化流程顯著提高了分析和解釋方塊圖的效率和準確性。

    實驗結果表明,我們的方法在提取方塊圖中連接拓撲方面顯著優於現有技術,特別是在處理線條粗細、文本樣式和連接器形狀的變化方面。在方塊檢測方面,使用 RT-DETR 也超越了 Yolov5lu 和 Yolov8l 的召回率和 mAP。


    This thesis proposes a method for automatically extracting the topology of functional block diagrams in the datasheets of commercial off-the-shelf (COTS) components for building embedded systems. These block diagrams serve the purpose of illustrating the inner structure of the component or application of the component in the context of a system architecture. Such diagrams have been intended for human readers who apply this knowledge manually to their design, as no tools today can assist designers with error checking or refinement suggestions using datasheet knowledge. As a result, designers are burdened with details that are tedious and error-prone, causing design re-spins that cost not only money for the parts and printed circuit board (PCB) fabrication and assembly, but also valuable time-to-market. To address this problem, a new generation of design tools is needed that makes use of datasheet knowledge in modeling the components, and this thesis represents the subproblem of block-diagram extraction.

    Our adaptable approach addresses the inconsistencies in functional block diagrams by combining object detection models (RT-DETR) and optical character recognition (OCR) to identify blocks and labels, and uses a breadth-first search (BFS) algorithm to trace connections and create a graph-like representation that helps construct the component model. This automated process significantly improves the efficiency and accuracy of analyzing and interpreting block diagrams.

    Experimental results demonstrate that our method significantly outperforms existing techniques in extracting the topology of connections within block diagrams, particularly in handling variations in line thickness, text styles, and connector shapes. It also excels in block detection using RT-DETR, surpassing Yolov5lu and Yolov8l in recall and mAP.

    Contents Contents i Acknowledgments vii 1 Introduction 1 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.1 Datasheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.2 The Need for Intelligent Design Tools . . . . . . . . . . . . . . . . . . . . . 2 1.1.3 Intelligent Design Tools: Our Vision . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.1 Desired Output Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Related Work 9 2.1 Symbol Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.1 Conventional Computer Vision Methods . . . . . . . . . . . . . . . . . . . . 10 2.1.2 Anchor-Based Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.3 Anchor-Free Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2 Link Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 Methodology 14 3.1 Design Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.1 Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.2 Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1.3 Prompting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 Specification Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3 Interface Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.4 Resource Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.5 Structural Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.6 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.7 Scope of This Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4 Problem Statement 18 4.1 Input Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.2 Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2.1 Multi-Hypergraph Recovery from Image (𝐻) . . . . . . . . . . . . . . . . . 21 4.2.2 Visual Representation and Example . . . . . . . . . . . . . . . . . . . . . . 21 4.3 Evaluation Metrics and Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5 Technical Approach 25 5.1 Block Detection Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1.1 Loss Function Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.1.2 RT-DETR Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2 Pre-training and Fine-tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.2.1 Pre-training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.2.2 Fine-tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3 Data Augmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.3.1 Color Distortion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.3.2 Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.3.3 Cropping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.3.4 Flipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.3.5 Resizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.4 Text Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.5 Color Difference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.5.1 Optimizing Color Difference Calculation . . . . . . . . . . . . . . . . . . . 32 5.5.2 Implementation in Our Work . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.6 Post-processing Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.6.1 Association of OCR Text with DETR Bounding Boxes: . . . . . . . . . . . 34 5.6.2 Text Matching and Box Mapping . . . . . . . . . . . . . . . . . . . . . . . . 34 5.6.3 Preprocessing the Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.6.4 Traversal of Bounding Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.7 Parsing the Connections of Component Topology . . . . . . . . . . . . . . . . . . . 37 5.7.1 Breadth-First Search (BFS) for Connection Identification . . . . . . . . . . . 37 5.7.2 Connection Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5.7.3 Output and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6 Implementations 39 6.1 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.2 Software Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.3 Data Extraction and Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.4 Process Flow for Datasheet Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 40 7 Evaluation 41 7.1 Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 7.1.1 Precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 7.1.2 Recall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 7.1.3 mAP50 (Mean Average Precision at 50%) . . . . . . . . . . . . . . . . . . . 42 7.1.4 mAP50-95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 7.2 Comparison and Analysis of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . 43 7.2.1 Analysis of Symbol Detection Performance . . . . . . . . . . . . . . . . . . 44 7.2.2 Comparison of Anchor-based and Anchor-free Models . . . . . . . . . . . . 44 7.3 Comparison and Analysis of Links . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 7.3.1 Comparison of Link Detection Algorithms . . . . . . . . . . . . . . . . . . 45 7.3.2 Analysis of Link Detection Performance . . . . . . . . . . . . . . . . . . . . 46 7.4 Common Prediction Mistakes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 8 Conclusions and Future Work 49 8.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 8.2 Future Work on Block Diagram Parsing . . . . . . . . . . . . . . . . . . . . . . . . 50 Appendix 53 Output Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Block diagram without link(TI AM572) . . . . . . . . . . . . . . . . . . . . . . . . 53 Block diagram with link ( TI DS10BR254) . . . . . . . . . . . . . . . . . . . . . . 54

    [bre24] breezedeus. CNOCR. https://github.com/breezedeus/CnOCR, 2024.
    [CMS+20] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. CoRR, abs/2005.12872, 2020.
    [HZT24] Wenxing Hu, Xianke Zhan, and Minglei Tong. Parsing netlists of integrated circuits from images via Graph Attention Network. Sensors, 24(1), 2024.
    [JCB+20] Glenn Jocher, Ayush Chaurasia, Jirka Borovec, Kalen Michael, Alex Stoken, Yonghye Kwon, Akiyama Akihide, Jason Campbell, Shinya Nakamura, Piotr Skalski, et al. YOLOv5, 2020. Accessed: 2024-08-21 https://github.com/ultralytics/yolov5.
    [JCQ23] Glenn Jocher, Ayush Chaurasia, and Jing Qiu. Ultralytics YOLO, January 2023.
    [LHK+19] Jo-Yu Lo, Da-Yuan Huang, Tzu-Sheng Kuo, Chen-Kuo Sun, Jun Gong, Teddy Seyed, Xing-Dong Yang, and Bing-Yu Chen. AutoFritz: Autocomplete for prototyping virtual breadboard circuits. In Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems, CHI ’19, page 1–13, New York, NY, USA, 2019. Association for Computing Machinery.
    [LXZ+23] Wenyu Lv, Shangliang Xu, Yian Zhao, Guanzhong Wang, Jinman Wei, Cheng Cui, Yuning Du, Qingqing Dang, and Yi Liu. DETRs beat YOLOs on real-time object detection, 2023.
    [SBD+22] Ahmet Emre Sertdemir, Mehmet Besenk, Tugba Dalyan, Y. Daghan Gokdel, and Engin Afacan. From image to simulation: An ANN-based automatic circuit netlist generator (Img2Sim). In 2022 18th International Conference on Synthesis, Modeling, Analysis and Simulation Methods and Applications to Circuit Design (SMACD), pages 1–4, 2022.
    [SKS21] Bernhard Schäfer, Margret Keuper, and Heiner Stuckenschmidt. Arrow R-CNN for handwritten diagram recognition. International Journal on Document Analysis and Recognition(IJDAR), 24(1):3–17, June 2021.
    [CYQ+14] Chu Chengqun, Ren Yongfeng, Zhang Qingzhi, Zheng Yongqiu, and Liu Xin. A small-sized high-performance storage module for high-g measurement. TELKOMNIKA Indonesian Journal of Electrical Engineering, 12, 09 2014.
    [Tex16] Texas Instruments. TIDEP0084 TI Designs: TIDEP-0084 Real-time control demonstration platform with TMS320F280039-Q1, November 2016. https://www.ti.com/lit/ug/tiduci9c/tiduci9c.pdf.
    [Tex23a] Texas Instruments. AM68 Sitara™ Processors, August 2023. Rev A, https://www.ti.com/lit/ds/symlink/am68.pdf.
    [Tex23b] Texas Instruments. CC2651R3 SimpleLink™ Multi-Standard Wireless MCU, July 2023. Rev A, https://www.ti.com/lit/ds/symlink/cc2651r3.pdf.
    [Tex23c] Texas Instruments. TMS320F2800132 Real-Time Microcontrollers, November 2023. RevB, https://www.ti.com/lit/ds/symlink/tms320f2800132.pdf.
    [Tex23d] Texas Instruments. TMS320F280039-Q1 Real-Time Microcontrollers, December 2023.Rev C, https://www.ti.com/lit/ds/symlink/tms320f280039-q1.pdf.
    [vR21] Matej Štorga and Mirko Randić. Recognition of symbols and topology in the image of a dc circuit diagram based on contours and skeletons. In 2021 44th International Convention on Information, Communication and Electronic Technology (MIPRO), pages 1026–1031, 2021.
    [ZCR+22] Yadong Zhang, Yang Chen, Yupei Ren, Man Lan, and Yuefeng Chen. Element information enhancement for diagram question answering with synthetic data. In China Conference on Knowledge Graph and Semantic Computing, pages 78–86. Springer, 2022.

    QR CODE