基于改进YOLOv7模型的柑橘表面缺陷在线检测
TP391.4%S24; 柑橘表面缺陷是水果检测分级的重要依据,针对传统柑橘表面缺陷检测方法效率低、精度低等问题,该研究提出一种柑橘表面缺陷的实时检测方法.该方法首先对柑橘图像进行图像增强,然后利用提出的YOLOv7-CACT模型对柑橘表面缺陷进行检测,该模型在YOLOv7模型骨干网络中引入坐标注意力模块(coordinate attention,CA),从而提高模型对缺陷部分的关注度.在网络头部引入CT(contextual transformer,CT)模块,融合静态和动态上下文表征特征,从而增强缺陷部分特征表达能力.通过试验确定CA模块和CT模块的最佳位置.改进后的YOLOv7-CACT...
Saved in:
Published in | 农业工程学报 Vol. 39; no. 23; pp. 142 - 151 |
---|---|
Main Authors | , , , , , , , |
Format | Journal Article |
Language | Chinese |
Published |
上海海洋大学信息学院,上海 201306
01.12.2023
北京市农林科学院信息技术研究中心,北京 100097 北京市农林科学院智能装备技术研究中心,北京 100097 北京市农林科学院信息技术研究中心,北京 100097%陕西铁路工程职业技术学院,渭南 714000%北京市农林科学院智能装备技术研究中心,北京 100097 |
Subjects | |
Online Access | Get full text |
ISSN | 1002-6819 |
DOI | 10.11975/j.issn.1002-6819.202308138 |
Cover
Abstract | TP391.4%S24; 柑橘表面缺陷是水果检测分级的重要依据,针对传统柑橘表面缺陷检测方法效率低、精度低等问题,该研究提出一种柑橘表面缺陷的实时检测方法.该方法首先对柑橘图像进行图像增强,然后利用提出的YOLOv7-CACT模型对柑橘表面缺陷进行检测,该模型在YOLOv7模型骨干网络中引入坐标注意力模块(coordinate attention,CA),从而提高模型对缺陷部分的关注度.在网络头部引入CT(contextual transformer,CT)模块,融合静态和动态上下文表征特征,从而增强缺陷部分特征表达能力.通过试验确定CA模块和CT模块的最佳位置.改进后的YOLOv7-CACT模型检测结果平均精度均值(mean average precision,mAP)相较于原始模型增加了 4.1个百分点,达到 91.1%,满足了实际生产中对柑橘缺陷检测精度的要求.最后将基于YOLOv7-CACT的柑橘检测模型通过TensorRT进行部署,试验结果表明模型的推理时间满足柑橘生产线 10个/s的实时分选要求,总体的检测精度达到 94.4%,为柑橘表面缺陷在线检测提供了一种精准的实时检测方法. |
---|---|
AbstractList | TP391.4%S24; 柑橘表面缺陷是水果检测分级的重要依据,针对传统柑橘表面缺陷检测方法效率低、精度低等问题,该研究提出一种柑橘表面缺陷的实时检测方法.该方法首先对柑橘图像进行图像增强,然后利用提出的YOLOv7-CACT模型对柑橘表面缺陷进行检测,该模型在YOLOv7模型骨干网络中引入坐标注意力模块(coordinate attention,CA),从而提高模型对缺陷部分的关注度.在网络头部引入CT(contextual transformer,CT)模块,融合静态和动态上下文表征特征,从而增强缺陷部分特征表达能力.通过试验确定CA模块和CT模块的最佳位置.改进后的YOLOv7-CACT模型检测结果平均精度均值(mean average precision,mAP)相较于原始模型增加了 4.1个百分点,达到 91.1%,满足了实际生产中对柑橘缺陷检测精度的要求.最后将基于YOLOv7-CACT的柑橘检测模型通过TensorRT进行部署,试验结果表明模型的推理时间满足柑橘生产线 10个/s的实时分选要求,总体的检测精度达到 94.4%,为柑橘表面缺陷在线检测提供了一种精准的实时检测方法. |
Abstract_FL | Citrus surface defects play a pivotal role in the fruit inspection and grading during agricultural production.Surface imperfections are also much easier to spot than inside ones,leading to accelerate the deterioration.However,conventional detection of citrus surface defects cannot fully meet the overall quality assessment in the large-scale production in recent years,due to the low efficiency and accuracy.In this study,an accurate,rapid and real-time detection was proposed to consider the diverse and complex nature of surface imperfections observed in citrus fruits.This speed and precision of detection were also enhanced for the quality of surface defects.Firstly,the images of citrus fruits were captured by industrial cameras.The generated images were enhanced to make the region of interest more outstanding.Then,the YOLOv7-CACT model was improved for the defect region in the enhanced citrus image.The coordinate attention(CA)module was introduced in the backbone network,in order to increase the attention to the defective part.The contextual transformer(CT)module was introduced in the head of the network to fuse the static and dynamic contextual representation features,thus enhancing the feature expression of the defective part.The superior performance was achieved in the modified YOLOv7-CACT model,compared with the baseline version.Especially,the detection accuracy was improved by 4.1%in the mean average precision(mAP).Consequently,the modified model was fully met the accuracy requirements for the identification of citrus surface defects in an offline setting.TensorRT was also employed around YOLOv7-CACT for the deployment of improved model,in order to real-time detect in practical scenarios.The results show that the improved YOLOv7-CACT-RT model was performed the best to detect the surface defects on the surface of citrus fruits in the grading and sorting production line with a transition rate of 10 fruits per second.The deployed YOLOv7-CACT-RT model was loaded into the grading software programmed by C++ language,in order to validate the performance.An online detection was conducted on 198 mixed normal and defective citrus fruits on the sorting line,achieving a detection accuracy of 94.4%.The improved model can be directly applied to grade and sort fruit in the production line,according to the external qualities.Meanwhile,this model can also be extended to the real-time surface defects detection of other fruits without specialized knowledge.Our future research will focus on the registration and fusion of RGB and NIR image,in order to improve the detection accuracy of fruit defects. |
Author | 赵春江 梁晓婷 王庆艳 黄文倩 贾雪莹 何鑫 张驰 周娟 |
AuthorAffiliation | 上海海洋大学信息学院,上海 201306;北京市农林科学院智能装备技术研究中心,北京 100097;北京市农林科学院信息技术研究中心,北京 100097%陕西铁路工程职业技术学院,渭南 714000%北京市农林科学院智能装备技术研究中心,北京 100097;北京市农林科学院信息技术研究中心,北京 100097 |
AuthorAffiliation_xml | – name: 上海海洋大学信息学院,上海 201306;北京市农林科学院智能装备技术研究中心,北京 100097;北京市农林科学院信息技术研究中心,北京 100097%陕西铁路工程职业技术学院,渭南 714000%北京市农林科学院智能装备技术研究中心,北京 100097;北京市农林科学院信息技术研究中心,北京 100097 |
Author_FL | HUANG Wenqian HE Xin JIA Xueying ZHOU Juan LIANG Xiaoting ZHANG Chi WANG Qingyan ZHAO Chunjiang |
Author_FL_xml | – sequence: 1 fullname: JIA Xueying – sequence: 2 fullname: ZHAO Chunjiang – sequence: 3 fullname: ZHOU Juan – sequence: 4 fullname: WANG Qingyan – sequence: 5 fullname: LIANG Xiaoting – sequence: 6 fullname: HE Xin – sequence: 7 fullname: HUANG Wenqian – sequence: 8 fullname: ZHANG Chi |
Author_xml | – sequence: 1 fullname: 贾雪莹 – sequence: 2 fullname: 赵春江 – sequence: 3 fullname: 周娟 – sequence: 4 fullname: 王庆艳 – sequence: 5 fullname: 梁晓婷 – sequence: 6 fullname: 何鑫 – sequence: 7 fullname: 黄文倩 – sequence: 8 fullname: 张驰 |
BookMark | eNo9j8tKw0AYRmdRwVr7FC5cJf7_ZJKZWUrxBoFudOGqzCST0iJTMHjbuXBXEAQX3kt1Ex9AxCD0ZUzSvoUVxdWBb3E-zhKp2YE1hKwguIiS-2t9t5em1kUA6gQCpUuBeiDQEzVS_18XSTNNexp89DgAwzqRxSj_yi_L64_p5H6_HbaPeZmNi6dhdXdRjq7K15vpOJs9Plef-ez2vXjIqnxSvpyXb8NlspCog9Q0_9gge5sbu61tJ2xv7bTWQydFoL4T-BIVF75mijGQGKBRmkcmFloYSZMoEEBNEMXaKCFQKZZIUJJrRiGJZew1yOqv90TZRNlupz84OrTzx44960an-id0noq-9w2Jpl_s |
ClassificationCodes | TP391.4%S24 |
ContentType | Journal Article |
Copyright | Copyright © Wanfang Data Co. Ltd. All Rights Reserved. |
Copyright_xml | – notice: Copyright © Wanfang Data Co. Ltd. All Rights Reserved. |
DBID | 2B. 4A8 92I 93N PSX TCJ |
DOI | 10.11975/j.issn.1002-6819.202308138 |
DatabaseName | Wanfang Data Journals - Hong Kong WANFANG Data Centre Wanfang Data Journals 万方数据期刊 - 香港版 China Online Journals (COJ) China Online Journals (COJ) |
DatabaseTitleList | |
DeliveryMethod | fulltext_linktorsrc |
Discipline | Agriculture |
DocumentTitle_FL | Online detection of citrus surface defects using improved YOLOv7 modeling |
EndPage | 151 |
ExternalDocumentID | nygcxb202323015 |
GrantInformation_xml | – fundername: (国家自然科学基金); 北京市农林科学院改革与发展课题 |
GroupedDBID | -04 2B. 4A8 5XA 5XE 92G 92I 93N ABDBF ABJNI ACGFO ACGFS ACUHS AEGXH AIAGR ALMA_UNASSIGNED_HOLDINGS CCEZO CHDYS CW9 EOJEC FIJ IPNFZ OBODZ PSX RIG TCJ TGD TUS U1G U5N |
ID | FETCH-LOGICAL-s1025-6591a785b4a4409161eab7ced8b8e92fc6802e6cdbea881aa4f90a97b420fd9d3 |
ISSN | 1002-6819 |
IngestDate | Thu May 29 04:08:36 EDT 2025 |
IsPeerReviewed | false |
IsScholarly | true |
Issue | 23 |
Keywords | 注意力机制 deep learning attention mechanism YOLOv7 深度学习 surface defects 无损检测 柑橘 nondestructive determination 表面缺陷 TensorRT citrus |
Language | Chinese |
LinkModel | OpenURL |
MergedId | FETCHMERGED-LOGICAL-s1025-6591a785b4a4409161eab7ced8b8e92fc6802e6cdbea881aa4f90a97b420fd9d3 |
PageCount | 10 |
ParticipantIDs | wanfang_journals_nygcxb202323015 |
PublicationCentury | 2000 |
PublicationDate | 2023-12-01 |
PublicationDateYYYYMMDD | 2023-12-01 |
PublicationDate_xml | – month: 12 year: 2023 text: 2023-12-01 day: 01 |
PublicationDecade | 2020 |
PublicationTitle | 农业工程学报 |
PublicationTitle_FL | Transactions of the Chinese Society of Agricultural Engineering |
PublicationYear | 2023 |
Publisher | 上海海洋大学信息学院,上海 201306 北京市农林科学院信息技术研究中心,北京 100097 北京市农林科学院智能装备技术研究中心,北京 100097 北京市农林科学院信息技术研究中心,北京 100097%陕西铁路工程职业技术学院,渭南 714000%北京市农林科学院智能装备技术研究中心,北京 100097 |
Publisher_xml | – name: 北京市农林科学院信息技术研究中心,北京 100097 – name: 北京市农林科学院信息技术研究中心,北京 100097%陕西铁路工程职业技术学院,渭南 714000%北京市农林科学院智能装备技术研究中心,北京 100097 – name: 上海海洋大学信息学院,上海 201306 – name: 北京市农林科学院智能装备技术研究中心,北京 100097 |
SSID | ssib051370041 ssj0041925 ssib001101065 ssib023167668 |
Score | 2.4577284 |
Snippet | TP391.4%S24; 柑橘表面缺陷是水果检测分级的重要依据,针对传统柑橘表面缺陷检测方法效率低、精度低等问题,该研究提出一种柑橘表面缺陷的实时检测方法.该方法首先对柑橘图像... |
SourceID | wanfang |
SourceType | Aggregation Database |
StartPage | 142 |
Title | 基于改进YOLOv7模型的柑橘表面缺陷在线检测 |
URI | https://d.wanfangdata.com.cn/periodical/nygcxb202323015 |
Volume | 39 |
hasFullText | 1 |
inHoldings | 1 |
isFullTextHit | |
isPrint | |
journalDatabaseRights | – providerCode: PRVEBS databaseName: Academic Search Ultimate issn: 1002-6819 databaseCode: ABDBF dateStart: 20140101 customDbUrl: https://search.ebscohost.com/login.aspx?authtype=ip,shib&custid=s3936755&profile=ehost&defaultdb=asn isFulltext: true dateEnd: 99991231 titleUrlDefault: https://search.ebscohost.com/direct.asp?db=asn omitProxy: true ssIdentifier: ssj0041925 providerName: EBSCOhost |
link | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwnR3JahRBtIgJiB7EFXcCWieZONVd67F60kMQNZcE4ilUb5PTCFlEc_LgLSAIHtxD9BI_QMRByM-YSfIXvlfdmekkigsMRfXrt9br7ve6p-oVITd5mqcuaWaNwqi8wYswb-hEmYZLnXJZkRVhhquR792XU7P8zpyYGzm2UJu1tLKcTKSrv1xX8j9eBRj4FVfJ_oNnB0wBAH3wL7TgYWj_ysc0FtS0aWRpzLHVMY0lNdA3NNY0alMTPZi-O_1IIdxqapkniamOaKyoARLuSQCTeRxDjUZawAT8GA4nqQ0QOWp5QQAxNFKeT8vjKISDLCQPceYEdCIBIuqJL-JriSSoqkbRAAE-ViAH4IMqCWpBnEQO2sKp_cvBWwN0sZcfUWsRAuZG5gCKwB_aoz1f0IOBbUMUgWaizgLb-hmF3EoVcCCl5w-GhvXPIkF4aIpJZQzoWtocqYMdvm8Vp1bVzOM4XtaPuAaF2rVTfnxhxIPWUea3AvwHWNYCCUYaqatwUEWasmxTdUcFYS1usLLEWJWCsLIG79HoZpTw4Q1FTAxETKD9kNqVZXIOlQ_vPumkjxPEABysxjAWKCmDUTJmo8moPUydGX4dGDzbA6yQIIevooKFuBHCYPoUTh4QfiZBpcRxcmNfxdu_V9AvjesWrtupZXEzp8mp6vVr3Jb30hkysrpwlpy0ncWqBE1-jpjt9d6P3vP-y2-7W2_Lu6e_ubH9YW3nzbP--ov-51e7G5t77z_ufO_tvf66_W5zp7fV__S0_2XtPJltxzOtqUa1wUhjieE2zlIY5pQWCXecQ-IsWe4SleaZTnRugiKVuhnkMs2S3GnNnOOFaTqjEh40i8xk4QUy2n3YzS-S8bypCsN40cwZbuDjEuGMLFSawvs4Lxy7RMYrw-erB8jS_CHXXP4zyhVyYnitXyWjy4sr-TVIipeT65U_fwIhXorr |
linkProvider | EBSCOhost |
openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=%E5%9F%BA%E4%BA%8E%E6%94%B9%E8%BF%9BYOLOv7%E6%A8%A1%E5%9E%8B%E7%9A%84%E6%9F%91%E6%A9%98%E8%A1%A8%E9%9D%A2%E7%BC%BA%E9%99%B7%E5%9C%A8%E7%BA%BF%E6%A3%80%E6%B5%8B&rft.jtitle=%E5%86%9C%E4%B8%9A%E5%B7%A5%E7%A8%8B%E5%AD%A6%E6%8A%A5&rft.au=%E8%B4%BE%E9%9B%AA%E8%8E%B9&rft.au=%E8%B5%B5%E6%98%A5%E6%B1%9F&rft.au=%E5%91%A8%E5%A8%9F&rft.au=%E7%8E%8B%E5%BA%86%E8%89%B3&rft.date=2023-12-01&rft.pub=%E4%B8%8A%E6%B5%B7%E6%B5%B7%E6%B4%8B%E5%A4%A7%E5%AD%A6%E4%BF%A1%E6%81%AF%E5%AD%A6%E9%99%A2%2C%E4%B8%8A%E6%B5%B7+201306&rft.issn=1002-6819&rft.volume=39&rft.issue=23&rft.spage=142&rft.epage=151&rft_id=info:doi/10.11975%2Fj.issn.1002-6819.202308138&rft.externalDocID=nygcxb202323015 |
thumbnail_s | http://utb.summon.serialssolutions.com/2.0.0/image/custom?url=http%3A%2F%2Fwww.wanfangdata.com.cn%2Fimages%2FPeriodicalImages%2Fnygcxb%2Fnygcxb.jpg |