Whole-category flexible sorting method based on AI for tobacco enterprises
Patent Information
- Application Number
- CN202411116094.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-15
Smart Images

Figure CN118950512A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tobacco enterprise sorting, and in particular to an AI-based flexible sorting method for all categories of tobacco enterprises. Background Art
[0002] With the growth of the new generation of tobacco consumers, the demand for various special-shaped tobaccos has exploded. In order to meet consumer demand, various novel cigarettes need to be produced. There are many kinds of novel cigarettes, some of which are various popping beads and flavored cigarettes, and some are cigarettes of different sizes, including medium cigarettes, slim cigarettes, and short cigarettes. Medium cigarettes include short medium cigarettes and standard medium cigarettes, and slim cigarettes include long slim cigarettes and standard slim cigarettes. Some have both popping beads and different sizes.
[0003] When novelty cigarettes of different sizes enter the automated finished product warehouse, they need to go through the sorting system, the robot stacking system, and the stacker transportation system to finally achieve automated storage and delivery. In order to warehouse these novelty cigarettes together with traditional cigarettes, it is necessary to complete the adaptive transformation of automatic sorting of finished product cigarettes in the finished product warehouse, automatic robot stacking, automatic storage, and automatic outbound storage, so that the system can complete the sorting, stacking, storage, and outbound storage of novelty cigarettes.
[0004] Ordinary cigarettes and novelty cigarettes are put into storage on the same line, and the novelty cigarettes are put into storage at irregular times and in irregular batches. This is flexible production. Flexibility is relative to rigidity. The traditional rigid production line mainly realizes the production of ordinary cigarettes.
[0005] There is currently no method for sorting these special-shaped cigarettes (of different sizes and shapes), so they cannot be stored in warehouses and need to be manually stacked and stored, which is inefficient. Summary of the invention
[0006] The present disclosure proposes an AI-based flexible sorting method for all categories of tobacco companies to solve the above-mentioned technical problems.
[0007] A full-category flexible sorting method based on AI for tobacco enterprises, the method comprising: novelty cigarettes and ordinary cigarettes enter the sorting line; AI vision recognizes the brand and the carton sealing machine number, and obtains the sorting sequence according to the large model; the scanning head reads the No. 1 engineering code or the QR code, and reads the brand and the carton sealing machine number; the photoelectric timing starts; the sorting sequence is compared with the scanning result; if the sorting sequence and the scanning result are consistent, when the timing time is up, the slider moves; the cigarette pieces enter the corresponding sorting channel.
[0008] In some embodiments, if the sorting sequence is inconsistent with the scanning result, the slider moves according to the AI visual recognition result; the cigarette pieces enter the corresponding sorting channel.
[0009] In some embodiments, the sorting sequence is obtained according to the large model, wherein the large model is constructed, including: finding the edge in the area of interest of the cigarette piece on the sorting line, and obtaining the coordinate value of the edge point; calculating the gradient value of the edge point in the x and y directions; calculating the gradient strength and gradient angle of the edge point; traversing the edge points, saving the x and y gradients corresponding to the edge points, and normalizing the gradient strength; converting the edge point coordinates to relative coordinates relative to the center; calculating the gradient value of the edge point in the x and y directions; calculating the gradient strength and gradient angle of the edge point; calculating the correlation between the template edge gradient and the target image edge gradient through a normalized cross-correlation algorithm to create a large model for novel cigarette piece identification; fusing the novel cigarette piece identification large model with the ordinary cigarette piece visual identification large model to obtain the large model, and completing the construction of the large model.
[0010] In some embodiments, the method of obtaining a sorting sequence based on a large model includes: extracting contour pixel points corresponding to images of interest for all categories of cigarettes on the sorting line; generating specification attribute information of corresponding images of interest based on the contour pixel points; and sorting and arranging all images of interest based on the specification attribute information to obtain a sorting sequence.
[0011] In some embodiments, the normalized cross correlation algorithm is NCC, which is formulated as: Among them, E(S i,j ) represents the sub-image at (i, j), and E(T) represents the average gray value of the template.
[0012] In some embodiments, the novel cigarette identification model is optimized using the PatMax algorithm, the PatQuicks algorithm, and / or the NCC algorithm.
[0013] Beneficial effects of the present disclosure: The present disclosure is a full-category flexible sorting method based on AI for tobacco enterprises, which can perform "flexible" automatic sorting, identify and sort all categories of cigarettes to be sorted including novelty cigarettes, and improve sorting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0015] Figure 1 It is a flowchart showing a tobacco enterprise's AI-based flexible sorting method for all categories according to some embodiments of the present disclosure.
[0016] Figure 2 is a schematic diagram showing a sorting line according to some embodiments of the present disclosure.
[0017] Figure 3is a flow chart (in its entirety) illustrating a sorting method according to some embodiments of the present disclosure;
[0018] Figure 4 It is a flow chart showing a large model optimization and sorting method according to some embodiments of the present disclosure (with the construction of a large model incorporated). DETAILED DESCRIPTION
[0019] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0020] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0021] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0022] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0023] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0024] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0025] With the growth of the new generation of tobacco consumers, the demand for various special-shaped tobaccos has exploded. In order to meet consumer demand, various novel cigarettes need to be produced. There are many kinds of novel cigarettes, some are various popping beads and flavored cigarettes, some are cigarettes of different sizes, including medium cigarettes, slim cigarettes, and short cigarettes. Medium cigarettes include short medium cigarettes and standard medium cigarettes, slim cigarettes include long slim cigarettes and standard slim cigarettes, and some have both popping beads and different sizes.
[0026] When novelty cigarettes of different sizes enter the automated finished product warehouse, they need to go through the sorting system, the robot stacking system, and the stacker transportation system to finally achieve automated storage and delivery. In order to warehouse these novelty cigarettes together with traditional cigarettes, it is necessary to complete the adaptive transformation of automatic sorting of finished product cigarettes in the finished product warehouse, automatic robot stacking, automatic storage, and automatic outbound storage, so that the system can complete the sorting, stacking, storage, and outbound storage of novelty cigarettes.
[0027] Ordinary cigarettes and novelty cigarettes are put into storage on the same line, and the novelty cigarettes are put into storage at irregular times and in irregular batches. This is flexible production. Flexibility is relative to rigidity. The traditional rigid production line mainly realizes the production of ordinary cigarettes.
[0028] There is currently no method for sorting these special-shaped cigarettes (of different sizes and shapes), so they cannot be stored in warehouses and need to be manually stacked and stored, which is inefficient.
[0029] In view of this, the present disclosure proposes a full-category flexible sorting method based on AI for tobacco enterprises. The present disclosure is a full-category flexible sorting method based on AI for tobacco enterprises, which can perform "flexible" automatic sorting, identify and sort all categories of cigarettes to be sorted including novelty cigarettes, and improve sorting efficiency.
[0030] Figure 1 is a flow chart showing a flexible sorting method for all categories of tobacco enterprises based on AI according to some embodiments of the present disclosure. Figure 1 As shown, the tobacco company's AI-based flexible sorting method for all categories includes steps 110 to 170.
[0031] At step 110, novelty cigarettes and regular cigarette pieces enter a sorting line.
[0032] In step 120, AI visually identifies the brand and the carton sealing machine number and derives the sorting sequence based on the large model.
[0033] In step 130, the scanning head reads the No. 1 engineering code or the QR code and reads out the brand and the sealing machine number.
[0034] In step 140, photoelectric timing is started.
[0035] In step 150, the sorting sequence and the scan results are compared.
[0036] In step 160, if the sorting sequence is consistent with the scanning result, when the timing time is up, the slider moves.
[0037] At step 170, the cigarette pieces enter corresponding sorting channels.
[0038] In some embodiments, if the sorting sequence is inconsistent with the scanning result, the slider moves according to the AI visual recognition result and records it; the cigarette pieces enter the corresponding sorting channel.
[0039] In some embodiments, the sorting sequence is obtained according to the large model, wherein the large model is constructed, including: finding the edge in the area of interest of the cigarette piece on the sorting line, and obtaining the coordinate value of the edge point; calculating the gradient value of the edge point in the x and y directions; calculating the gradient strength and gradient angle of the edge point; traversing the edge points, saving the x and y gradients corresponding to the edge points, and normalizing the gradient strength; converting the edge point coordinates to relative coordinates relative to the center; calculating the gradient value of the edge point in the x and y directions; calculating the gradient strength and gradient angle of the edge point; calculating the correlation between the template edge gradient and the target image edge gradient through a normalized cross-correlation algorithm to create a large model for novel cigarette piece identification; fusing the novel cigarette piece identification large model with the ordinary cigarette piece visual identification large model to obtain the large model, and completing the construction of the large model.
[0040] In some embodiments, the method of obtaining a sorting sequence based on a large model includes: extracting contour pixel points corresponding to images of interest for all categories of cigarettes on the sorting line; generating specification attribute information of corresponding images of interest based on the contour pixel points; and sorting and arranging all images of interest based on the specification attribute information to obtain a sorting sequence.
[0041] In some embodiments, the normalized cross correlation algorithm is NCC, which is formulated as: Among them, E(S i,j ) represents the sub-image at (i, j), and E(T) represents the average gray value of the template.
[0042] In some embodiments, the novel cigarette identification model is optimized using the PatMax algorithm, the PatQuicks algorithm, and / or the NCC algorithm.
[0043] like Figure 2 As shown, the present invention can perform "flexible" automatic sorting, identify and sort all categories of cigarettes to be sorted including novelty cigarettes, and improve sorting efficiency.
[0044] like Figure 2 As shown, the hardware for implementing this method includes:
[0045] The visual recognition device is suitable for identifying the upper surface of the cigarette and the No. 1 engineering code and the QR code. The visual recognition device includes a bracket and a camera. The camera is arranged on the bracket and a high-speed industrial camera is used.
[0046] The barcode scanning device is suitable for scanning the No. 1 engineering code and the two-dimensional code attached to the cigarette package, and the scanning device includes a scanning terminal.
[0047] The slider, also called the sliding shoe, pushes the qualified cigarette pieces into the corresponding channel to realize the sorting function. After the slider pushes the cigarette pieces into the channel, it continues to run until it is suitable, and then runs to the starting position.
[0048] The AI chip uses the NVIDIA A100 chip. With the help of Tensor floating-point computing (TF32) precision, the NVIDIA A100 Tensor Core can provide 20 times higher performance than NVIDIA Volta without changing the code; NVIDIA A100 uses double-precision Tensor Core, which can provide 3 times the AI training speed for large models during training operations (compared to the V100 chip).
[0049] like Figure 3 and Figure 4 As shown, a large model for visual recognition of novel cigarette pieces is created: Get template: On the sorting line, find the edge of the cigarette piece in the area of interest, and get the coordinate value of the edge point; calculate the gradient value of the edge point in the x and y directions; calculate the gradient strength and gradient angle of the edge point; traverse the edge points, save the x and y gradients corresponding to the edge points, and normalize the gradient strength, 1 divided by the gradient strength of the point, so that the values obtained are all between 0 and 1; convert the edge point coordinates to relative coordinates relative to the center. Template matching: Calculate the gradient value of the edge point in the x and y directions; calculate the gradient strength and gradient angle of the edge point; calculate the correlation between the template edge gradient and the target image edge gradient through the normalized cross correlation (NCC) algorithm.
[0050] The NCC (normalized cross correlation) algorithm is a normalized cross correlation matching method, which is a matching method based on image grayscale information. It is a processing method used to compare the similarity of two images. There are three methods for image matching: grayscale-based, feature-based, and transform domain-based. The NCC algorithm can compare images under low light conditions. The NCC algorithm formula is:
[0051] Among them, E(S i,j ) and E(T) represent the average grayscale value of the sub-image and template at (i, j) respectively.
[0052] The algorithm is used to optimize the large model. The PatMax algorithm is used to train and optimize the full category model of the cigarette package. The PatQuicks algorithm is used to train and optimize the full category model of the cigarette package. The NCC algorithm is used to optimize the full category model of the cigarette package.
[0053] The PatMax algorithm is a pattern matching technology. PatMax is not affected by the grayscale changes of the pattern. It obtains the geometric shape of the object based on the boundary curve of the pixel grid, and then searches for similar shapes in the image, allowing product features to have freedom of angle and scaling.
[0054] The PatMax scans the edges of the image to identify geometric shapes. These shapes become a digital signature, and the backend computer uses the PatMax signature to compare the correct photo to confirm the brand, production machine, production time, etc. of the cigarette.
[0055] The PatMax described works by making digital data tables to quickly memorize geometric shapes, and then uses pattern matching to avoid back-end computer calculation errors.
[0056] The PatMax described starts with a "training image," which is a digitized image of a cigarette, piece of cigarette, or other object that the automated system is to process.
[0057] The PatQuick algorithm is a fast geometric pattern matching method based on image processing technology, especially template matching technology.
[0058] The novel cigarette piece visual recognition large model is integrated with the ordinary cigarette piece visual recognition large model.
[0059] Train the large model for novelty cigarette piece visual recognition separately for three months, and put various novelty cigarette pieces into the sorting line to let the system train and learn.
[0060] Import the common cigarette piece smoke visual recognition big model data into the novel cigarette piece smoke visual recognition big model to integrate them.
[0061] The fused large model uses large quantities and multiple batches of ordinary cigarette pieces and novelty cigarette pieces mixed into the experimental sorting line, allowing the system to train and learn for three months. Finally, a new large model is formed.
[0062] like Figure 2 , Figure 3 , Figure 4 As shown, the sorting method includes: first, determining the brand and sealing machine number of the cigarettes on the sorting line. A: Determine the cigarette brand; B: In order to distinguish the sealing machine of the same brand, determine the sealing machine number.
[0063] For example, for j brand cigarettes, the No. 2 and No. 3 carton sealers are stacked separately, recorded as j 2 and j 3 .
[0064] Second, a bracket is set up on the sorting line, and a visual recognition camera is attached to the bracket.
[0065] Third, after the large model is put into operation, the visual recognition system of the visual recognition camera extracts the contour pixel points corresponding to the images of interest for all categories of cigarettes on the sorting line, generates the specification attribute information of the corresponding images of interest based on the contour pixel points, and sorts and arranges all the images of interest based on the specification attribute information to obtain the sorting sequence.
[0066] Fourth, photoelectric 1 is set on the sorting conveying line under the mounting bracket of the scanning head.
[0067] Fifth, extract a code segment from the upper surface of the cigarette or the No. 1 engineering code or the quality traceability code at the barcode recognition point and scan and read the code.
[0068] Sixth, when the cigarette is scanned at the barcode recognition point and passes through photoelectric 1, the timing starts.
[0069] Seventh, compare the AI large model sorting sequence with the scanning and reading results. If the comparison is consistent, then according to the time when photoelectric 1 starts timing, when the appropriate brand of cigarette passes through the corresponding channel according to the predetermined time from the start of timing from photoelectric 1, the slider will move to push the cigarette into the corresponding channel.
[0070] Eighth, if the comparison is inconsistent, the slider moves according to the AI visual recognition result and records it.
[0071] Ninth, the cigarette pieces enter the corresponding channels and the sorting is completed.
[0072] In the AI-based flexible sorting method for all categories of tobacco companies in the disclosed embodiment, "flexible" automatic sorting can be performed to identify and sort all categories of cigarettes to be sorted, including novelty cigarettes, to improve sorting efficiency.
Claims
1. A flexible sorting method for all categories of tobacco products based on AI in a tobacco enterprise, characterized in that: The method comprises: Novelty cigarettes and regular cigarette pieces enter the sorting line; AI vision recognizes the brand and carton sealing machine number, and derives the sorting sequence based on the big model; The scanning head reads the No. 1 engineering code or QR code and reads out the brand and sealing machine number; Photoelectricity starts timing; Compare the sorting sequence with the scan results; If the sorting sequence is consistent with the scanning result, the slider will move when the timing is up; The cigarettes enter the corresponding sorting channel.
2. The AI-based flexible sorting method for all categories of tobacco products according to claim 1 is characterized in that: If the sorting sequence and the scanning result are inconsistent, the slider moves according to the AI visual recognition result and records it; The cigarettes enter the corresponding sorting channel.
3. The AI-based flexible sorting method for all categories of tobacco products according to claim 1 is characterized in that: The step of obtaining a sorting sequence according to the large model, wherein constructing the large model comprises: On the sorting line, find the edge of the area of interest of the cigarette and obtain the coordinate value of the edge point; Calculate the gradient value of the edge point in the x and y directions; Calculate the gradient strength and gradient angle of edge points; Traverse the edge points, save the x and y gradients corresponding to the edge points, and normalize the gradient strength; Convert edge point coordinates to relative coordinates relative to the center; Calculate the gradient value of the edge point in the x and y directions; Calculate the gradient strength and gradient angle of edge points; The correlation between the template edge gradient and the target image edge gradient is calculated by the normalized cross-correlation algorithm to create a novel cigarette piece recognition model; The novel cigarette piece smoke recognition big model is integrated with the common cigarette piece smoke visual recognition big model to obtain the big model, thereby completing the construction of the big model.
4. The AI-based flexible sorting method for all categories of tobacco enterprises according to claim 3 is characterized in that: The step of obtaining a sorting sequence according to the large model comprises: Extract the contour pixel points corresponding to the image of interest for all categories of cigarettes on the sorting line; Generate specification attribute information of the corresponding image of interest according to the contour pixels; All images of interest are sorted and arranged based on the specification attribute information to obtain a sorting sequence.
5. The AI-based flexible sorting method for all categories of tobacco enterprises according to claim 3 is characterized in that: The normalized cross correlation algorithm is NCC, and its formula is: Among them, E(S i,j ) represents the sub-image at (i, j), and E(T) represents the average gray value of the template.
6. The AI-based flexible sorting method for all categories of tobacco enterprises according to claim 3 is characterized in that: The novel cigarette piece identification model is optimized using the PatMax algorithm, the PatQuicks algorithm, and / or the NCC algorithm.
