簡易檢索 / 詳目顯示

研究生: 沈詮鈞
Shen, Quan-Jun
論文名稱: 應用深度學習模板匹配於嵌入式UVW對位平台
Embedded UVW Alignment Platform using Deep Learning-Based Template Matching
指導教授: 連震杰
Lien, Jenn-Jier
共同指導教授: 郭淑美
Guo, Shu-Mei
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Department of Computer Science and Information Engineering
論文出版年: 2021
畢業學年度: 109
語文別: 英文
論文頁數: 124
中文關鍵詞: 對位補正模板匹配嵌入式系統旋轉尺寸位移不變性演算法CUDA深度學習逆合成空間變換網路
外文關鍵詞: alignment system, template matching, embedding system, rotation-scale-translation invariant algorithm, CUDA, deep learning, inverse compositional spatial transformation network
相關次數: 點閱:164下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 在工業工程作業中,「對位補正」是產線中非常重要的一環。因此,一項準確且快速的對位演算法:結合模板匹配的技術,依照匹配結果做補正對位,是必要的。本篇研究因應合作公司-東捷科技之產學合作計畫,使用NVIDA嵌入式系統結合UVW對位硬體平台開發對位補正系統,研發最少只需進行一次性偵測之對位演算法:先透過尋找UVW平台虛擬中心點,以及像素與實際距離之換算後,定位參考點位,再透過向量運算來找出待補正位置與參考點座標之旋轉、位移差距,以操控可程式邏輯控制器與步進馬達的移動流程;最終,在目標參考點位與對位結果之距離誤差小於0.02 mm情況下,平均對位次數為1.69次,且達到控制自動化。此外,一款優良的模板匹配演算法影響對位效能甚巨,在模板匹配子系統中,本研究改良原始旋轉尺度位移不變性(RST)演算法,並加入CUDA 應用程式介面利用GPU加速計算,來達到即時模板匹配的需求;其結果於來源影像解析度為1.3M像素之情況下,可達低於100毫秒之運行速度。另外,由於現今硬體計算能力提升、深度學習神經網路成為資訊領域研究趨勢,為解決傳統的模板匹配演算法需針對不同來源影像調整參數的問題,本研究也嘗試尋找深度學習對於模板匹配的結合應用:使用逆合成空間變換網路(IC-STN),學習物體旋轉量、逼近模板之型樣,實現旋轉目標物之模板匹配演算法;並且使用CNN網路對模板與來源影像作特徵擷取,以提高模板匹配結果的正確性,以及對不同來源影像的適應性。

    In industrial engineering, "alignment" is a significant part of the production line. Therefore, an accurate and fast alignment algorithm: combined with template matching technology, it is necessary to make corrections and alignments according to the matching results. Following the plan of the partner company Contrel, this research uses NVIDIA embedded system combined with the UVW alignment hardware platform to develop an alignment system. We develop an alignment algorithm that require at least one-time detection. First, find the virtual center point of the UVW platform and convert the pixel to the millimeter unit. Second, locate the reference point. Third, find the rotation and displacement difference between the position to be corrected and the coordinate of the reference point through vector operations to control the programmable logic controller (PLC) and movement process of the stepping motors; Finally, when the distance of error between the reference points and alignment result points is less than 0.02 mm, the average of alignment times is 1.69, and it can be controlled automatically. In addition, a good template matching algorithm has a massive impact on the alignment system. In the template matching subsystem, this research proposes the modified Rotation-Scale-Translation Invariant (RST) algorithm. It adds the CUDA application interface to use GPU to accelerate the calculation to meet the needs of real-time template matching; as a result, when the source image resolution is 1.3M pixels, the cost time can be less than 100 milliseconds. Besides, due to the improvement of hardware computing power and the development of deep learning neural networks as a research trend in the computer science field. This research also tries to find the combination of deep learning for template matching, using inverse compositional spatial transformation network (IC-STN), learning the amount of object rotation, and approximating the template; we also use the CNN network to extract features from the template and source images. Goal to improve the accuracy of template matching results.

    摘要 I Abstract III 誌謝 V Contents VII Figure of Contents X Table of Contents XIV Chapter 1. Introduction 1 1.1 Motivation and Objective 3 1.2 Related Works 5 1.3 Global Framework 7 1.4 Contributions 9 Chapter 2. System Setup and Function Specification 11 2.1 Hardware Specifications: UVW Alignment Platform 11 2.1.1 PLC Communication 12 2.1.2 Hardware Specifications: Camera and Lens 15 2.1.3 Hardware Specifications: Embedded System 17 2.2 Function Specifications 19 Chapter 3. Embedded UVW Alignment System using Template Matching 23 3.1 Find Alignment Parameters by 11 points Calibration 26 3.2 Setting Reference Points 31 3.3 PCB Alignment Process using Vector Operation 32 3.4 Experimental Results 40 Chapter 4. Template Matching by Modified Rotation-Scale-Translation Algorithm 44 4.1 Template Matching by Modified Rotation-Scale-Translation Algorithm 46 4.1.0 Step 0 – Preprocessing 46 4.1.1 Step 1 – Circular Sampling Filter (Cifi) 51 4.1.2 Step 2 – Radial Sampling Filter (Rafi) 56 4.1.3 Step 3 – Template Matching Filter (Tefi) 59 4.1.4 Merge Process – Non-Maximum Suppression (NMS) 65 4.1.5 Summary – Comparation with Original and Modified RST 67 4.2 Template Matching by CUDA-Based RST Algorithm 68 4.3 Experimental Results 73 4.3.1 Evaluate the Speedup Method of Modified RST 75 4.3.2 Testing on Db2 EureSystem Datasets 82 Chapter 5. Template Matching by Deep Learning-base Method 89 5.1 Training and Inference Framework 89 5.2 Rotation Estimation of Affine Transformation using Siamese IC-STN 96 5.3 Displacement Estimation using Siamese CNN 101 5.4 Experimental Results 104 5.4.1 Training History and Inference Results of Siamese IC-STN 106 5.4.2 Training History and Inference Results of Siamese CNN 108 5.4.3 Example of Matching Results 110 Chapter 6. Conclusion and Future Works 112 Reference 113 Appendix A. Normalized Cross Correlation (NCC) 116 A.1 Normalized Cross Correlation 116 A.2 Modified Normalized Cross Correlation (Modified NCC) 117 Appendix B. 2D Planar Transformation Models 119 B.1 Affine Transformation 119 B.2 Projective Transformation 121 Appendix C. Coordinate Modeling – Normalized Device Coordinates 122 Appendix D. Space to Depth Layer 124

    [1] S. Baker and I. Matthews, “Lucas-kanade 20 years on: A unifying framework,” International Journal of Computer Vision, vol. 56, no. 3, pp. 221-255, 2004.
    [2] L. Bertinetto, J, Valmadre, J.F. Henriques, A. Vedaldi, and P.H.S. Torr, “Fully-convolutional siamese networks for object tracking,” in European Conference on Computer Vision, pp. 850-865, 2016.
    [3] K. Briechle and U.D. Hanebeck, “Template matching using fast normalized cross correlation,” in Optical Pattern Recognition XII, vol. 4387, pp. 95-102, 2001.
    [4] D. Buniatyan, T. Macrina, D. Ih, J. Zung, and S. Seung, “Deep learning improves template matching by normalized cross correlation,” arXiv preprint arXiv:1904.02917, 2017.
    [5] D. Buniatyan, S. Popovych, D. Ih, T. Macrina, J. Zung, and H.S. Seung, “Weakly supervised deep metric learning for template matching,” in Science and Information Conference, pp. 39-58, 2019.
    [6] C.H. Chang, C.N. Chou, and E.Y. Chang, “Clkn: Cascaded lucas-kanade networks for image alignment,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2213-2221, 2017.
    [7] J. Cheng, Y. Wu, W. Abd-Almageed, and P. Natarajan, “QATM: Quality-aware template matching for deep learning,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11553-11562, 2019.
    [8] X. Han, T. Leung, Y. Jia, R. Sukthankar, and A.C. Berg, “Matchnet: Unifying feature and metric learning for patch-based matching,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3279-3286, 2015.
    [9] A.G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam, “Mobilenets: Efficient convolutional neural networks for mobile vision applications,” arXiv preprint arXiv:1704.04861, 2017.
    [10] J. Hui, “"CUDA Tutorial",” Jhui.github.io, 2017. [Online]. Available: https://jhui.github.io/2017/03/06/CUDA/. [Accessed: 22- Jan- 2021]
    [11] Y.M. Hung and Y.C. Wang, “A general auto-alignment algorithm for three-degree freedom stage by local inverse information with regression method,” in International Conference on Intelligent Information Hiding and Multimedia Signal Processing, pp. 175-182, 2017.
    [12] M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu, “Spatial transformer networks,” arXiv preprint arXiv:1506.02025, 2015.
    [13] H.Y. Kim and S.A. De Araújo, “Grayscale template-matching invariant to rotation, scale, translation, brightness and contrast,” in Pacific-rim Symposium on Image and Video Technology, pp. 100-113, 2007.
    [14] J. Koo, J. Seo, S. Jeon, J. Choe, and T. Jeon, “RBox-CNN: Rotated bounding box based CNN for ship detection in remote sensing image,” in Proceedings of the 26th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 420-423, 2018.
    [15] J.P. Lewis, “Fast normalized cross-correlation,” in Proceedings of Vision Interface, pp. 120-123, 1995.
    [16] C.H. Lin and S. Lucey, “Inverse compositional spatial transformer networks,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2568-2576, 2017.
    [17] I. Rocco, R. Arandjelovic, and J. Sivic, “Convolutional neural network architecture for geometric matching,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6148-6157, 2017.
    [18] C.Y. Wang, H.Y. Liao, Y.H. Wu, P.Y. Chen, J.W. Hsieh, and I.H. Yeh, “CSPNet: A new backbone that can enhance learning capability of CNN,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pp. 390-391, 2020.
    [19] S. Zagoruyko and N. Komodakis, “Learning to compare image patches via convolutional neural networks,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4353-4361, 2015.
    [20] Z.H. Zhou, “A brief introduction to weakly supervised learning,” National Science Review, vol. 5, no. 1, pp. 44-53, 2018.

    無法下載圖示 校內:2026-10-14公開
    校外:2026-10-14公開
    電子論文尚未授權公開,紙本請查館藏目錄
    QR CODE