Tobacco shred blending uniformity detection system and method based on image recognition
Through the tobacco wire doping uniformity detection system based on image recognition, the ConvNeXt_CM neural model is used to calculate the uniformity index of tobacco wire type and size, which solves the detection problems during tobacco wire doping, and achieves efficient and accurate uniformity judgment, improving production efficiency and product quality.
Patent Information
- Application Number
- CN202510456308.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-18
AI Technical Summary
The prior art is difficult to efficiently and accurately detect the uniformity in the tobacco mixing process, resulting in low production efficiency and unstable product quality.
The uniformity detection system of tobacco wire doping based on image recognition is used, and through data acquisition, image acquisition, tobacco wire recognition, type analysis and size analysis modules, combined with the ConvNeXt_CM neural model, the tobacco wire type uniformity and size uniformity index are calculated to determine whether tobacco wire doping is uniform.
It realizes efficient and accurate uniformity detection of tobacco mixing, improves production efficiency, optimizes production processes, ensures product quality consistency, and reduces errors caused by manual intervention.
Smart Images

Figure CN120339240A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of detecting the blending uniformity of cut tobacco, and specifically to a detecting system and method for the blending uniformity of cut tobacco based on image recognition. Background Art
[0002] With the increasing demand for automation and refinement in tobacco processing, during the cigarette production process, the blending ratio of raw cut tobacco has a crucial impact on the quality of cigarette sticks. Identifying the type of cut tobacco through the external characteristics of cut tobacco is of great significance for controlling the quality of cigarette products in actual production. The blending uniformity of cut tobacco has become an important factor in ensuring product quality. However, traditional manual inspection methods are not only inefficient but also difficult to accurately measure the blending situation of cut tobacco, resulting in uneven blending problems during production. These problems not only affect the quality of the final product but also increase production costs and reduce production efficiency. Therefore, how to achieve precise monitoring and automated detection during the cut tobacco blending process has become a technical problem to be urgently solved.
[0003] Currently, image recognition technology has been widely used in quality inspection in the industrial field. However, in the tobacco industry, most of the existing technologies only stay at the level of simple image analysis and cannot efficiently and accurately detect the blending uniformity of cut tobacco during the blending process. Therefore, there is an urgent need for a more refined and comprehensive detection scheme that can solve the problems of difficult detection and high difficulty in the blending uniformity of cut tobacco.
[0004] The above information disclosed in the background art section is only used to enhance the understanding of the background of the present disclosure. Therefore, it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0005] The purpose of the present invention is to provide a detecting system and method for the blending uniformity of cut tobacco based on image recognition to solve the problems raised in the above background art.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] A detecting system for the blending uniformity of cut tobacco based on image recognition, comprising:
[0008] A data acquisition module, which is used to obtain the blending quality, the fluffiness of cut tobacco, the conveying speed of the conveyor belt, and the photographing data of each type of cut tobacco for blending. By obtaining the historical cut tobacco images on the conveyor belt, preprocessing the historical images, and forming a training set by making selection box markings on the cut tobacco, the labels include the type, size, and coordinate position of the cut tobacco;
[0009] An image acquisition module, which is used to set the photographing interval time according to the conveying speed and photographing data, acquire continuous cut tobacco images after blending on the conveyor belt according to the photographing interval time, ensure that the continuous image content includes all the cut tobacco on the conveyor belt, and preprocess the cut tobacco images to form detection images;
[0010] A cut tobacco recognition module, which is used to establish a cut tobacco recognition model. The model is trained by using the historical images in the training set as the input of the cut tobacco recognition model and the labels corresponding to the historical images in the training set as the output of the model. The labels of the cut tobacco in the detection images are output by inputting the detection images into the trained model;
[0011] A type analysis module, which is used to calculate the coordinate distribution value and distance value between cut tobacco of each type according to the recognized cut tobacco type and the quantity and coordinate position of cut tobacco of each type, and calculate the cut tobacco type uniformity index based on the distance value and coordinate distribution value;
[0012] A size analysis module, which is used to calculate the proximity value of each cut tobacco to adjacent cut tobacco according to the coordinate position of the cut tobacco, calculate the size similarity with other cut tobacco according to the size of the cut tobacco, use the proximity value and similarity as the characteristics of each cut tobacco, classify the cut tobacco by the clustering method, and calculate the size uniformity index according to the number of clusters and the quantity of each cluster;
[0013] A uniformity judgment module, which is used to calculate the volume ratio of each type of cut tobacco through the blending quality and fluffiness of each type of cut tobacco, calculate the blending uniformity according to the cut tobacco type uniformity index, size uniformity index and volume ratio, and judge whether it is uniform according to the blending uniformity.
[0014] Further, the photographing data includes the width of the photographing area in the conveying direction of the conveyor belt and the camera photographing delay time;
[0015] The calculation formula for the photographing interval time is:
[0016]
[0017] where, is the photographing time interval, is the width of the photographing area, is the conveying speed of the conveyor belt, is the camera photographing delay time;
[0018] The method for preprocessing the image is to normalize the pixels of the image. The calculation formula is:
[0019]
[0020] Among them, is the normalized pixel value, is the pixel value of the image.
[0021] Furthermore, the cut tobacco recognition model is based on the ConvNeXt_CM neural model and mainly includes:
[0022] Convolutional layer:
[0023]
[0024] Among them, is the output of the convolution operation, is the input image, is the convolution kernel, is the bias term;
[0025] Residual connection:
[0026]
[0027] Among them, is the output after the residual connection;
[0028] Attention mechanism:
[0029]
[0030] Among them, is the feature after attention weighting, represents the Sigmoid activation function, , is the convolution kernel of the residual layer and the attention mechanism;
[0031] Convolution output:
[0032]
[0033] Among them, is the cut tobacco type, size and label output by the model, is the convolution kernel of the output layer, is the bias term of the output layer;
[0034] Among them, the mathematical expression of the sigmoid function is:
[0035]
[0036] Among them, is the sigmoid function, is the input of the sigmoid function.
[0037] Furthermore, the calculation formula for the coordinate distribution value between each type of cut tobacco is:
[0038]
[0039] Among them, is the coordinate set of the th type of cut tobacco, is the coordinate position of the th cut tobacco of the th type of cut tobacco, is the quantity of cut tobacco of each type;
[0040] Calculate the central value of each type of cut tobacco:
[0041]
[0042] Among them, the central value of each type of cut tobacco, is the coordinate position of the th cut tobacco;
[0043] Calculate the coordinate distribution value:
[0044]
[0045] Among them, is the coordinate distribution value, is the abscissa of the central value of each type of cut tobacco, is the ordinate of the central value of each type of cut tobacco.
[0046] Furthermore, the calculation formula for the distance value between each type of cut tobacco is:
[0047]
[0048] Among them, is the distance value between the th type of cut tobacco, is the coordinate position of the th cut tobacco of the th type of cut tobacco, is the coordinate position of the th cut tobacco of the th type of cut tobacco, are respectively the th quantity of the
[0049] Furthermore, the calculation formula for the cut tobacco type uniformity index is:
[0050]
[0051] Among them, is the cut tobacco type uniformity index, The quantity of the tobacco cut filler type is the coordinate distribution value of the the distance value of the -th type of tobacco cut filler, and + .
[0052] Furthermore, the calculation formula for the proximity value between each tobacco cut filler and its adjacent tobacco cut fillers is:
[0053]
[0054] where is the proximity value between each tobacco cut filler and its adjacent tobacco cut fillers, , are respectively the coordinate positions between the -th and -th tobacco cut fillers, .
[0055] The calculation formula for the size similarity between a tobacco cut filler and other tobacco cut fillers according to the size of the tobacco cut filler is:
[0056]
[0057] where is the size similarity, is the area of the -th tobacco cut filler, is the area of the -th tobacco cut filler.
[0058] Furthermore, the specific steps for classifying tobacco cut fillers by the clustering method are as follows:
[0059] Establish a characteristic function;
[0060]
[0061] where is the proximity value between the -th tobacco cut filler and its adjacent tobacco cut fillers, is the size similarity of the -th tobacco cut filler;
[0062] Randomly select data nodes as the initial centroids, indicating the number of categories after clustering, is a positive integer, and the -th initial centroid is expressed as: , indicating the The proximity value of a data node serving as an initial centroid indicating the size similarity of the th data node serving as an initial centroid, ;
[0063] For the feature vector of each detection point, calculate its distance to each initial centroid, and assign it to the cluster represented by the nearest centroid. The formula for calculating the distance to the initial centroid is:
[0064]
[0065] where indicates the distance between the th initial centroid and the th data node, , respectively indicate the proximity value and size similarity of the detection point corresponding to the th data node;
[0066] For each cluster, after each clustering is completed, recalculate the mean of all points within the cluster, and use this mean as the feature data of the new centroid. The update formula for the feature data of the th centroid is:
[0067]
[0068] where indicates the number of data nodes assigned to the th centroid, , indicate the proximity value and size similarity of the detection points corresponding to the data nodes assigned to the th centroid, , indicate the proximity value and size similarity of the detection points of the updated centroid;
[0069] Based on the feature vector of the updated centroid, re - cluster until the change in the position of all centroids is less than the threshold, then consider the clustering stable and end the clustering.
[0070] The formula for calculating the size uniformity index according to the number of clusters and the number of each cluster is:
[0071]
[0072] where is the size uniformity index of cut tobacco, is the number of cut tobacco in the th cluster, is the number of families.
[0073] Furthermore, the volume ratio of each type of cut tobacco is calculated by the blending mass and the fluffiness of the cut tobacco.
[0074]
[0075] Among them, is the volume ratio of the th type of cut tobacco, is the blending mass of the th type of cut tobacco, is the fluffiness of the th type of cut tobacco, is the type of cut tobacco variety, , is a positive integer;
[0076] The calculation formula for the blending uniformity is:
[0077]
[0078] Among them, is the blending uniformity, is the uniformity index of cut tobacco type, is the size uniformity index of cut tobacco, are the weights of the blending uniformity and the uniformity index of cut tobacco type respectively, ;
[0079] When , it is judged that the blending is uniform;
[0080] Among them, is the judgment threshold for blending uniformity.
[0081] The present invention also provides a method for detecting the blending uniformity of cut tobacco based on image recognition. The detection method is obtained by executing the above-mentioned detection system for the blending uniformity of cut tobacco based on image recognition. The specific steps include:
[0082] Step 1: Obtain the blending mass, the fluffiness of the cut tobacco, the conveying speed of the conveyor belt and the photographing data of each type of cut tobacco for blending. By obtaining the historical cut tobacco image on the conveyor belt, preprocess the historical image, and form a training set by marking the cut tobacco with a selection box label. The label includes the type, size and coordinate position of the cut tobacco;
[0083] Step 2: Set the photographing interval time according to the conveying speed and the photographing data. Obtain the continuous cut tobacco images after blending on the conveyor belt according to the photographing interval time, ensure that the content of the continuous images includes all the cut tobacco on the conveyor belt, and preprocess the cut tobacco images to form detection images;
[0084] Step 3: Establish a cut tobacco recognition model. Train the model by using the historical images in the training set as the input of the cut tobacco recognition model and the labels corresponding to the historical images in the training set as the output of the model. Input the detection image into the trained model to output the labels of the cut tobacco in the detection image;
[0085] Step 4: Calculate the coordinate distribution value and distance value between cut tobacco of each type according to the recognized cut tobacco type, the quantity and coordinate position of cut tobacco of each type, and calculate the cut tobacco type uniformity index based on the distance value and coordinate distribution value;
[0086] Step 5: Calculate the proximity value of each cut tobacco to adjacent cut tobaccos according to the coordinate position of the cut tobacco, calculate the size similarity with other cut tobaccos according to the size of the cut tobacco, take the proximity value and similarity as the features of each cut tobacco, classify the cut tobacco by the clustering method, and calculate the size uniformity index according to the number of clusters and the quantity of each cluster;
[0087] Step 6: Calculate the volume ratio of each type of cut tobacco through the blending quality and fluffiness of each type of cut tobacco, calculate the blending uniformity according to the cut tobacco type uniformity index and size uniformity index, and judge whether it is uniform according to the blending uniformity and volume ratio.
[0088] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention takes pictures of the blended cut tobacco on the conveyor belt, preprocesses the cut tobacco image to form a detection image, establishes a cut tobacco recognition model, inputs the detection image into the trained model to output the type, size and coordinate position of the cut tobacco in the detection image. According to the recognized cut tobacco type, the quantity and coordinate position of cut tobacco of each type, obtain the cut tobacco type uniformity index by calculating the distance value and coordinate distribution value, calculate the proximity value of each cut tobacco to adjacent cut tobaccos according to the coordinate position of the cut tobacco, calculate the size similarity with other cut tobaccos according to the size of the cut tobacco, classify the cut tobacco to calculate the size uniformity index, and calculate the blending uniformity through the blending quality, fluffiness of each type of cut tobacco, cut tobacco type uniformity index and size uniformity index to judge whether it is uniform;
[0089] The present invention constructs a detection system for the blending uniformity of cut tobacco based on image recognition, and provides an efficient and accurate automatic detection method. Through the preprocessing of historical images and the training of labeled tags, combined with the type, size and coordinate information of cut tobacco, it can accurately identify the spatial distribution of different types of cut tobacco and its uniformity on the conveyor belt. This method not only improves the detection accuracy, but also can set the photographing interval time according to the real-time conveyor belt data to realize the detection of continuous cut tobacco images, ensuring effective analysis of each cut tobacco;
[0090] The present invention helps to provide a more comprehensive and accurate analysis of tobacco blending by analyzing the type distribution, coordinate distribution, proximity values, and size similarity of cut tobacco. Through the comprehensive calculation of multi-dimensional indicators, it can better identify non-uniform phenomena in the blending process, optimize the production process, improve the consistency of product quality, and reduce errors caused by manual intervention. This method can achieve more flexible and efficient blending control in a dynamic production environment, ensuring the high quality and stability of the final product. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 It is a schematic diagram of the overall system structure of the present invention;
[0092] Figure 2 It is a schematic diagram of the overall method flow of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0093] To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with specific embodiments.
[0094] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the present invention should have the ordinary meanings understood by those of ordinary skill in the field to which the present invention pertains. The "first", "second", and similar terms used in the present invention do not denote any order, quantity, or importance, but are only used to distinguish different components. The terms "including" or "comprising" and the like mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. The terms "connected" or "coupled" and the like are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right", etc. are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0095] Embodiment:
[0096] Please refer to Figure 1 , the present invention provides a technical solution:
[0097] A cut tobacco blending uniformity detection system based on image recognition, including a data acquisition module, an image acquisition module, a cut tobacco recognition module, a type analysis module, a size analysis module, and a uniformity judgment module, wherein:
[0098] The data acquisition module is used to obtain the blending quality, tobacco fluffiness, conveyor speed of the conveyor belt, and photographing data of each type of tobacco blended. By acquiring the historical blended tobacco images on the conveyor belt, preprocessing the historical images, and forming a training set by marking the tobacco with bounding boxes, the labels include the type, size, and coordinate position of the tobacco.
[0099] The type of tobacco refers to tobacco of different varieties or different processing methods. Different types of tobacco have differences in morphology, density, hygroscopicity, combustibility, etc. These differences will directly affect their performance during the mixing and distribution process. Some types of tobacco may have a higher density and tighter particles; while other types of tobacco may be looser and have a larger volume. Due to the density difference, the tobacco with a higher density may settle more easily, while the fluffy tobacco will remain in the upper layer, resulting in an inability to achieve an ideal uniform distribution during the mixing process.
[0100] The size of the tobacco usually refers to the length and width of the tobacco, and may even include the cutting method and size. This factor also has an important impact on the blending uniformity. Larger tobacco (such as long strips or wider tobacco) may be difficult to be evenly distributed during the mixing process due to its larger volume and lower flexibility. They usually form more concentrated areas on the conveyor belt due to gravity and fluidity problems, thus affecting the overall blending uniformity. Smaller tobacco is more likely to be dispersed on the conveyor belt and may be more easily mixed with other types of tobacco, resulting in a relatively uniform distribution. However, overly small tobacco may lead to overmixing, affecting the hand feel and taste of the cigarette.
[0101] The image acquisition module is used to set the photographing interval time according to the conveyor speed and photographing data, obtain continuous tobacco images after blending on the conveyor belt according to the photographing interval time, ensure that the content of the continuous images includes all the tobacco on the conveyor belt, and preprocess the tobacco images to form detection images.
[0102] Since the tobacco moves on the conveyor belt at a certain speed, if the photographing interval is not appropriate, some parts of the tobacco or the entire tobacco may not be captured in time. For example, when the interval is too long, some of the moving tobacco may be missed between two adjacent photographs, resulting in missing or incomplete images, which affects subsequent image processing and analysis. By reasonably setting the photographing interval according to the speed of the conveyor belt and the photographing area, it can be ensured that each photograph can capture a complete image of all the tobacco on the conveyor belt, avoiding the situation of image omission.
[0103] Through appropriate shooting intervals, continuous image frames can be obtained, thus providing a consistent and smooth image sequence for subsequent image stitching, recognition and analysis. This is crucial for the subsequent detection of tobacco blending uniformity, especially when multiple images need to be compared and analyzed, continuous image data can provide higher analysis accuracy and consistency. According to the speed of the conveyor belt and the size of the shooting area, a reasonable shooting interval can be accurately calculated to optimize the number and quality of collected images. For example, a faster conveyor belt may require a shorter shooting interval, while a slower conveyor belt can appropriately increase the shooting interval. This can avoid data redundancy caused by too many images, or insufficient data caused by too few images, thereby improving image processing efficiency and accuracy.
[0104] In this embodiment, the photographing data includes the width of the photographing area in the conveying direction of the conveyor belt and the camera photographing delay time;
[0105] The calculation formula of the photographing interval is:
[0106]
[0107] in, is the time interval between photos. is the width of the photo area, is the conveyor belt speed, Delay time for camera to take pictures.
[0108] The image normalization method is to map pixel values to a range of 0 to 1 by dividing each pixel value by the maximum pixel value of the image. Image normalization can eliminate image data differences caused by factors such as different lighting, shooting angles, and shooting equipment. This makes the image more stable and consistent under different acquisition environments, providing a more reliable foundation for subsequent image recognition and analysis. After image normalization, the data input in the processing process is more consistent in value range and distribution, avoiding the difficulty of algorithm processing caused by distribution differences of different images. For example, machine learning models rely on data consistency during training or inference. Normalization can accelerate the convergence of the model and avoid certain values that are too large or too small from affecting the learning process of the model.
[0109] The method for preprocessing the image is to normalize the pixels of the image. The calculation formula is:
[0110]
[0111] in, is the normalized pixel value, is the pixel value of the image.
[0112] The tobacco shred recognition module is used to establish a tobacco shred recognition model. By using the historical images in the training set as the input of the tobacco shred recognition model and the labels corresponding to the historical images in the training set as the output of the model, the model is trained. By inputting the detection image into the trained model, the label of the tobacco shreds in the detection image is output.
[0113] ConvNeXt_CM is an improved model based on the convolutional neural network, which combines the powerful local feature extraction ability of the traditional convolutional neural network with the advantages of the modern neural network architecture. It can efficiently extract detailed features from images, especially showing strong performance in detecting fine differences. There may be subtle visual differences in the size and type of tobacco shreds. At the same time, the type and size of tobacco shreds not only involve local details but also may involve larger context information. Traditional image processing methods may be difficult to effectively capture these features. The design of the ConvNeXt_CM model enables it to better process such detailed information. At the same time, ConvNeXt_CM can more comprehensively understand the image content through the combination of global and local information, improving the recognition accuracy of the model for tobacco shreds. Therefore, it can more accurately identify different types and sizes of tobacco shreds. In the detection of the mixing uniformity of tobacco shreds, the system needs to distinguish different types and sizes of tobacco shreds. Using ConvNeXt_CM, the tobacco shreds can be classified quickly and efficiently, and then the mixing uniformity can be determined. By accurately modeling the features of each type of tobacco shred, the ability to detect bad mixing can be improved, ensuring the quality of the product.
[0114] In this embodiment, the tobacco shred recognition model is based on the ConvNeXt_CM neural model and mainly includes:
[0115] Convolutional layer:
[0116]
[0117] Among them, is the output of the convolution operation, is the input image, is the convolutional kernel, is the bias term;
[0118] Residual connection:
[0119]
[0120] Among them, is the output after the residual connection;
[0121] Attention mechanism:
[0122]
[0123] Among them, is the feature after attention weighting, represents the Sigmoid activation function, , are the convolution kernels of the residual layer and the attention mechanism;
[0124] Convolution output:
[0125]
[0126] Among them, are the cut tobacco type, size and label output by the model, is the convolution kernel of the output layer, is the bias term of the output layer;
[0127] Among them, the mathematical expression of the sigmoid function is:
[0128]
[0129] Among them, is the sigmoid function, is the input of the sigmoid function.
[0130] The type analysis model is used to calculate the coordinate distribution value and distance value between cut tobacco of each type according to the identified cut tobacco type and the quantity and coordinate position of cut tobacco of each type, and calculate the cut tobacco type uniformity index based on the distance value and coordinate distribution value.
[0131] In this embodiment, the calculation formula of the coordinate distribution value between cut tobacco of each type is:
[0132]
[0133] Among them, is the coordinate set of the cut tobacco of the th type, is the coordinate position of the th cut tobacco of the th type, is the quantity of cut tobacco of each type;
[0134] Calculate the central value of cut tobacco of each type:
[0135]
[0136] Among them, is the central value of cut tobacco of each type, is the coordinate position of the th cut tobacco;
[0137] Calculate the coordinate distribution value:
[0138]
[0139] Among them, is the coordinate distribution value, is the abscissa of the center value of each type of cut tobacco, is the ordinate of the center value of each type of cut tobacco.
[0140] The coordinate distribution value refers to the regularity or concentration degree of the coordinate positions of each type of cut tobacco in the image. It obtains the relative positions and dispersion ranges between the cut tobaccos by analyzing the distribution of the cut tobacco in space. In other words, it indicates whether the position distribution of different types of cut tobacco is uniform, whether there are certain types of cut tobacco concentrated in certain areas, or whether the distribution is relatively scattered. If the distribution of the cut tobacco is relatively uniform, the coordinate distribution value will present a relatively stable or uniform distribution pattern. This helps to evaluate whether the blending of the cut tobacco in the cigarette manufacturing process is uniform, and avoid too much or too little cut tobacco in certain areas, thereby affecting the quality of the final tobacco product.
[0141] In this embodiment, the calculation formula for the distance value between each type of cut tobacco is:
[0142]
[0143] Among them, is the distance value between the th type of cut tobacco, is the coordinate position of the th cut tobacco of the th type of cut tobacco, is the coordinate position of the th cut tobacco of the th type of cut tobacco, are the numbers of the
[0144] The distance value refers to the distance between different types of cut tobacco, and is used to calculate the distance between adjacent cut tobaccos. By analyzing the distance value between the cut tobaccos, it can be intuitively understood whether there are too large gaps or aggregation phenomena between different types of cut tobacco. If the distance is too large, it may mean that the cut tobacco types in certain areas are too sparse.
[0145] In this embodiment, the calculation formula for the cut tobacco type uniformity index is:
[0146]
[0147] Among them, is the cut tobacco type uniformity index, is the number of cut tobacco types, is the Coordinate distribution values of different types of cut tobacco is the distance value of the -th type of cut tobacco , + .
[0148] The cut tobacco type uniformity index is a comprehensive value obtained by synthesizing the coordinate distribution value and the distance value, representing the overall uniformity of cut tobacco blending. This index is usually a numerical standard indicating whether the distribution of different cut tobacco types is balanced, reflecting the overall quality of cut tobacco blending. A lower value generally indicates better uniformity, while a higher value may indicate uneven blending.
[0149] The cut tobacco type uniformity index can quantify the blending uniformity of cut tobacco and assist in quality control during the production process. By comprehensively considering the coordinate distribution and distance values, this index can provide specific quantitative references for the production process, helping to adjust equipment and process parameters to ensure the stable quality of each cigarette.
[0150] A size analysis module, which is used to calculate the proximity value of each cut tobacco to adjacent cut tobacco according to the coordinate position of the cut tobacco, calculate the size similarity with other cut tobacco according to the size of the cut tobacco, use the proximity value and similarity as the characteristics of each cut tobacco, classify the cut tobacco by the clustering method, and calculate the size uniformity index according to the number of clusters and the number of each cluster.
[0151] In this embodiment, the calculation formula for calculating the proximity value of each cut tobacco to adjacent cut tobacco is:
[0152]
[0153] where is the proximity value of each cut tobacco to adjacent cut tobacco , are respectively the -th and the -th cut tobacco
[0154] The proximity value refers to the spatial distance between a cut tobacco and its adjacent cut tobacco. That is to say, by calculating the coordinate position difference between each cut tobacco and its adjacent cut tobacco, the "proximity" degree between them can be obtained. Through the proximity value, the distribution density of cut tobacco in space can be measured. A larger proximity value may indicate that the cut tobacco is sparser in some areas, which will also affect the uniformity.
[0155] The calculation formula for calculating the size similarity of a cut tobacco with other cut tobacco according to the size of the cut tobacco is:
[0156]
[0157] Among them, is the size similarity, is the area of the nth cut tobacco, is the area of the mth cut tobacco.
[0158] The size similarity measures the similarity degree of the sizes (such as length and width, volume, etc.) between cut tobaccos. By calculating the size of each cut tobacco, the size difference between it and other cut tobaccos is analyzed. Cut tobaccos with higher similarity have similar sizes, while cut tobaccos with lower similarity have larger size differences. If the size similarity of cut tobaccos is high, it indicates that the sizes of cut tobaccos are relatively consistent, and the contribution of each cut tobacco in the blending process to the final product is similar, which helps to maintain uniform tobacco quality and taste.
[0159] In this embodiment, the specific steps for classifying cut tobaccos by the clustering method are as follows:
[0160] Establish a characteristic function;
[0161]
[0162] Among them, is the proximity value of the nth cut tobacco to adjacent cut tobaccos, is the size similarity of the nth cut tobacco. is the size similarity of the mth cut tobacco.
[0163] Randomly select data nodes as the initial centroids, represents the number of categories after clustering, is a positive integer, where the th initial centroid is expressed as: , represents the proximity value of the th data node used as the initial centroid, represents the size similarity of the th data node used as the initial centroid, is a positive integer, and ;
[0164] For the feature vector of each detection point, calculate its distance to each initial centroid, and assign it to the cluster represented by the nearest centroid. The formula for calculating the distance to the initial centroid is:
[0165]
[0166] Among them, represents the th initial centroid and the The distance between data nodes and respectively represent the proximity value and size similarity of the monitoring points corresponding to the th data node;
[0167] For each cluster, after each clustering is completed, recalculate the mean value of all points within the cluster, and use this mean value as the feature data of the new centroid. The update formula for the th centroid feature data is;
[0168]
[0169] where represents the number of data nodes assigned to the th centroid, and represent the proximity value and size similarity of the detection points corresponding to the data nodes assigned to the th centroid, and represent the proximity value and size similarity of the detection points of the updated centroid;
[0170] According to the feature vector of the updated centroid, re - cluster until the change in the position of all centroids is less than the threshold, then consider the clustering stable and end the clustering.
[0171] The clustering algorithm can divide the cut tobacco into multiple categories (clustering families) according to the proximity value and size similarity of the cut tobacco. The purpose of clustering is to group the cut tobacco with similar characteristics into one category, helping to analyze which cut tobacco is similar in terms of size, distribution, etc., and which are significantly different. Through the clustering method, the noise or outliers in the data can be separated, so as to more clearly identify the areas or groups with uneven blending.
[0172] After clustering analysis, evaluate the blending uniformity according to the number of families in the clustering result and the number of each family. If the number of families in the clustering is small and the number distribution of each family is uniform, it indicates that the distribution and size of the cut tobacco are relatively consistent and the blending is uniform; if the number of families in the clustering is large and the difference in the number of each family is large, it may indicate obvious non - uniformity in the blending. The clustering method can help identify regional problems existing in the blending process. By clustering the cut tobacco with similar characteristics into the same category, it can be easily seen which areas have uneven cut tobacco size or distribution, thus helping the production personnel to optimize the distribution and blending process of the cut tobacco.
[0173] The calculation formula for the size uniformity index according to the number of families in the clustering and the number of each family is:
[0174]
[0175] where is the size uniformity index of cut tobacco is the number of cut tobacco within the number of clusters
[0176] This index is calculated based on the number of each category (cluster) and the size distribution of cut tobacco in each cluster after classifying cut tobacco by the clustering method. It comprehensively considers the size distribution uniformity of cut tobacco and reflects the consistency of sizes in the entire cut tobacco sample. The size uniformity index can quantify the size distribution of cut tobacco in all clustering clusters. If this index is small, it indicates that the sizes of cut tobacco are relatively uniform and the entire blending process is relatively balanced; if this index is large, it means that there are significant differences in the sizes of cut tobacco and the blending is uneven.
[0177] The uniformity judgment module is used to calculate the volume ratio of each type of cut tobacco through the blending mass and fluffiness of each type of cut tobacco, calculate the blending uniformity based on the cut tobacco type uniformity index, size uniformity index and volume ratio, and judge whether it is uniform according to the blending uniformity.
[0178] In this embodiment, the volume ratio of each type of cut tobacco is calculated through the blending mass and fluffiness of each type of cut tobacco;
[0179]
[0180] wherein, is the volume ratio of the th type of cut tobacco is the blending mass of the th type of cut tobacco is the fluffiness of the th type of cut tobacco is the type of cut tobacco variety , is a positive integer
[0181] The blending mass refers to the weight of each type of cut tobacco, which represents the mass contribution of cut tobacco during the mixing process.
[0182] The fluffiness reflects the looseness of cut tobacco. Cut tobacco with high fluffiness occupies more space in volume but is lighter in weight; cut tobacco with low fluffiness has a smaller volume but is heavier in weight.
[0183] The volume ratio calculated through these two parameters can more accurately reflect the space density occupied by each type of cut tobacco during the blending process, and thus can reveal the uneven phenomenon in the blending. If there are significant differences in the volume ratios of different types of cut tobacco, it may lead to uneven distribution of cut tobacco after mixing and affect the overall blending uniformity.
[0184] The calculation formula for calculating the blending uniformity is:
[0185]
[0186] Among them, is the blending uniformity, is the uniformity index of tobacco cut type, is the size uniformity index of tobacco cut, are the weights of the blending uniformity and the uniformity index of tobacco cut type respectively, ;
[0187] When , it is judged that the blending is uniform;
[0188] Among them, is the judgment threshold of blending uniformity.
[0189] The type of tobacco cut can refer to tobacco cut of different kinds or different sources, which may vary in morphology, density, size, etc. By evaluating the uniformity of different types of tobacco cut, it can be ensured that when blending different kinds of tobacco cut, there will be no excessive aggregation of a certain type, and it can be avoided that the proportion of a certain type of tobacco cut is too large or too small, resulting in uneven blending.
[0190] The size difference of tobacco cut will directly affect the blending uniformity. By analyzing the size uniformity of tobacco cut, it can be ensured that during the mixing process, tobacco cut of various sizes can be reasonably distributed, and it can be avoided that tobacco cut that is too large or too small tends to certain areas. The size uniformity index helps to quantify this phenomenon of uneven distribution, and further improves the accuracy of blending.
[0191] The judgment of blending uniformity depends not only on a single feature, but comprehensively considers multiple indicators, such as type uniformity, size uniformity and volume ratio. This enables the system to more comprehensively understand the overall situation of blending, and thus take corresponding adjustment measures according to the specific situation of each indicator. This multi-dimensional analysis helps to discover potential blending problems (such as too much tobacco cut of a certain type or a certain size), and timely adjust the production process to optimize the results.
[0192] Calculating the blending uniformity based on the uniformity index of tobacco cut type, the size uniformity index and the volume ratio helps to provide a more comprehensive and accurate analysis of tobacco cut blending. Through the comprehensive calculation of multi-dimensional indicators, it is possible to better identify uneven phenomena during the blending process, optimize the production process, improve the consistency of product quality, and reduce errors caused by manual intervention. This method can achieve more flexible and efficient blending control in a dynamic production environment, and ensure the high quality and stability of the final product.
[0193] Please refer to Figure 2, the present invention further provides a method for detecting the blending uniformity of cut tobacco based on image recognition, which is obtained by the above-mentioned detection system for the blending uniformity of cut tobacco based on image recognition. The specific steps include:
[0194] Step 1: Obtain the blending quality, cut tobacco fluffiness, conveyor speed of the conveyor belt, and photographing data of each type of cut tobacco for blending. By obtaining the cut tobacco images of historical blending on the conveyor belt, preprocess the historical images, and form a training set by marking tags for the cut tobacco with bounding boxes. The tags include the type, size, and coordinate position of the cut tobacco;
[0195] Step 2: Set the photographing interval time according to the conveyor speed and photographing data. Obtain the consecutive cut tobacco images after blending on the conveyor belt according to the photographing interval time, ensure that the content of the consecutive images includes all the cut tobacco on the conveyor belt, and preprocess the cut tobacco images to form detection images;
[0196] Step 3: Establish a cut tobacco recognition model. Train the model by taking the historical images in the training set as the input of the cut tobacco recognition model and the tags corresponding to the historical images in the training set as the output of the model. Input the detection images into the trained model to output the tags of the cut tobacco in the detection images;
[0197] Step 4: Calculate the coordinate distribution value and distance value between each type of cut tobacco according to the recognized cut tobacco type, the quantity, and the coordinate position of each type of cut tobacco, and calculate the cut tobacco type uniformity index based on the distance value and the coordinate distribution value;
[0198] Step 5: Calculate the proximity value of each cut tobacco to adjacent cut tobacco according to the coordinate position of the cut tobacco, calculate the size similarity with other cut tobacco according to the size of the cut tobacco. Take the proximity value and the similarity as the features of each cut tobacco, classify the cut tobacco by the clustering method, and calculate the size uniformity index according to the number of clusters and the quantity of each cluster;
[0199] Step 6: Calculate the volume ratio of each type of cut tobacco according to the blending quality and cut tobacco fluffiness of each type of cut tobacco. Calculate the blending uniformity according to the cut tobacco type uniformity index and the size uniformity index, and judge whether it is uniform according to the blending uniformity and the volume ratio.
[0200] The above formulas are all calculated by taking the numerical value after dimensionless. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0201] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those skilled in the art will realize that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0202] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units. They may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] As described above, the specific implementation manners of the present application are only described, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all should be covered by the protection scope of the present application.
Claims
1. A detection system for the uniformity of cut tobacco blending based on image recognition, characterized in that, Including: A data acquisition module, which is used to preprocess historical images by acquiring images of cut tobacco blended on a conveyor belt in history, and form a training set by marking tags for the cut tobacco with bounding boxes. The tags include the type, size of the cut tobacco, and the coordinate positions of the cut tobacco in the image. At the same time, the blending mass, cut tobacco fluffiness, conveyor belt conveying speed, and photographing data of each type of cut tobacco blended during blending are acquired; An image acquisition module, which is used to set the photographing interval time according to the conveying speed and photographing data, acquire continuous cut tobacco images after blending on the conveyor belt according to the photographing interval time, ensure that the content of the continuous images includes all the cut tobacco on the conveyor belt, and preprocess the cut tobacco images to form detection images; A cut tobacco recognition module, which is used to establish a cut tobacco recognition model. The historical images in the training set are used as the input of the cut tobacco recognition model, and the tags corresponding to the historical images in the training set are used as the output of the model to train the model. By inputting the detection images into the trained model, the tags of the cut tobacco in the detection images are output; A type analysis module, which is used to calculate the coordinate distribution value and distance value between each type of cut tobacco according to the recognized cut tobacco type and the quantity and coordinate positions of each type of cut tobacco, and calculate the cut tobacco type uniformity index based on the distance value and coordinate distribution value; A size analysis module, which is used to calculate the proximity value between each cut tobacco and adjacent cut tobacco according to the coordinate positions of the cut tobacco, calculate the size similarity with other cut tobacco according to the size of the cut tobacco, use the proximity value and similarity as the features of each cut tobacco, classify the cut tobacco by the clustering method, and calculate the size uniformity index according to the number of clusters and the quantity of each cluster; A uniformity judgment module, which is used to calculate the volume ratio of each type of cut tobacco by the blending mass and cut tobacco fluffiness of each type of cut tobacco, calculate the blending uniformity according to the cut tobacco type uniformity index, size uniformity index, and volume ratio, and judge whether it is uniform according to the blending uniformity.
2. The image recognition-based cut tobacco blending uniformity detection system according to claim 1, wherein: The photographing data includes the width of the photographing area in the conveying direction of the conveyor belt and the camera photographing delay time; The calculation formula for the photographing interval time is: , Among them, is the photographing time interval, is the width of the photographing area, is the conveying speed of the conveyor belt, is the camera photographing delay time; The method for preprocessing the image is to normalize the pixels of the image, and the calculation formula is: , Among them, is the normalized pixel value, is the pixel value of the image.
3. The uniformity detection system for cut tobacco blending based on image recognition according to claim 1, wherein: The cut tobacco recognition model is based on the ConvNeXt_CM neural model, mainly including: Convolution layer: , Among them, is the output of the convolution operation, is the input image, is the convolution kernel, is the bias term; Residual connection: , Among them, is the output after residual connection; Attention mechanism: , Among them, is the feature after attention weighting, represents the Sigmoid activation function, , is the convolution kernel of the residual layer and the attention mechanism; Convolution output: , Among them, are the cut tobacco type, size, and label output by the model, the convolutional kernel of the output layer, is the bias term of the output layer; Among them, the mathematical expression of the sigmoid function is: , Among them, is the sigmoid function, is the input of the sigmoid function.
4. The tobacco blending uniformity detection system based on image recognition according to claim 1, characterized in that: The calculation formula for the coordinate distribution value between each type of cut tobacco is: , Among them, is the coordinate set of the type of cut tobacco, is the coordinate position of the th cut tobacco of the type of cut tobacco, is the quantity of cut tobacco for each type; Calculate the central value of each type of cut tobacco: , Among them, the central value of each type of cut tobacco, is the coordinate position of the cut tobacco; Calculate the coordinate distribution value: , Among them, is the coordinate distribution value, is the abscissa of the central value of each type of cut tobacco, is the ordinate of the central value of each type of cut tobacco.
5. The uniformity detection system for cut tobacco blending based on image recognition according to claim 4, wherein: The calculation formula for the distance value between each type of cut tobacco is: , Among them, is the distance value between the types of cut tobacco, is the coordinate position of the th cut tobacco of the th type of cut tobacco, is the coordinate position of the th cut tobacco of the th type of cut tobacco, are respectively the quantities of the types of cut tobacco.
6. The tobacco blending uniformity detection system based on image recognition according to claim 5, characterized in that: The calculation formula for the cut tobacco type uniformity index is: , Among them, is the uniformity index of tobacco cut type, is the quantity of tobacco cut type, is the coordinate distribution value of the th type of tobacco cut, is the distance value of the th type of tobacco cut, are the weights of the coordinate distribution value and the distance value respectively, + .
7. The tobacco blending uniformity detection system based on image recognition according to claim 1, characterized in that: The calculation formula for calculating the proximity value between each cut tobacco and adjacent cut tobacco is: , Among them, is the proximity value between each cut tobacco and the adjacent cut tobacco, , respectively are the and coordinate positions between the ; The calculation formula for calculating the size similarity with other cut tobacco according to the size of the cut tobacco is: , Among them, is the size similarity degree, is the area of the th cut tobacco, is the area of the th cut tobacco.
8. The uniformity detection system for cut tobacco blending based on image recognition according to claim 7, wherein: The specific steps for classifying the cut tobacco by the clustering method are as follows; Establish a feature function; , Among them, is the proximity value of the th cut tobacco to the adjacent cut tobacco, is the size similarity of the th cut tobacco; Randomly select data nodes as the initial centroids, indicating the number of clusters after clustering, is a positive integer, where the th initial centroid is expressed as: , indicating the proximity value of the th data node as the initial centroid, indicating the size similarity of the th data node as the initial centroid, is a positive integer, and ; For the feature vector of each detection point, calculate its distance to each initial centroid, and assign it to the cluster represented by the nearest centroid. The formula for calculating the distance to the initial centroid is as follows: , Among them, represents the distance between the th initial centroid and the -th data node, and respectively represent the proximity value and size similarity of the monitoring point corresponding to the th data node; For each cluster, after each clustering is completed, recalculate the mean of all points within the cluster, and use this mean as the feature data of the new centroid. The update formula for the feature data of the th centroid is as follows; , Among them, represents the number of data nodes assigned to the th centroid, , represents the proximity value and size similarity of the detection points corresponding to the data nodes assigned to the centroids, , represents the proximity value and size similarity of the detection points of the updated centroid; Based on the feature vectors of the updated centroids, re-cluster until the change in the positions of all centroids is less than the threshold, then consider the clustering stable and end the clustering; According to the number of clusters and the number of each cluster, the calculation formula for the size uniformity index is as follows: , Among them, is the size uniformity index of cut tobacco, is the quantity of cut tobacco within the i-th family, is the number of families.
9. The tobacco blending uniformity detection system based on image recognition according to claim 1, characterized in that: Calculate the volume ratio of each type of cut tobacco by the blending mass and cut tobacco fluffiness of each type of cut tobacco; , Among them, is the volume ratio of the th cut tobacco type, is the blending mass of the th cut tobacco type, is the bulk density of the th cut tobacco type, is the type of cut tobacco variety, , is a positive integer; The calculation formula for calculating the blending uniformity is as follows: , Among them, is the blending uniformity, is the uniformity index of tobacco cut type, is the uniformity index of the size of tobacco cut, are the weights of the blending uniformity and the uniformity index of tobacco cut type respectively, ; When it is determined that the blending is uniform; Among them, is the blending uniformity judgment threshold.
10. A method for detecting the uniformity of cut tobacco blending based on image recognition, characterized in that: The detection method is obtained by being executed by a cut tobacco blending uniformity detection system based on image recognition according to any one of claims 1-9. The specific steps include: Step 1: Obtain the cut tobacco images of historical blending on the conveyor belt, preprocess the historical images, and form a training set by marking the cut tobacco with bounding boxes. The labels include the type, size of the cut tobacco, and the coordinate positions of the cut tobacco in the image. At the same time, obtain the blending mass, cut tobacco fluffiness, conveyor belt speed, and photographing data of each type of cut tobacco incorporated during blending; Step 2: Set the photographing interval time according to the conveyor belt speed and photographing data. Obtain the consecutive cut tobacco images after blending on the conveyor belt according to the photographing interval time, ensure that the content of the consecutive images includes all the cut tobacco on the conveyor belt, and preprocess the cut tobacco images to form detection images; Step 3: Establish a cut tobacco recognition model. Train the model by using the historical images in the training set as the input of the cut tobacco recognition model and the labels corresponding to the historical images in the training set as the output of the model. Input the detection images into the trained model to output the labels of the cut tobacco in the detection images; Step 4: According to the identified cut tobacco types, the quantity and coordinate positions of each type of cut tobacco, calculate the coordinate distribution value and distance value between each type of cut tobacco, and calculate the cut tobacco type uniformity index based on the distance value and coordinate distribution value; Step 5: Calculate the proximity value of each cut tobacco to adjacent cut tobacco according to the coordinate positions of the cut tobacco, calculate the size similarity with other cut tobacco according to the size of the cut tobacco, use the proximity value and similarity as the features of each cut tobacco, classify the cut tobacco by the clustering method, and calculate the size uniformity index according to the number of clusters and the number of each cluster; Step 6: Calculate the volume ratio of each type of cut tobacco by the blending mass and cut tobacco fluffiness of each type of cut tobacco, calculate the blending uniformity according to the cut tobacco type uniformity index and size uniformity index, and judge whether it is uniform according to the blending uniformity and volume ratio.