Issue 
Int. J. Simul. Multidisci. Des. Optim.
Volume 15, 2024



Article Number  20  
Number of page(s)  8  
DOI  https://doi.org/10.1051/smdo/2024014  
Published online  21 October 2024 
Research Article
Cigarette packaging analysis algorithm based on visual learning
China Tobacco Zhejiang Industrial Co., Ltd. 5, Hangzhou, Zhejiang 310008, China
^{*} email: zhu36662222218@163.com
Received:
24
June
2024
Accepted:
29
July
2024
The tobacco business continues to experience difficulties adhering to regulations, particularly regarding the packaging of cigarettes. It can be computationally demanding, needing strong hardware for realtime applications, and it might have trouble with severely damaged or concealed packaging. We present a new technique for the analysis of cigarette packaging in this paper named Pelicandriven Tuned Convolution Kernel ResNet (PTCKR). Pelican optimization improves the performance of the convolutional kernel in the ResNet framework, enabling more precise and effective quality evaluations of cigarette packaging. Three primary classifications were represented by the varied range ofcigarette package images in our dataset. We used a bilateral filter in the data preprocessing step to improve the quality of the input images and lower noise. The suggested PTCKR framework is tested on the Python platform and examined using F1score (91.50%), accuracy (91.70%), recall (92.60%) and precision (92%) measurements. PTCKR is a major step forward in the development of effective and dependable quality control solutions for the analysis of cigarette packaging.
Key words: Cigarette packaging / pelicandriven tuned convolution kernel ResNet (PTCKR) / bilateral filter
© B. Zhang et al., Published by EDP Sciences, 2024
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
1 Introduction
Cigarette packaging constitutes an important aspect of the tobacco merchandising and consumption process. Being the first line of interaction between the consumer and the product, it plays a variety of roles ranging from advertising and conveying legal information to the consumer while acting as the primary determinant of the consumer's actions. Previously, the packaging of cigarettes was a promotional tool bright colors were used on the packaging surfaces alongside stylish logos and good looks [1]. Such brands are so recognizable due to their taste, smell, and gorgeous advertising, butalso the packagingof the boxes. This appeal need notto be based on aesthetics, it has to do with giving a certain image or a lifestyle that is associated with the brand. The strategic use of packaging was seen to cultivate brand loyalty and singularity in an increasingly saturated industry [2].
However, the function of cigarette packaging started to change with increasing awareness of the dangers of smoking. Tobacco control measures were initiated by governments across the globe and this came in the form of regulations that covered packaging [3]. The first significant change that took place was the use of health warnings on packets of cigarettes. Such warnings, and flashy images showing the ill consequences of smoking, used discouragement and educated consumers of its effects. Smoking can be influenced by the following factors which include the appearance of the cigarette pack [4]. A few investigations illuminate that other packaging can improve the perceived quality and attractiveness of the product, conversely, plain packaging can diminish the smoking rate by minimizing the appeal of cigarette packs. Smoking apparatus also helps to maintain smoking habits by incorporating emotions with the opening of a new pack.
Furthermore, cigarette packaging is also an advertising tool and platform for anticounterfeiting elements and tax stamps used to validate the product's genuineness and adherence to tax laws [5]. Introducing new features in packaging and labeling include holograms and QR codes for preventing the illicit trade of cigarettes and for improving the track and trail process.Thus, there are systematic activities to promote nonrecyclable packaging in addition to the increase in the demand for sustainable and environmentally pleasant packaging. Nicotinebased cigarette holders harm the environment for the following reasonsthey come with nonrecyclable material and are usually littered with extreme negligence. Current trends have seen heated debates on how to minimize the impact that cigarettes have on the environment and companies have developed biodegradable filters and recyclable material packaging [6].
Some of the implementation challenges include cigarette packaging regulations being subject to change due to business campaign for modifications, advocacy groups, and scientific findings [7]. Precautions such as simple packaging which entails packaging that does not contain any features that can easily identify the productowners have also assumed dividing features. Proponents argue that it reduces the attractiveness of cigarettes, especially to youths, while critics are concerned about threats of violation of such acts as copyrights and other effects such as the promotion of the black market. Cigarette packaging is another controversy that cannot be discussed in terms of packaging alone, it involves public health aspects. Proponents of plain packaging state that the removal of branded elements decreases the appeal of cigarettes particularly to youth. In contrast, critics claim that such policies are against the rights of intellectual property and might not work for eliminating smoking [8].
In this study, we introduce a novel method termed Pelicandriven Tuned Convolution Kernel ResNet (PTCKR) for the analysis of cigarette packaging.
Section 2 contains a list of related works. Section 3 presents the methodology. Section 4 is mentioned in the results. In Section 5, the conclusion is provided.
2 Related works
To recognize the images of cigarette packaging, machine vision techniques were used in the investigation [9] a fault classification approach specific to the tobacco production industry.The twophase approach combined conventional computer vision approaches with deep learning (DL) algorithms. For some flaws with clear features and some positional offset issues, classical CV methods were initially applied directly, improving performance, efficiency and facilitating the subsequent categorization for the balance defects, DL approaches were applied.
An approach for cigarette brand recognition based on DL was presented [10] to satisfy the requirements of the autonomous gathering of retail data. The accuracy of the approach for cigarette brand recognition was 98.0%, according to the outcomes, suggesting that it could meet the requirements of automatic retail data collecting for cigarettes andit had significantly generalization efficiency.
The inquiry integrated several imageenhancing techniques with an upgraded SimilarityAware Feature Enhancement block for object Counting (SAFECount) technique [11] an advanced strategy for cigarette pack counting. The Root Mean Square Error (RMSE) of 1.95 and the Mean Absolute Error (MAE) of 1.71 showed that the method significantly improved counting effectiveness.
Identification of flaws in the outside packaging was an important phase in the creation of cigarettes. An updated You Only Look Once (YOLOv7)tiny target detection algorithm was proposed [12] to solve the problem of significant false recognition rates in factory settings. The average detection accuracy is 94.6% after combining the two. Their upgrades yield a 5.4% enhancement in accuracy over the original YOLOv7tiny.
The issue of irregular cigarette packet samples discovered during daily patrol inspections was used as the foundation for the investigation [13]. A statistical comparison for the validity assessment of the cigarette package appearancedetecting equipment was provided by the realization of a quantified assessment of the recognition capability of the instrument.
To efficiently and consistently detect packaging problems in the manufacturing of cigarettes, such as omission or the reverse orientation of single cigarettes, they present an optimized network structure based on YOLOv4Tiny [14] with a single circular bounding box. It preserved detection efficiency while decreasing the network's size and speeding upthe process. It was anticipated that the investigation would have a significant impact on industrial efficiency and quality assurance.
A semisupervised image restoration technique was suggested [15] for the deteriorated image of a plasticsealed cigarette pack to eliminate the material and finish the regeneration of the shading characteristics. According to a numerical assessment of the data, the Fréchet Initial Distance (FID) was minimized by 14.42%, 6.85%, and 3.00%, respectively, when using algorithms including Contrastive learning for Unpaired ImagetoImage Translation (CUT) and Dual Contrastive Learning generative adversarial network (DCLGAN).
The identification of transparent film on tobacco pack surfaces was the primary intention of the investigation [16]. The system's application findings demonstrated that the technique described in the investigation might successfully determine whether a tobacco pack's surface contains film residue.
3 Methodology
The Pelicandriven Tuned Convolution Kernel ResNet (PTCKR) approach to cigarette package analysis is presented in this paper, we gathered cigarette packaging sample images and applied a Bilateral Filter to Preprocess the images.It achieves strong performance metrics when tested on Python, which is a major step forward in quality control for the study of cigarette packaging analysis.
3.1 Data collection
We gathered a cigarette packaging dataset that employs an image resolution scale of 420 × 340. For the anticipated consequence, the system classifies the data into three categories optimal, decline, and emptyobject. There are 450 samples altogether because each condition requires 150 samples.
3.2 Data preprocessing using bilateral filter
The bilateral filter put forward in a development of linear image smoothing in which a photometric weight x_{0} is added as an element of the spatial weight x_{t}. The bilateral filter yields the image E, which is derived from the original image F.
$$E\left(w\right)=\frac{{{\displaystyle \sum}}_{s\in {T}_{n}}{x}_{t}\left(\left\lefts\right\right\right){x}_{o}\left(F\left(w\right)F\left(w+s\right)\right)E\left(w+s\right)}{{{\displaystyle \sum}}_{s\in {T}_{n}}{x}_{t}\left(\left\lefts\right\right\right){x}_{o}\left(F\left(w\right)F\left(w+s\right)\right)}$$(1)
where T_{n} is usually a window of size [–n,n] × [–n,n]. The function x_{t} decreases symmetrically with the distance s from T_{n} center. x_{0} Typically exhibits an equal and declining relationship with intensity.
3.3 Pelicandriven tuned convolution kernel Resnet (PTCKR)
This paper introduces a new technique for analysing cigarette packaging called Pelicandriven Tuned Convolution Kernel ResNet (PTCKR). Pelican optimization is used to increases the performance of the TCKR, allowing for more accurate and effective quality evaluations of cigarette packaging.
3.3.1 Pelican optimization algorithm (POA)
A populationbased technique called POA counts pelicans as participants of the population. Each participant in a populationbased algorithm provides a potential solution. Based on the variable is located in the search space (SS), every category participant suggests an amount for the optimization issue variable. First, the population participants are randomly initialized based on the problem's highest and lowest bounds using an equation.
$${w}_{j,i}={k}_{i}+rand.\left({v}_{i}{k}_{i}\right)j=1,2,\dots \text{\hspace{0.17em}}\dots ,M,i=1,2,\dots \text{\hspace{0.17em}}\dots ,n.$$(2)
The amount of population participants is denoted by w_{j,i} the ith variable's quantity indicated by the jth candidate approach the amount of problem parameters is represented by M the arbitrary amount in theperiod [0,1] is called rand the ith lowest bound is denoted by k_{i} and the ith higher bound by v_{i}.
Equation (3) utilized the population vector as a matrix to identify the pelican population participants in the proposed POA. The problem variable's recommended value is shown in the matrix's columns, while every row of the matrix provides a potential solution.
$$W={\left[\begin{array}{c}\hfill {W}_{1}\hfill \\ \hfill \vdots \hfill \\ \hfill \begin{array}{c}\hfill \begin{array}{c}\hfill {W}_{j}\hfill \\ \hfill \vdots \hfill \end{array}\hfill \\ \hfill {W}_{M}\hfill \end{array}\hfill \end{array}\right]}_{M\times m}={\left[\begin{array}{c}\hfill \begin{array}{ccc}\hfill {w}_{1,1}\hfill & \hfill \cdots \hfill & \hfill \begin{array}{cc}\hfill {w}_{1,i}\hfill & \hfill \begin{array}{cc}\hfill \cdots \hfill & \hfill {w}_{1,n}\hfill \end{array}\hfill \end{array}\hfill \end{array}\hfill \\ \hfill \begin{array}{ccc}\hfill \vdots \hfill & \hfill \ddots \hfill & \hfill \begin{array}{cc}\hfill \vdots \hfill & \hfill \begin{array}{cc}\hfill \u22f0\hfill & \hfill \vdots \hfill \end{array}\hfill \end{array}\hfill \end{array}\hfill \\ \hfill \begin{array}{c}\hfill \begin{array}{ccc}\hfill {w}_{j,1}\hfill & \hfill \cdots \hfill & \hfill \begin{array}{cc}\hfill {w}_{j,i}\hfill & \hfill \begin{array}{cc}\hfill \cdots \hfill & \hfill {w}_{j,n}\hfill \end{array}\hfill \end{array}\hfill \end{array}\hfill \\ \hfill \begin{array}{c}\hfill \begin{array}{ccc}\hfill \vdots \hfill & \hfill \u22f0\hfill & \hfill \begin{array}{ccc}\hfill \vdots \hfill & \hfill \ddots \hfill & \hfill \vdots \hfill \end{array}\hfill \end{array}\hfill \\ \hfill \begin{array}{ccc}\hfill {w}_{M,1}\hfill & \hfill \cdots \hfill & \hfill \begin{array}{ccc}\hfill {w}_{M,i}\hfill & \hfill \cdots \hfill & \hfill {w}_{M,m}\hfill \end{array}\hfill \end{array}\hfill \end{array}\hfill \end{array}\hfill \end{array}\right]}_{M\times m}.$$(3)
The jth pelican is represented by W_{j}, where W is the pelican population matrix.
Every category participant in the suggested POA represents a potential fix for a particular issue as a pelican. Thus, every candidate's response can be used to assess the target variable of a particular problem. The value acquired for the target variable is found using the vector known as the target variable vector in equation (4).
$$E={\left[\begin{array}{c}\hfill {E}_{1}\hfill \\ \hfill \vdots \hfill \\ \hfill \begin{array}{c}\hfill {E}_{j}\hfill \\ \hfill \begin{array}{c}\hfill \vdots \hfill \\ \hfill {E}_{M}\hfill \end{array}\hfill \end{array}\hfill \end{array}\right]}_{M\times 1}={\left[\begin{array}{c}\hfill E\left({W}_{1}\right)\hfill \\ \hfill \vdots \hfill \\ \hfill \begin{array}{c}\hfill E\left({W}_{j}\right)\hfill \\ \hfill \begin{array}{c}\hfill \vdots \hfill \\ \hfill E\left({W}_{M}\right)\hfill \end{array}\hfill \end{array}\hfill \end{array}\right]}_{M\times 1}$$(4)
where E_{j} is the target variable number of the jth candidate response and E is the target variable vector.
The suggested POA updates potential solutions by simulating pelican behavior and tactics during prey attacks and hunting. There are two phases to this hunting approach simulation.
Move toward prey(MTP).
Wingspan above water (WAW).
3.3.1.1 MTP
MTP is an exploration phase during the initial phase the pelican locates its prey and proceeds toward that specific spot. By modeling this pelican technique, SS may be scanned, and the suggested POA's exploration capacity to find various parts of the SS is enhanced. The fact that the prey's locationis randomly generated in the SS makes the POA significant. As a result, the POA is more equipped to investigate the area and solve specific searchrelated problems. The idea and the pelican's approach of traveling to the site of prey are mathematically simulated by the equation.
$${w}_{j,i}^{{O}_{1}}=\{\begin{array}{c}{w}_{j,i}+rand.\left({o}_{i}J.{w}_{j,i}\right),{E}_{o}<{E}_{j}\hfill \\ {w}_{j,i}+rand.\left({w}_{j,i}{o}_{i}\right),else\hfill \end{array}$$(5)
where J a random amount is equal to 1 or 2, 0_{i} is the prey's position in the ith dimension, E_{o} is its target variable value and ${w}_{j,i}^{{O}_{1}}$ is the initialization entity of the jth pelican in the ith size based on phase1. A random amount between 1 and 2 represents parameter J. For each participant and iteration, a random parameter is chosen. This parameter's quantity of 2 causes the participant to be more displaced, which could lead the participant to enter a discovered area of the SS. As a result, parameter J influences how well the POA probe can search the SS.
If the targetvariable's significance is increased at the new pelican site in the proposed POA, then it is appropriate. An update of this kind, known as a legitimate update, keeps the algorithm from going to a nonoptimal place. The procedure is represented by equation (6).
$${W}_{j}=\{\begin{array}{c}\hfill {W}_{j}^{{O}_{1}},{E}_{j}^{{O}_{1}}<{E}_{j}\hfill \\ \hfill {W}_{j},else\hfill \end{array}$$(6)
where ${E}_{j}^{{o}_{1}}$ is the pelican's target variable quantity depending on stage 1 and ${W}_{j}^{{o}_{1}}$ is its new state.
3.3.1.2 WAW
WAW is a development phase, during the second step, the pelicans gather something in throat containers after spreading their wings over the water to push its contents upward. Pelicans that use this tactic catch more creatures in areas that are being attacked. By simulating this behavior in pelicans, the suggested point of arrival POA can be improved and brought closer to the hunting area. The POA's local search and development capabilities are enhanced by this procedure. To arrive at a better solution, the program needs to look at positions close to the pelican position from a mathematical perspective. Equation (7) represents this pelican's hunting behavior analytically.
$${w}_{j,i}^{{o}_{2}}={w}_{j,i}+Q.\left(1\frac{s}{S}\right).\left(2.rand1\right).{w}_{j,i}$$(7)
where Q is constant and equal to 0.2, $Q\left(1\frac{s}{S}\right)$ is the w_{j,i} neighborhood radius, s is the iteration clock, and S is the maximum amount of iterations. ${w}_{j,i}^{{o}_{2}}$ is the jthpelican depending on phase 2 of the initialization entity of the ith dimension. Every category participant in the adjacent local search converges to a better response, and the neighborhood radius is represented by the coefficient $Q\left(1\frac{s}{S}\right)$. By this coefficient, the POA development capability is effectively brought closer to the best possible worldwide solution. Since the coefficient's quantity was higher in the first iteration, the area surrounding every element was also higher in significance. The $Q\left(1\frac{s}{S}\right)$ coefficient and each member's neighborhood radius decrease as the algorithm of repetition increases. To get the POA closer to a worldwide ideal solution permits us to scan the area around each population member at a smaller and more precise step dimensions, according to the utilization strategy. At this point, the new pelican location represented by equation (8), if accepted or rejected, is also based on legitimate updates.
$${W}_{j}=\{\begin{array}{c}\hfill {W}_{j}^{{O}_{2}},{E}_{j}^{{O}_{2}}<{E}_{j}\hfill \\ \hfill {W}_{j}\text{\hspace{0.17em}}else\hfill \end{array}$$(8)
where ${E}_{j}^{{O}_{2}}$ the pelican's target variable quantity depends on the second phase, and ${\text{W}}_{\text{j}}^{{\text{O}}_{2}}$ is its new state.
3.3.2 TCKR
The investigation builds upon the distinct ResNet50 network to tune its network structure. The two fully connected layers, the global average pooling layer, and the tunedResidual network (ResNet) module make up the whole network architecture. There are fifty convolutional layers in the total network two fully connected layers, and one global average pooling layer.
3.3.2.1 TCKR block
Examining optimizes the dimension of the convolution kernel in the Residual block (RB), based on the actual ResNet. Furthermore, a 1 × 1 convolution kernel is introduced to accomplish the goal of lowering the amount of parameters and enhancing operating speed.
Considering that the output of the RB, denoted as G(w), represents the optimal solution connecting for the input network W, expressed as G(w) the specific expression E(w) + lw is created by constructing E(w) = G(w) − lw.
$$E\left(w\right)={X}_{3}\sigma \left({X}_{2}\sigma \left({X}_{1}w\right)\right).$$(9)
The final outcome of the RB is
$$G\left(w\right)={X}_{3}\sigma \left({X}_{2}\sigma \left({X}_{1}w\right)\right)+lw$$(10)
Since the RB's output, represented by the symbol G(w), is the best connecting response for the input network X_{1},X_{2} and X_{3}, denote the quadratic registration variable Relu, and σ indicate the weights of the initial, second, and final layers.
3.4 Proposed technique
To predict the quality of cigarette packaging, a Pelicandriven tuned convolutional kernel ResNet (PTCKR) is utilized. This method uses Pelican, perhaps a deep learning framework or toolkit, to optimise convolutional kernels in the ResNet architecture. Because ResNet can handle complex feature hierarchies, it is very useful for image identification tasks. Figure 1 shows the flowchart for the PTCKR technique for analyzing cigarette packages.
ResNet is renowned for its deeplayered structure with residual connections. The network can learn complex patterns and characteristics unique to cigarette packaging by finetuning the convolutional kernels, which is essential for evaluating quality. In order to enable the model to generalise a new instances, this strategy probably entails considerable training on a dataset comprising varied examples of packaging flaws and attributes. The Pelicandriven method offers a streamlined, potentially automated pathway for maximising network performance and guaranteeing reliable and accurate predictions of cigarette packaging quality. Figure 2a displays the Residual Block (RB) in TCKR and Figure 2b displays the Network Connections in TCKR.
Residual Block (RB) in TCKR: The Residual Block (RB) of the Tuned Convolution Kernel ResNet (TCKR) is composed of numerous convolutional layers with kernel sizes of 1×1 and 3×3, subsequent to batch normalization and ReLU activation. Skip connections are utilized to add the input straight to the output, which helps with gradient flow and identity mappings. The process within the RB can be characterized as performing a series of modifications to the input and maintaining the original features through skip connections.
Network Connections in TCKR: TCKR's network connections use 1×1 convolution layers for dimensionality reduction and expansion, lowering model complexity and computational difficulty. At first, a 1×1 convolution decreases the input dimensions, then another 1×1 convolution restores them. This method assists control the number of parameters and boosts training while preserving the required data for reliable predictions.
The final outcome G(w) will not be zero even if the weight X_{j} ≈ 0 as shown by equation (10). The parameter l, which performs the linear function, modifies the size of w through the convolution functioning because the quantity of diversion and primary connections differs. The original convolution kernel proposed by GoogLeNet was of dimension 1×1.
This kernel can add and reduce the convolution kernel connections' complexity, which lowers the number of variables and speeds up instruction.
To recover the 64dimensional input to 32dimensional output, weinitially utilized a 1×1 32 convolution, and then a 1×1 64 convolution.
In the cigarette packaging process, the main crucial parameters for decisionmaking include image resolution and clarity, defect categorization, and algorithm efficacy. Image resolution (420 × 340 pixels) accurately captures packaging details for investigation. Clarity is improved by preprocessing with a Bilateral Filter (value = 3.2) that removes noise while maintaining edges. Defect categorization entails dividing the photos into three categories: optimal, decline, and emptyobject, each with 150 examples, to create a balanced dataset for proper training and evaluation. The POA improves the TCKR, allowing for exact modifications in the convolution kernel size and parameter reduction via 1 × 1 convolutions. These parameters collectively ensure robust training, accurate predictions, and effective quality control in cigarette packaging assessment.
Fig. 1 Flowchart for the PTCKR technique for analyzing cigarette packages. 
Fig. 2 The fundamental framework of TCKR: (a) RBs of TCKR (b) the amount of Network connections for the TCKR. 
4 Results
A laptop running Windows 11 with an Intel i5 7th Gen processor, 16 GB of RAM, and a Python 3.10.1 environment are used to perform our proposed approach. The suggested technique is evaluated in terms of precision, accuracy, F1score, and recall, and compared with the existing approaches, which are Multilayer Perceptron (MLP), Decision Trees (DTs), and Adaptive Boosting (AdaBoost) [17].
MSE is a measure that is used in the assessment of theperformance of predictive algorithms and plays a crucial role in the fine tuning of such models for improved accuracy of forecastingin diverse fields such as quality inspection of packing of cigarettes. Figure 3a displays the MSE's output. Accuracy measures the fraction of package traits that were correctly identified. This measures the overall accuracy of the model by establishing the rate at which actual observations match the model forecasted values. The accuracy output is displayed in Figure 3b.
The percentage of accurate outcomes (true positives and true negatives) among all instances investigated is known as accuracy. A comparison of accuracy is presented in Figure 4. Our suggestedPTKCR approach performed (91.70%), in contrast to (84.72%), (89.52%), and (90.16%) of the current techniques such as MLP, DTs, and AdaBoost. The outcomes demonstrate that the suggested strategy outperforms existing methodsfor assessing cigarette packaging quality.
Precision quantifies the percentage of correctly anticipated positive observations that produce actual positive measurements. A precision comparison is shown in Figure 5. While the existing methods MLP, DTs, and AdaBoost achieved (85.02%), (89.64%) and (90.25%) respectively, our proposedPTKCR methodology achieved (92%). The findings demonstrate that our suggested approach outperforms existing methods substantially in cigarette packaging quality assessment.
The percentage of true positives that are accurately identified is measured about recall. Figure 6 depicts an equivalent inquiry of recall. The PTKCR technique accomplished a recall of (92.60%), which is admirable to the memory to the traditional methods MLP (84.73%), DTs (89.54%), and AdaBoost (90.13%). The findings indicate that our suggested method outperforms the current techniques by a significant margin in terms of recall in evaluation of cigarette packaging quality.
One metric that balances both metrics is the F1score, which is the symmetrical implies among precision and recall. Figure 7 provides a comparative analysis of the F1 score. The PTKCR strategy we propose achieved an F1score of (91.50%), which is superior to the memory of the existing techniques MLP (84.20%), DTs (89.07%), and AdaBoost (89.75%). The results show that our proposed approach significantly improves F1score compared to the stateoftheart methods for evaluating the quality of cigarette packaging. Table 1 shows the overall result comparison.
Fig. 3 (a) output of MSE, (b) output of accuracy. 
Fig. 4 Result of accuracy. 
Fig. 5 Result of precision. 
Fig. 6 Result of recall. 
Fig. 7 Result of F1score. 
Overall result comparison.
5 Conclusion
Our study addresses significant issues in the tobacco industry's regulatory compliance by introducing the novel PTCKR algorithm, for cigarette package analysis. Images of cigarette packaging were selected from a wide range of datasets, we preprocessed the images by applying a bilateral filter to reduce noise and improve picture quality. Our Pythonbased PTCKR framework achieved impressive metrics, including a precision of 92%, recall of 92.60%, accuracy of 91.70% and F1score of 91.50%. These findings indicate that PTCKR is a strong quality control tool and represents important developments in the field of dependable and effective cigarette package inspection technologies. Cigarette packaging analysis's reliance on highquality input images was one of its limitations it can present problems in situations where the packaging images are of poor quality or insufficient quality.The future potential for use in its ability to be integrated with realtime image processing systems, which would allow for effective and automated quality control checks of cigarette packaging throughout the production and distribution processes.
Funding
2023 Science and Technology Project of Zhejiang China Tobacco Industry Co., LTD. (2023GY04).
Conflicts of interest
There is no conflict of interest between the authors.
Data availability statement
The data can be shared based on request.
Author contribution statement
All the authors contributed equally.
References
 L. Zhu, J. Zhang, W. Wang, Y. Li, X. Xu, C. Zhao, W. Wang, A deep mutual learning based strategy for cloudedge collaborative anomaly detection in cigarette packaging, in 2022 China Automation Congress (CAC). IEEE (2022). pp. 6950–6955 [Google Scholar]
 P. Ay, Y. Yasin, O. Elbek, M. Guner, T. Gezer, U.P. Sonmez, M. Ceyhan, F. Yildiz, E. Dagli, Will plain packaging of cigarettes achieve the expected? Perceptions among medical students, Tobacco Induced Diseases 20, 1–10 (2022) [CrossRef] [Google Scholar]
 D. Sun, Y. Pang, J. Lyu, L. Li, Current progress and challenges to tobacco control in China, China CDC Weekly 4, 101 (2022) [CrossRef] [Google Scholar]
 C.N. Tompkins, A. Burnley, A. McNeill, S.C. Hitchman, Factors that influence smokers' and exsmokers' use of IQOS: a qualitative study of IQOS users and exusers in the UK, Tobacco Control 30, 16–23 (2021) [CrossRef] [Google Scholar]
 T.T. Le, M.A. Jaffri, The association between smoking behaviors and prices and taxes per cigarette pack in the United States from 2000 through 2019, BMC Public Health 22, 856 (2022) [CrossRef] [Google Scholar]
 X. Wang, F. Shen, C. Chen, Q. Zhang, MBADNet: a mask block attentionbased foreign matter detection network for tobacco packages, Rev. Sci. Instrum. 95, 35–54 (2024) [Google Scholar]
 F. Alonso, K. Welding, J.E. Cohen, Laws and regulations governing rotation of health warning labels on cigarette packs in the Region of the Americas, Rev. Panamer. Salud Púb. 46, e123 (2022) [Google Scholar]
 A.L. Pipe, W. Evans, S. Papadakis, Smoking cessation: health system challenges and opportunities, Tobacco Control 31, 340–347 (2022) [CrossRef] [Google Scholar]
 W. Zhou, R. Li, J. Guo, Z. Li, R. Zhou, H. Zhu, Z. Jian, Y. Lai, Machine VisionBased Defect Classification Algorithm for Rolled Packages, International Conference on Applied Intelligence 43, 302–313 (2023) [Google Scholar]
 C.H.E.N. Zhibin, N.O.N.G. Yingxiong, L.I.A.N.G. Dong, S.U.N. Chen, W.E.I. Yi, Z.H.O.N.G. Zhengyan, Recognition of cigarette brand based on deep learning, Tobacco Sci. Technol. 53, 75–80 (2020) [Google Scholar]
 Y. Gao, Z. Xu, X. Xu, Enhanced cigarette pack counting via image enhancement techniques and advanced SAFE count methodology, Traitement du Signal 40, 2353–2365 (2023) [CrossRef] [Google Scholar]
 I.A. Muarofah, M.J. Vikri, I.A. Sa'ida, Realtime tomato quality detection system using you only look once (YOLOv7) algorithm, Ultimatics 15, 89–98 (2023) [Google Scholar]
 S.M. Abdullah, R. Huque, K. Siddiqi, M. Kanaan, S. Huque, S. Ullah, Z. Khan, Noncompliant packaging and illicit smokeless tobacco in Bangladesh, India and Pakistan: findings of a pack analysis, Tobacco Control 33, 333–340 (2024) [Google Scholar]
 H.M. Park, J.H. Park, YOLO network optimization with a single circular bounding box for detecting defective cigarettes, IEEE Access 11, 142951–142963 (2023) [CrossRef] [Google Scholar]
 B. Shi, M. Cheng, S. Zhang, L. He, Semisupervised image restoration algorithm for degraded plasticsealed cigarette packs, J. Comput. Appl. 43, 238 (2023) [Google Scholar]
 Z. Jin, F. Zhong, Q. Zhang, W. Wang, X. Wang, Visual detection of tobacco packaging film based on apparent features, Int. J. Adv. Robotic Syst. 18, 17298814211024839 (2021) [CrossRef] [Google Scholar]
 X. Wang, H. Li, Y. Wang, B. Fu, B. Ai, Intelligent detection and odor recognition of cigarette packaging paper boxes based on a homemade electronic nose, Micromachines 15, 458 (2024) [CrossRef] [Google Scholar]
Cite this article as: Bo Zhang, Chen Xia, Li Ming Zhu, Yu Can Qiu, Hu Fan, Xue Xu, Cigarette packaging analysis algorithm based on visual learning, Int. J. Simul. Multidisci. Des. Optim. 15, 20 (2024)
All Tables
All Figures
Fig. 1 Flowchart for the PTCKR technique for analyzing cigarette packages. 

In the text 
Fig. 2 The fundamental framework of TCKR: (a) RBs of TCKR (b) the amount of Network connections for the TCKR. 

In the text 
Fig. 3 (a) output of MSE, (b) output of accuracy. 

In the text 
Fig. 4 Result of accuracy. 

In the text 
Fig. 5 Result of precision. 

In the text 
Fig. 6 Result of recall. 

In the text 
Fig. 7 Result of F1score. 

In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.