Tuna defect classification and grading using Twins transformer

IF 5.3 2区 农林科学 Q1 ENGINEERING, CHEMICAL
Punnarai Siricharoen , Supanut Tangsinmankong , Seree Yengsakulpaisal , Natthanan Bhukan , Wisawapan Soingoen , Yutthana Lila , Saranya Jongaroontaprangsee , Stefan Mairhofer
{"title":"Tuna defect classification and grading using Twins transformer","authors":"Punnarai Siricharoen ,&nbsp;Supanut Tangsinmankong ,&nbsp;Seree Yengsakulpaisal ,&nbsp;Natthanan Bhukan ,&nbsp;Wisawapan Soingoen ,&nbsp;Yutthana Lila ,&nbsp;Saranya Jongaroontaprangsee ,&nbsp;Stefan Mairhofer","doi":"10.1016/j.jfoodeng.2025.112535","DOIUrl":null,"url":null,"abstract":"<div><div>Ensuring the quality and safety of food products is of paramount importance within the food processing industry. Particularly in the seafood sector, the detection and classification of different quality defects in processed tuna loins poses a significant challenge, usually demanding the visual assessment by seasoned experts. This research proposes a technical solution to the tuna quality inspection using computer vision techniques to identify and localize different types of defects in contrast to what is considered the “standard” of a cleaned product, while additionally assessing the severity level of such defects affecting each individual loin. Image data of tuna defects are acquired under industrial conditions and compose two different datasets: a 4-common-defect dataset (TunaDefect-4) and a 6-extended-defect dataset (TunaDefect-6) including two additional types that are less common but of greater technical challenge. The quality grading process comprises 3 main steps. (1) Initially, preprocessing normalizes image input and augments the image dataset. (2) Then, a semantic segmentation model Twins-PCPVT-L, a pyramid vision transformer with self-attention and conditional positioning encoding, is employed for the TunaDefect-4 dataset. For the TunaDefect-6, a Twins-SVT-L, which amends the former model with locally-group self-attention and global sub-sampled attention, is used. The Twins-PCPVT-L applied to TunaDefect-4 has a mean pixel accuracy (mPA) of 93.96% and a mean IoU of 80.4%; while the Twins-SVT-L on the TunaDefect-6, results in an mPA of 83.82% and mIoU of 66.96%. (3) Lastly, the semantically segmented images are graded by severity ranging from level 0 to 4, where level 0 represents a fully cleaned loin and level 4, being the highest severity level, assigned to loins completely covered by various defects. The accuracy of severity grading is 84% for TunaDefect-4 and 76.6% for TunaDefect-6. Both models run within a total inference and processing time of approximately 0.20 s, faster than the conveyor's transport time. A web application prototype has been developed for the tuna quality classification and grading and is hosted on the Google Cloud Platform (GCP). The developed application responds in timely manner, to be used as a complementary identification and grading tool, with the potential to be integrated as an inline processing solution to further provide practicality to the industry.</div></div>","PeriodicalId":359,"journal":{"name":"Journal of Food Engineering","volume":"395 ","pages":"Article 112535"},"PeriodicalIF":5.3000,"publicationDate":"2025-02-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Food Engineering","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0260877425000706","RegionNum":2,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"ENGINEERING, CHEMICAL","Score":null,"Total":0}
引用次数: 0

Abstract

Ensuring the quality and safety of food products is of paramount importance within the food processing industry. Particularly in the seafood sector, the detection and classification of different quality defects in processed tuna loins poses a significant challenge, usually demanding the visual assessment by seasoned experts. This research proposes a technical solution to the tuna quality inspection using computer vision techniques to identify and localize different types of defects in contrast to what is considered the “standard” of a cleaned product, while additionally assessing the severity level of such defects affecting each individual loin. Image data of tuna defects are acquired under industrial conditions and compose two different datasets: a 4-common-defect dataset (TunaDefect-4) and a 6-extended-defect dataset (TunaDefect-6) including two additional types that are less common but of greater technical challenge. The quality grading process comprises 3 main steps. (1) Initially, preprocessing normalizes image input and augments the image dataset. (2) Then, a semantic segmentation model Twins-PCPVT-L, a pyramid vision transformer with self-attention and conditional positioning encoding, is employed for the TunaDefect-4 dataset. For the TunaDefect-6, a Twins-SVT-L, which amends the former model with locally-group self-attention and global sub-sampled attention, is used. The Twins-PCPVT-L applied to TunaDefect-4 has a mean pixel accuracy (mPA) of 93.96% and a mean IoU of 80.4%; while the Twins-SVT-L on the TunaDefect-6, results in an mPA of 83.82% and mIoU of 66.96%. (3) Lastly, the semantically segmented images are graded by severity ranging from level 0 to 4, where level 0 represents a fully cleaned loin and level 4, being the highest severity level, assigned to loins completely covered by various defects. The accuracy of severity grading is 84% for TunaDefect-4 and 76.6% for TunaDefect-6. Both models run within a total inference and processing time of approximately 0.20 s, faster than the conveyor's transport time. A web application prototype has been developed for the tuna quality classification and grading and is hosted on the Google Cloud Platform (GCP). The developed application responds in timely manner, to be used as a complementary identification and grading tool, with the potential to be integrated as an inline processing solution to further provide practicality to the industry.
使用孪生变压器对金枪鱼缺陷进行分类和分级
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Food Engineering
Journal of Food Engineering 工程技术-工程:化工
CiteScore
11.80
自引率
5.50%
发文量
275
审稿时长
24 days
期刊介绍: The journal publishes original research and review papers on any subject at the interface between food and engineering, particularly those of relevance to industry, including: Engineering properties of foods, food physics and physical chemistry; processing, measurement, control, packaging, storage and distribution; engineering aspects of the design and production of novel foods and of food service and catering; design and operation of food processes, plant and equipment; economics of food engineering, including the economics of alternative processes. Accounts of food engineering achievements are of particular value.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信