Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2024, Vol. 58 Issue (12): 2459-2468    DOI: 10.3785/j.issn.1008-973X.2024.12.005
    
Solar cell defect segmentation model based on improved SegFormer
Wei LUO1,2(),Zuotao YAN1,Jiahao GUAN1,Jian HAN1,3
1. School of Physics and Electronic Engineering, Northeast Petroleum University, Daqing 163318, China
2. Heilongjiang Province University and Enterprise Joint Construction of Testing and Measurement Technology and Instrument Engineering R&D Center, Daqing 163318, China
3. Sanya Marine Oil and Gas Research Institute of Northeast Petroleum University, Sanya 572024, China
Download: HTML     PDF(7096KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

A multi-scale defect segmentation model, EL-SegFormer, was proposed based on an improved SegFormer architecture, aiming at the defects affecting the lifetime and efficiency in solar cell manufacturing. The model was specifically designed to segment defects in solar cells, providing a reliable detection tool for manufacturers. A lightweight modulation module was incorporated in the shallow layers of the network, and multi-head hybrid convolutions were used to capture defect features across various scales. Fixed-scale convolutions and receptive fields were employed to effectively capture early local information in the network. Diverse defects in solar cells can be accurately located by aggregating the extracted features. A hierarchical encoder structure was employed to integrate multi-scale contextual information from shallow to deep layers into the decoder. The decoder utilized a lightweight multi-layer perceptron to consolidate feature information from different levels and generate segmentation masks. The model was loaded and traversed to compute the mean intersection over union (MIoU) using the defect image segmentation masks and label masks. Experimental results indicated that EL-SegFormer, with only 68.2 M parameters, achieved the MIoU of 67.60% on the Buerhop2018 dataset, surpassing recent state-of-the-art models. This outstanding performance indicates the model’s strong potential for addressing complex solar cell defect segmentation tasks, opening up promising avenues for its application in the solar cell manufacturing industry.



Key wordssolar cell      defect segmentation      Transformer      multi-head mixed convolution      aggregation      lightweight multilayer perceptron     
Received: 07 November 2023      Published: 25 November 2024
CLC:  TP 391  
Fund:  海南省重点研发计划资助项目(ZDYF2022GXJS220).
Cite this article:

Wei LUO,Zuotao YAN,Jiahao GUAN,Jian HAN. Solar cell defect segmentation model based on improved SegFormer. Journal of ZheJiang University (Engineering Science), 2024, 58(12): 2459-2468.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2024.12.005     OR     https://www.zjujournals.com/eng/Y2024/V58/I12/2459


基于改进SegFormer的太阳能电池缺陷分割模型

针对太阳能电池制造过程中影响寿命和效率的缺陷问题,提出基于改进SegFormer的多尺度缺陷分割模型EL-SegFormer. 该模型专注于太阳能电池缺陷分割任务,为生产提供可靠的检测手段. 在网络浅层引入轻量级调制模块,利用多头混合卷积提取不同尺度缺陷的特征信息,以固定尺度卷积和感受野,有效捕获网络早期局部信息. 通过聚合方式融合头部提取的特征信息,以更准确地定位太阳能电池的各种缺陷. 以分级编码器形式融合浅层到深层的多尺度上下文信息输入解码器. 解码器采用轻量级多层感知机,整合不同层级的特征信息生成分割掩码. 加载遍历模型,利用缺陷图像分割掩码和标签掩码计算平均交并比 (MIoU). 实验结果表明,EL-SegFormer模型参数仅为68.2 M,在Buerhop2018数据集上的MIoU达到67.60%,高于近年最先进模型的MIoU. 所提出的模型在复杂太阳能电池缺陷分割任务上表现较好,展现出强大的应用前景.


关键词: 太阳能电池,  缺陷分割,  Transformer,  多头混合卷积,  聚合,  轻量级多层感知机 
Fig.1 Overall framework and intermediate layers of EL-SegFormer
Fig.2 EL-SegFormer encoder
Fig.3 MHMC module
Fig.4 SAA module
Fig.5 Feature maps before and after using SAA
Fig.6 EL-SegFormer decoder
Fig.7 Electroluminescence image defects of solar cells
nMIoU/%FLOPs/GParams/MT/(张·s?1)
166.50102.368.2621.0
267.00102.568.3547.4
467.60102.6068.2519.2
867.20102.669.1413.5
Tab.1 Effect of different number of heads in MHMC on network
编码方式尺寸FLOPs/GParams/MMIoU/%
Mix-FFN300$ \times $30036.067.967.90
512$ \times $512102.667.967.60
PE300$ \times $30040.5668.566.70
512$ \times $512106.268.563.20
Tab.2 Performance comparison between Mix-FFN and PE
添加策略FLOPs/GParams/MMIoU/%
S96.485.063.40
S+A96.484.662.00
S+M99.876.665.80
S+A+M102.668.267.60
Tab.3 Effect of MHMC and SAA on model performance
堆叠策略FLOPs/GParams/MMIoU/%T/(张·s?1)
MSM+MSM+ MSM+MSA103.269.866.90503.6
MSM+MSM+ MSA+MSA102.066.567.00525.0
MSM+MSA+ MSA+MSA100.765.966.30539.0
MSM+MIX+MSA+ MSA102.668.166.80518.9
MSM+MSM+ MIX+MSA102.668.267.60519.2
Tab.4 Impact of stacking strategies on performance and latency
Fig.8 Comparison of MIoU and performance of SOTA model in data set of defection in recent years
Fig.9 Relationship between MIoU and Epoch for different models
模型MIoU/%
FragmentCrackCornerFinger
FCN[28]53.1051.3049.5012.30
U-Net[29]60.2055.3033.0646.10
DeepLabv3[30]62.1062.0042.3452.17
PSPNet[31]61.4049.1362.0039.00
Convnext63.7562.3150.4055.26
Mask2former62.3362.9731.9054.08
Swin61.1362.6643.0354.32
Twins59.3061.0244.2751.79
Segmenter69.1656.2544.6437.58
SegFormer68.4258.2745.0651.00
EL-SegFormer(本研究)69.0061.2656.1954.38
Tab.5 Comparison of segmentation MIoU under different models and defects
大小类别模型尺寸FLOPs/GParams/MMIoU/%mPA/%
Segmenter-T512×51212.36.749.0055.87
Swin-T512×512242.759.053.2065.59
Convnext-T512×512204.659.354.3069.28
SegFormer-b1512×51216.013.757.0066.46
Twins-S512×512232.453.158.6066.26
Mask2former-S512×512246.044.059.4069.37
EL-SegFormer-S(本研究)512×51214.012.060.4970.45
基本Segmenter-S512×51238.526.056.0068.63
Swin-B512×512305.0122.960.4075.16
SegFormer-b3512×51277.547.261.0071.54
Twins-B512×512256.286.761.4072.27
Mask2former-B512×512293.063.061.6074.03
Convnext-S512×512262.180.963.7074.35
EL-SegFormer-B(本研究)512×51275.639.264.3075.36
Segmenter-B512×512129.0104.461.0068.68
Twins-L512×512303.0134.063.0075.91
SegFormer-b5512×512111.585.063.4078.43
Swin-L512×512416.8237.663.9066.43
Mask2former-L512×512542.0153.064.0074.29
Convnext-B512×512299.0123.966.0076.38
EL-SegFormer-L(本研究)512×512102.668.267.6079.85
Tab.6 Comparison of indexes of each model
Fig.10 Comparison of segmentation results of each model
[1]   吕玉荣 太阳能电池的发展背景及应用[J]. 化工时刊, 2021, 35 (2): 26- 29
LV Yurong The development background and applications of solar cells[J]. Chemical Industry Times, 2021, 35 (2): 26- 29
[2]   BREITENSTEIN O, BAUER J, ALTERMATT P P, et al Influence of defects on solar cell characteristics[J]. Solid State Phenomena, 2010, 156: 1- 10
[3]   施光辉, 崔亚楠, 刘小娇, 等 电致发光 (EL) 在光伏电池组件缺陷检测中的应用[J]. 云南师范大学学报: 自然科学版, 2016, 36 (2): 17- 21
SHI Guanghui, CUI Yanan, LIU Xiaojiao, et al Electroluminescent application in defects detection of photovoltaic-module[J]. Journal of Yunnan Normal University: Natural Sciences Edition, 2016, 36 (2): 17- 21
[4]   MANSOURI A, ZETTL M, MAYER O, et al. Defect detection in photovoltaic modules using electroluminescence imaging [C]// 27th European Photovoltaic Solar Energy Conference and Exhibition . Frankfurt: PVTECH, 2012, 64617926: 3374-3378.
[5]   KANAI A, SUGIYAMA M Emission properties of intrinsic and extrinsic defects in Cu2SnS3 thin films and solar cells[J]. Japanese Journal of Applied Physics, 2020, 60 (1): 015504
[6]   徐辉, 祝玉华, 甄彤, 等 深度神经网络图像语义分割方法综述[J]. 计算机科学与探索, 2021, 15 (1): 47- 59
XU Hui, ZHU Yuhua, ZHEN Tong, et al Survey of image semantic segmentation methods based on deep neural network[J]. Journal of Frontiers of Computer Science and Technology, 2021, 15 (1): 47- 59
[7]   陈海永, 刘新如 交叉门控融合的改进语义分割网络及应用[J]. 重庆理工大学学报 : 自然科学, 2023, 37 (6): 187- 195
CHEN Haiyong, LIU Xinru An improved semantic segmentation network and its application by using cross-gated fusion[J]. Journal of Chongqing University of Technology: Natural Science, 2023, 37 (6): 187- 195
[8]   RAHMAN M R U, CHEN H, XI W. U-Net based defects inspection in photovoltaic electroluminecscence images [C]// 2019 IEEE International Conference on Big Knowledge . Changsha: IEEE, 2019: 215–220.
[9]   王盛, 吴浩, 彭宁, 等 改进U2-Net的太阳能电池片缺陷分割方法[J]. 国外电子测量技术, 2023, 42 (2): 177- 184
WANG Sheng, WU Hao, PENG Ning, et al Improved U2-Net defect segmentation method for solar cells[J]. Foreign Electronic Measurement Technology, 2023, 42 (2): 177- 184
[10]   BALZATEGUI J, ECIOLAZA L, ARANA-AREXOLALEIBA N. Defect detection on polycrystalline solar cells using electroluminescence and fully convolutional neural networks [C]// IEEE/SICE International Symposium on System Integration . Kunming: IEEE, 2020: 949–953.
[11]   张海波, 蔡磊, 任俊平, 等 基于Transformer的高效自适应语义分割网络[J]. 浙江大学学报: 工学版, 2023, 57 (6): 1205- 1214
ZHANG Haibo, CAI Lei, REN Junping, et al Efficient and adaptive semantic segmentation network based on Transformer[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (6): 1205- 1214
[12]   DOSOVITSKIY A, BEYER L, KOLESNIKOV A, et al. An image is worth 16x16 words: Transformers for image recognition at scale [EB/OL]. (2020-10-22)[2023-11-07]. https://arxiv.org/search/?query=An+image+is+worth+16x16+words%3A+Transformers+for+image+recognition+at+scale&searchtype=all&source=header.
[13]   YAMADA M, D'AMARIO V, TAKEMOTO K, et al. Transformer module networks for systematic generalization in visual question answering [EB/OL]. (2022-01-27)[2023-11-07]. https://arxiv.org/abs/2201.11316.
[14]   ZHOU B, ZHAO H, PUIG X, et al. Scene parsing through ade20k dataset [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Hawaii: IEEE, 2017: 633–641.
[15]   DENG J, DONG W, SOCHER R, et al. Imagenet: a large-scale hierarchical image database [C]// 2009 IEEE Conference on Computer Vision and Pattern Recognition . Tokyo: IEEE, 2009: 248–255.
[16]   LIU Z, LIN Y, CAO Y, et al. Swin transformer: hierarchical vision transformer using shifted windows [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Sanya: IEEE, 2021: 10012–10022.
[17]   LIU J, WANG C, ZHA L A middle-level learning feature interaction method with deep learning for multi-feature music genre classification[J]. Electronics, 2021, 10 (18): 2206
doi: 10.3390/electronics10182206
[18]   XIE E, WANG W, YU Z, et al SegFormer: simple and efficient design for semantic segmentation with transformers[J]. Advances in Neural Information Processing Systems, 2021, 34: 12077- 12090
[19]   LIU X, YU H F, DHILLON I, et al. Learning to encode position for transformer with continuous dynamical model [C]// International Conference on Machine Learning . PMLR: [s.n.], 2020: 6327–6335.
[20]   BRAUWERS G, FRASINCAR F A general survey on attention mechanisms in deep learning[J]. IEEE Transactions on Knowledge and Data Engineering, 2021, 35 (4): 3279- 3298
[21]   LIN W, WU Z, CHEN J, et al. Scale-aware modulation meet transformer [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Vancouver: IEEE, 2023: 6015–6026.
[22]   STRUDEL R, GARCIA R, LAPTEV I, et al. Segmenter: Transformer for semantic segmentation [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Kuala Lumpur: IEEE, 2021: 7262–7272.
[23]   DEITSCH S, CHRISLTEIN V, BERGER S, at el Automatic classification of defective photovoltaic module cells in electroluminescence images[J]. Solar Energy, 2019, 185: 455- 468
doi: 10.1016/j.solener.2019.02.067
[24]   CHU X, TIAN Z, WANG Y, et al Twins: revisiting the design of spatial attention in vision transformers[J]. Advances in Neural Information Processing Systems, 2021, 34: 9355- 9366
[25]   STRUDEL R, GARCIA R, LAPTEV I, et al. Segmenter: Transformer for semantic segmentation [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Venice: IEEE, 2021: 7262–7272.
[26]   LIU Z, MAO H, WU C Y, et al. A convnet for the 2020s [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . Paris: IEEE, 2022: 11976–11986.
[27]   CHENG B, MISRA I, SCHWING A G, et al. Masked-attention mask transformer for universal image segmentation [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . Paris: IEEE, 2022: 1290–1299.
[28]   LONG J, SHELHAMER E, DARRELL T. Fully convolutional networks for semantic segmentation [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Boston: IEEE, 2015: 3431–3440.
[29]   RONNEBERGER O, FISCHER P, BROX T. U-net: convolutional networks for biomedical image segmentation [C]// Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference . Munich: Springer International Publishing, 2015: 234–241.
[30]   CHEN L C, PAPANDREOU G, SCHROFF F, et al. Rethinking atrous convolution for semantic image segmentation [EB/OL]. (2017-06-17)[2023-11-07]. https://arxiv.org/abs/1706.05587.
[1] Xianwei MA,Chaohui FAN,Weizhi NIE,Dong LI,Yiqun ZHU. Robust fault diagnosis method for failure sensors[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(7): 1488-1497.
[2] Kang FAN,Ming’en ZHONG,Jiawei TAN,Zehui ZHAN,Yan FENG. Traffic scene perception algorithm with joint semantic segmentation and depth estimation[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(4): 684-695.
[3] Zhen LU,Jianye LI,Yunquan DONG. Decentralized Byzantine robust algorithm based on model aggregation[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(3): 492-500.
[4] Shaojie WEN,Ruigang WU,Chaowen FENG,Yingli LIU. Multimodal cascaded document layout analysis network based on Transformer[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(2): 317-324.
[5] Changzhen XIONG,Chuanxi GUO,Cong WANG. Target tracking algorithm based on dynamic position encoding and attention enhancement[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(12): 2427-2437.
[6] Xiaofeng FU,Weiqi CHEN,Yao SUN,Yuze PAN. Bimodal software classification model based on bidirectional encoder representation from transformer[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(11): 2239-2246.
[7] Longxue LIANG,Chenglong HE,Xiaosuo WU,Haowen YAN. Remote sensing image semantic segmentation network based on global information extraction and reconstruction[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(11): 2270-2279.
[8] Dingjian DU,Zunhai GAO,Zhuo CHEN. Wolfberry pest detection based on improved YOLOv5[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(10): 1992-2000.
[9] Siyi QIN,Shaoyan GAI,Feipeng DA. Video object detection algorithm based on multi-level feature aggregation under mixed sampler[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(1): 10-19.
[10] Zhicheng FENG,Jie YANG,Zhichao CHEN. Urban road network extraction method based on lightweight Transformer[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(1): 40-49.
[11] Hai-bo ZHANG,Lei CAI,Jun-ping REN,Ru-yan WANG,Fu LIU. Efficient and adaptive semantic segmentation network based on Transformer[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(6): 1205-1214.
[12] Yu-xiang WANG,Zhi-wei ZHONG,Peng-cheng XIA,Yi-xiang HUANG,Cheng-liang LIU. Compound fault decoupling diagnosis method based on improved Transformer[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(5): 855-864.
[13] Xin-dong LV,Jiao LI,Zhen-nan DENG,Hao FENG,Xin-tong CUI,Hong-xia DENG. Structured image super-resolution network based on improved Transformer[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(5): 865-874.
[14] Yu-xiang LU,Guan-hua XU,Bo TANG. Worker behavior recognition based on temporal and spatial self-attention of vision Transformer[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(3): 446-454.
[15] Feng-long SU,Ning JING. Temporal knowledge graph representation learning based on relational aggregation[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(2): 235-242.