Deep Learning Model Compression and Hardware Acceleration for High-Performance Foreign Material Detection on Poultry Meat Using NIR Hyperspectral Imaging.
Zirak Khan, Seung-Chul Yoon, Suchendra M Bhandarkar
{"title":"Deep Learning Model Compression and Hardware Acceleration for High-Performance Foreign Material Detection on Poultry Meat Using NIR Hyperspectral Imaging.","authors":"Zirak Khan, Seung-Chul Yoon, Suchendra M Bhandarkar","doi":"10.3390/s25030970","DOIUrl":null,"url":null,"abstract":"<p><p>Ensuring the safety and quality of poultry products requires efficient detection and removal of foreign materials during processing. Hyperspectral imaging (HSI) offers a non-invasive mechanism to capture detailed spatial and spectral information, enabling the discrimination of different types of contaminants from poultry muscle and non-muscle external tissues. When integrated with advanced deep learning (DL) models, HSI systems can achieve high accuracy in detecting foreign materials. However, the high dimensionality of HSI data, the computational complexity of DL models, and the high-paced nature of poultry processing environments pose challenges for real-time implementation in industrial settings, where the speed of imaging and decision-making is critical. In this study, we address these challenges by optimizing DL inference for HSI-based foreign material detection through a combination of post-training quantization and hardware acceleration techniques. We leveraged hardware acceleration utilizing the TensorRT module for NVIDIA GPU to enhance inference speed. Additionally, we applied half-precision (called FP16) post-training quantization to reduce the precision of model parameters, decreasing memory usage and computational requirements without any loss in model accuracy. We conducted simulations using two hypothetical hyperspectral line-scan cameras to evaluate the feasibility of real-time detection in industrial conditions. The simulation results demonstrated that our optimized models could achieve inference times compatible with the line speeds of poultry processing lines between 140 and 250 birds per minute, indicating the potential for real-time deployment. Specifically, the proposed inference method, optimized through hardware acceleration and model compression, achieved reductions in inference time of up to five times compared to unoptimized, traditional GPU-based inference. In addition, it resulted in a 50% decrease in model size while maintaining high detection accuracy that was also comparable to the original model. Our findings suggest that the integration of post-training quantization and hardware acceleration is an effective strategy for overcoming the computational bottlenecks associated with DL inference on HSI data.</p>","PeriodicalId":21698,"journal":{"name":"Sensors","volume":"25 3","pages":""},"PeriodicalIF":3.4000,"publicationDate":"2025-02-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11819658/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Sensors","FirstCategoryId":"103","ListUrlMain":"https://doi.org/10.3390/s25030970","RegionNum":3,"RegionCategory":"综合性期刊","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"CHEMISTRY, ANALYTICAL","Score":null,"Total":0}
引用次数: 0
Abstract
Ensuring the safety and quality of poultry products requires efficient detection and removal of foreign materials during processing. Hyperspectral imaging (HSI) offers a non-invasive mechanism to capture detailed spatial and spectral information, enabling the discrimination of different types of contaminants from poultry muscle and non-muscle external tissues. When integrated with advanced deep learning (DL) models, HSI systems can achieve high accuracy in detecting foreign materials. However, the high dimensionality of HSI data, the computational complexity of DL models, and the high-paced nature of poultry processing environments pose challenges for real-time implementation in industrial settings, where the speed of imaging and decision-making is critical. In this study, we address these challenges by optimizing DL inference for HSI-based foreign material detection through a combination of post-training quantization and hardware acceleration techniques. We leveraged hardware acceleration utilizing the TensorRT module for NVIDIA GPU to enhance inference speed. Additionally, we applied half-precision (called FP16) post-training quantization to reduce the precision of model parameters, decreasing memory usage and computational requirements without any loss in model accuracy. We conducted simulations using two hypothetical hyperspectral line-scan cameras to evaluate the feasibility of real-time detection in industrial conditions. The simulation results demonstrated that our optimized models could achieve inference times compatible with the line speeds of poultry processing lines between 140 and 250 birds per minute, indicating the potential for real-time deployment. Specifically, the proposed inference method, optimized through hardware acceleration and model compression, achieved reductions in inference time of up to five times compared to unoptimized, traditional GPU-based inference. In addition, it resulted in a 50% decrease in model size while maintaining high detection accuracy that was also comparable to the original model. Our findings suggest that the integration of post-training quantization and hardware acceleration is an effective strategy for overcoming the computational bottlenecks associated with DL inference on HSI data.
期刊介绍:
Sensors (ISSN 1424-8220) provides an advanced forum for the science and technology of sensors and biosensors. It publishes reviews (including comprehensive reviews on the complete sensors products), regular research papers and short notes. Our aim is to encourage scientists to publish their experimental and theoretical results in as much detail as possible. There is no restriction on the length of the papers. The full experimental details must be provided so that the results can be reproduced.