Carton sealing bottom special edition identification method and system

CN122990734APending Publication Date: 2026-10-27FUJIAN IMPERIAL VISION INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611003677.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-07
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

单幅图像分类方法往往将纸箱底部整体区域直接输入单一网络,但当不同专版的差异主要集中在局部小标签时,整体特征容易掩盖关键细节;模板匹配方法又容易受到拍摄角度、印刷偏差、光照变化和污损的影响,泛化能力不足

Benefits of technology

[0007]本发明的有益效果在于:采集待检纸箱封箱底部图像,基于待检纸箱封箱底部图像提取第一感兴趣区域图像和第二感兴趣区域图像,将第一感兴趣区域图像和第二感兴趣区域图像输入训练完成的双分支卷积神经网络中进行特征提取,输出待检融合特征向量,计算待检融合特征向量与专版特征库中各中心特征向量的距离,基于距离从专版特征库中得到专版类别名称,以此通过双分支卷积神经网络分别提取纸箱底部整体区域与局部小标签区域的特征,有效解决了单幅图像分类中整体特征掩盖局部差异的问题,使模型能精准聚焦于关键区分信息,同时基于特征向量距离匹配的识别方式,相比传统模板匹配,对拍摄角度、印刷偏差、光照变化和污损具有更强的鲁棒性和泛化能力,整个流程无需人工目检,可稳定支持高速产线作业,大幅降低漏判与误判率,从而提高了专版识别的精确度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990734A_ABST
    Figure CN122990734A_ABST
Patent Text Reader

Abstract

The application provides a carton sealing bottom special edition identification method and system, collects a carton sealing bottom image to be detected, extracts a first region of interest image and a second region of interest image based on the carton sealing bottom image to be detected, inputs the first region of interest image and the second region of interest image into a double-branch convolutional neural network trained to extract features, outputs a to-be-detected fusion feature vector, calculates the distance between the to-be-detected fusion feature vector and each center feature vector in a special edition feature library, obtains a special edition category name from the special edition feature library based on the distance, effectively solves the problem that overall features cover local differences in single image classification, enables the model to accurately focus on key distinguishing information, and has stronger robustness and generalization ability to shooting angles, printing deviations, light changes and stains, the whole process does not need manual inspection, can stably support high-speed production line operation, greatly reduces the missed judgment and misjudgment rate, and thus improves the accuracy of special edition identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method and system for recognizing special markings on the bottom of cardboard box seals. Background Technology

[0002] In carton packaging production lines for instant noodles and other similar products, different export countries or customer versions typically correspond to different custom-designed bottom seals, such as... Figure 2 As shown, Figure 2 The area within the red box is the bottom-specific label. This type of special label is not only reflected in the large area of ​​printed information on the bottom of the carton, but also in small labels, markings, or affixed information. Because the overall layout of different special labels is similar and the local differences are subtle, the production line has long relied on manual visual inspection for differentiation, which leads to problems such as missed judgments and misjudgments due to fatigue, as well as the inability to maintain high-speed operation continuously.

[0003] To achieve automatic recognition, existing technologies typically employ methods such as single-image classification, template matching, or manually set rules. Single-image classification methods often directly input the entire bottom area of ​​the carton into a single network, but when the differences between different versions are mainly concentrated in small local labels, the overall features can easily obscure key details. Template matching methods are also easily affected by shooting angle, printing deviations, lighting changes, and stains, resulting in insufficient generalization ability. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method and system for identifying special patterns on the bottom of carton seals, which can improve the accuracy of special pattern identification.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for identifying a special pattern on the bottom of a cardboard box seal, comprising: Capture images of the sealed bottom of the carton to be inspected; Based on the bottom image of the sealed carton to be inspected, a first region of interest image and a second region of interest image are extracted. The first region of interest image contains information about the main body of the carton, and the second region of interest image contains information about local label differences. The first region of interest image and the second region of interest image are input into the trained dual-branch convolutional neural network for feature extraction, and the output is the fused feature vector to be detected; Calculate the distance between the fused feature vector to be detected and each central feature vector in the special feature library; The special edition category name is obtained from the special edition feature library based on the distance.

[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A cardboard box bottom seal identification system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the cardboard box bottom seal identification method described above.

[0007] The beneficial effects of this invention are as follows: It acquires an image of the bottom of a sealed carton to be inspected; extracts a first region of interest (ROI) image and a second ROI image based on the bottom image; inputs the first and second ROI images into a trained dual-branch convolutional neural network for feature extraction; outputs a fused feature vector to be inspected; calculates the distance between the fused feature vector and each central feature vector in the special edition feature library; and obtains the special edition category name from the special edition feature library based on the distance. This effectively solves the problem of overall features masking local differences in single-image classification by using a dual-branch convolutional neural network to extract features from the overall area and local small label areas at the bottom of the carton. This allows the model to accurately focus on key distinguishing information. Furthermore, the feature vector distance matching-based recognition method, compared to traditional template matching, has stronger robustness and generalization ability to shooting angles, printing deviations, lighting changes, and soiling. The entire process requires no manual visual inspection, can stably support high-speed production line operations, and significantly reduces the rate of missed and false judgments, thereby improving the accuracy of special edition recognition. Attached Figure Description

[0008] Figure 1 This is a flowchart illustrating a method for identifying a special label on the bottom of a carton seal according to an embodiment of the present invention; Figure 2 This is a special illustration of the bottom panel of a cardboard box seal; Figure 3 This is a schematic diagram of the overall identification process in a method for identifying the bottom seal plate of a carton according to an embodiment of the present invention. Figure 4 This is a schematic diagram of the training dataset in a method for recognizing the bottom seal of a carton according to an embodiment of the present invention; Figure 5 This is a flowchart of the network training process in a method for identifying the bottom seal of a carton according to an embodiment of the present invention. Figure 6 This is a flowchart illustrating the construction of a special feature library in a method for identifying the special feature on the bottom of a carton seal according to an embodiment of the present invention. Figure 7 This is a flowchart of a special plate recognition method for the bottom of a carton seal according to an embodiment of the present invention; Figure 8 This is a schematic diagram of a special identification system for the bottom of a carton seal, according to an embodiment of the present invention. Detailed Implementation

[0009] Definitions:

[0010] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0011] In existing technologies, methods such as single-image classification, template matching, or manually set rules are commonly used. Single-image classification methods often directly input the entire bottom area of ​​the carton into a single network, but when the differences between different versions are mainly concentrated in small local labels, the overall features can easily obscure key details; template matching methods are also easily affected by shooting angle, printing deviation, lighting changes, and stains, resulting in insufficient generalization ability.

[0012] To address at least the aforementioned issues, an image of the sealed bottom of the carton to be inspected is acquired. Based on this image, a first region of interest (ROI) image and a second ROI image are extracted. These ROI images are then input into a trained dual-branch convolutional neural network for feature extraction, outputting a fused feature vector. The distance between this fused feature vector and the central feature vectors in the special edition feature library is calculated, and the special edition category name is obtained from the library based on this distance. In this way, by using a dual-branch convolutional neural network to extract features from both the overall area and the local small label area on the bottom of the carton, the problem of overall features masking local differences in single-image classification is effectively solved. This allows the model to accurately focus on key distinguishing information. Furthermore, compared to traditional template matching, the feature vector distance matching-based recognition method exhibits stronger robustness and generalization ability to changes in shooting angle, printing deviations, lighting variations, and soiling. The entire process eliminates the need for manual visual inspection, stably supports high-speed production line operations, and significantly reduces the false negative and false positive rates, thereby improving the accuracy of special edition recognition.

[0013] The following describes in detail a method for identifying a special pattern on the bottom of a carton seal according to the present invention. Please refer to [link / reference]. Figure 1 and Figure 3 The method 100 includes steps 101 to 105: Step 101: Collect an image of the bottom of the sealed carton to be inspected.

[0014] Specifically, such as Figure 3 As shown, an industrial camera is used to capture images of the bottom of the sealed carton to be inspected.

[0015] Step 102: Extract a first region of interest (ROI) image and a second region of interest (ROI) image based on the bottom image of the sealed carton to be inspected. The first ROI image contains information about the main body of the carton, and the second ROI image contains information about local label differences.

[0016] The first region of interest image is used to provide layout, text block distribution, and overall bottom printing information; the second region of interest image is used to provide local labeling, local marking, and fine-grained difference information. Using these two images can significantly improve the distinguishability of highly similar special editions.

[0017] Step 103: Input the first region of interest image and the second region of interest image into the trained dual-branch convolutional neural network for feature extraction, and output the fused feature vector to be detected; The dual-branch convolutional neural network includes a first ConvNeXt-Tiny backbone network after removing the original fully connected classification layer, a second ConvNeXt-Tiny backbone network after removing the original fully connected classification layer, and a feature concatenation layer. The ConvNeXt-Tiny backbone network after removing the original fully connected classification layer retains only the convolutional feature extraction part to output a deeper visual representation that is more suitable for fusion.

[0018] Step 104: Calculate the distance between the fused feature vector to be detected and each central feature vector in the special feature library.

[0019] The special edition feature library includes special edition category names and their corresponding central feature vectors.

[0020] Specifically, the Euclidean distance between the fused feature vector to be detected and each central feature vector in the special feature library is calculated.

[0021] In one optional implementation, the cosine similarity between the fused feature vector to be detected and each central feature vector in the special feature library is calculated as the distance between them.

[0022] Step 105: Obtain the special edition category name from the special edition feature library based on the distance.

[0023] Please refer to Figure 4 , Figure 5 and Figure 6 In one embodiment of the present invention, before step 101, steps 001 to 006 are further included: Step 001: Obtain the training dataset, which includes special category labels and their corresponding first region of interest (ROI) images and second region of interest (ROI) images.

[0024] Specifically, such as Figure 4As shown, the root directory of the dataset contains the training dataset. This directory is divided into different classification directories, named "Specialized Category Labels." Each classification directory contains a subdirectory of the classification ROI region and a subdirectory of the small label ROI region. The filenames of the first region of interest image in the classification ROI region subdirectory and the second region of interest image in the small label ROI region subdirectory are exactly the same. The sample file extensions can be png, jpg, jpeg, or tiff. When loading data, dual image tensors and specialized category labels are output in batches, thus ensuring that the two inputs semantically originate from the same specialized instance. When constructing the training dataset, if there are inconsistencies in the number of samples or mismatched filenames, the samples of that category are considered abnormal and the construction is stopped to avoid training noise caused by incorrect pairings.

[0025] Among them, special edition category labels include different country versions, customer versions, or labeled versions; in an optional implementation, during the training implementation, each special edition category label is mapped to a corresponding numerical label so that it can participate in neural network training and loss calculation. The numerical label is only used as internal encoding in training and inference and does not change the business meaning of the special edition category itself.

[0026] Step 002: Train the dual-branch convolutional neural network and the ArcFace classification head based on the training dataset to obtain the trained dual-branch convolutional neural network.

[0027] Specifically, such as Figure 5 As shown, the first region of interest (ROI) image (classification ROI region) and the second region of interest (small label ROI region) image in the training dataset are input into a two-branch convolutional neural network for feature extraction and concatenation. 512-dimensional features are extracted during feature extraction, and 1024-dimensional fused features are obtained during feature concatenation. These features are then input into the ArcFace classification head and cross-entropy loss is used to supervise the training of the categories.

[0028] The ArcFace classification head first normalizes the fused features and class weights, then introduces an angular interval *m* at the target class angle to expand the discrimination boundary between different target classes. In one optional implementation, the angular scaling factor *s* is 30.0; the angular interval *m* is 0.5; the optimizer is Adam, the learning rate is 1e-4, the batch size is 16, and the training epochs are 50. During training, each batch of dual ROI samples is fed into a dual-branch convolutional neural network. After calculating the fused features, the class logits are obtained through ArcFace, and the parameters of the dual-branch convolutional neural network and the ArcFace parameters are updated accordingly. After training, the parameters of the dual-branch convolutional neural network are saved, the trained dual-branch convolutional neural network is output, and it is exported in ONNX (Open Neural Network Exchange) format (an open standard format for representing machine learning models).

[0029] This training method makes samples of the same category more compact in the feature space and increases the angular spacing between samples of different categories, thus providing a stable embedding representation for subsequent feature library matching and unknown category determination.

[0030] Step 003, obtain the historical sample set, such as Figure 6 As shown.

[0031] The historical sample set consists of standard samples collected in the early stage and manually confirmed to be of a specific category. These samples may come from the training dataset, retained samples, or samples added to the database later.

[0032] In one optional implementation, the samples in the historical sample set are subjected to same-name pairing verification. If the verification fails, the samples are removed as abnormal samples. If the verification succeeds, the next step is executed.

[0033] Step 004: Input the historical sample set into the trained dual-branch convolutional neural network for feature extraction and output a fused feature vector.

[0034] Step 005: Calculate the mean of multiple fused feature vectors under the same special edition category to obtain the central feature vector of the special edition category.

[0035] In one optional implementation, after normalizing the fused feature vector, the mean of multiple normalized fused feature vectors under the same special edition category is calculated to obtain the central feature vector of the special edition category.

[0036] Step 006: Construct a special edition feature library based on the central feature vector and its corresponding special edition category name.

[0037] In one optional implementation, after normalizing the central feature vector, a special version feature library is constructed based on the normalized central feature vector and its corresponding special version category name.

[0038] As described above, supervised training of the dual-branch network using the ArcFace classification head can improve the separability between different special edition categories through angular interval constraints and enhance the discriminative ability between similar special editions. This makes the extracted fusion feature vectors more discriminative in the metric space, laying the foundation for subsequent distance matching. By using the mean of multiple fusion feature vectors under the same special edition from the historical sample set as the center feature vector, the distribution of similar samples can be summarized. This effectively suppresses noise, illumination, and printing bias from a single sampling, resulting in more stable and representative category centers. Furthermore, the original judgment process that relied on the output of the classification head is transformed into a distance matching process based on a unified feature space. This facilitates incremental maintenance of the special edition feature library and supports the rejection of unknown categories, while also reducing model coupling during online deployment.

[0039] In one embodiment of the present invention, step 102 includes steps 1021 to 1026: Step 1021: Perform image calibration on the bottom image of the sealed carton to be inspected to obtain the calibrated image and its grayscale image.

[0040] Specifically, for the bottom image of the sealed carton to be inspected, the contour features of the carton's main body boundary are extracted, and its tilt angle relative to the image coordinate system is calculated. An affine transformation matrix is ​​constructed based on the tilt angle. The affine transformation matrix is ​​used to perform a geometric transformation (including interpolation resampling and boundary filling) on ​​the bottom image of the sealed carton to be inspected, mapping it to a standard upright posture to obtain a calibrated image. Simultaneously, its corresponding grayscale image is generated to provide a unified coordinate reference for subsequent positioning. This eliminates the influence of shooting tilt and carton placement deviation on subsequent ROI extraction, and improves the stability of subsequent main body positioning and label positioning.

[0041] Step 1022: Locate the main body of the box in the calibrated grayscale image to obtain the main body area of ​​the box.

[0042] Step 1023: Extract the first region of interest image based on the main body region of the box.

[0043] Step 1024: Locate the small label subject in the calibrated image or the main body area of ​​the box to obtain the small label subject area.

[0044] Step 1025: Extract the second region of interest image based on the main body region of the small label.

[0045] Step 1026: Standardize the first region of interest image and the second region of interest image to obtain the processed first region of interest image and second region of interest image.

[0046] Specifically, the first and second region of interest images are cropped, padded, and scaled to 448×448 pixels to form a one-to-one standardized input sample of dual ROIs, which unifies the input size and spatial distribution of the subsequent dual-branch network and reduces feature fluctuations caused by differences in the field of view.

[0047] As described above, the image may be distorted due to the rotation of the sealing box. Therefore, image calibration is first performed to eliminate geometric deformations such as shooting angle and tilt, providing a unified benchmark for subsequent positioning and improving the consistency of region extraction. The main body is located based on the calibrated grayscale image, and grayscale information is used to simplify processing and improve efficiency. The positioning of small labels can be directly based on the calibrated image or the box area, flexibly adapting to the subtle features of the labels. Then, the image of the region of interest is standardized to unify the input specifications of the dual-branch network. By adopting the strategy of calibration first and then layered positioning, the regional offset error caused by production line vibration and carton placement deviation is effectively reduced, providing high-quality and well-aligned input images for the dual-branch network, thereby improving the overall recognition accuracy.

[0048] In one embodiment of the present invention, step 1022 includes steps 10221 to 10223: Step 10221: Perform threshold segmentation on the calibrated grayscale image based on a preset grayscale threshold to extract candidate dark areas corresponding to the main body of the box.

[0049] Step 10222: Perform morphological opening and closing operations sequentially on the candidate dark regions to obtain the processed candidate dark regions.

[0050] Step 10223: Perform connected component analysis on the processed candidate dark regions and select the largest connected region as the main body region of the box according to its area. The reason for this is that the area that truly corresponds to the main body of the box in the bottom image of the box usually has the largest continuous area, while the area of ​​background clutter, local stains or edge interference areas is relatively small. Therefore, the stability of the main body positioning can be improved by selecting the largest area.

[0051] As described above, by utilizing the grayscale difference between the bottom of the carton and the background (such as a conveyor belt), dark candidate regions can be quickly extracted through threshold segmentation. The computational load is small. Morphological opening and closing operations are performed. The opening operation can eliminate scattered noise areas, and the closing operation can connect broken areas caused by printing interruptions or edge jitter, making the main body area complete and continuous, improving the stability of subsequent positioning. Furthermore, by combining connected component analysis with area screening, stray dark interference objects in the background can be effectively eliminated, accurately locking the largest main body area. The entire process is computationally efficient and robust, and can adapt to common lighting changes and minor stains.

[0052] In one embodiment of the present invention, step 1023 includes steps 10231 to 10235: Step 10231: Calculate the inscribed rectangle for the main body region of the box.

[0053] Step 10232: Calculate the position of the midpoint of the upper edge of the inscribed rectangle and use the midpoint position as the positioning anchor point.

[0054] Step 10233: Based on the positioning anchor point, and combined with the preset vertical offset, preset width, and preset height, construct a rectangular region of interest.

[0055] The reason for this is that the geometric range of the main body area of ​​the box is often affected by the shooting angle, the shadow of the box edge, local occlusion or background interference, which can cause fluctuations. If the main body area of ​​the box is directly used as the first region of interest image, the input range between different samples may be inconsistent, which is not conducive to subsequent feature extraction and category discrimination. However, by using a unified anchor point and fixed size to generate the first region of interest image, the same special category can maintain a more stable sampling position and sampling range between different samples.

[0056] Step 10234: If the rectangular region of interest exceeds the boundary of the main body region of the box, then perform black padding expansion on the main body region of the box, and then return to step 10231 based on the expanded main body region of the box.

[0057] Step 10235: If the rectangular region of interest does not exceed the boundary of the main body region of the box, then the rectangular region of interest is taken as the first region of interest image.

[0058] As described above, by using the midpoint of the top edge of the inscribed rectangle as the anchor point and constructing a rectangular region of interest (ROI) with a preset size, the first region is always anchored at the center of the top of the box, effectively avoiding interference areas such as bottom creases and tape. At the same time, it ensures the consistency of the extracted regions between different cartons. The preset vertical offset can flexibly adjust the region position to adapt to the main information distribution of different layouts. Furthermore, the boundary detection and black-filling expansion mechanism can automatically handle the problem of region crossing the boundary due to carton size fluctuations or positioning deviations, avoiding the truncation of the effective special edition region due to ROI crossing the boundary. It can robustly generate a compliant first region of interest image without manual intervention, ensuring the input quality of subsequent feature extraction.

[0059] In one embodiment of the present invention, step 1024 includes steps 10241 to 10242: Step 10241: Perform joint segmentation on the calibrated image or the main body region of the box based on the image saturation channel and grayscale threshold to extract candidate regions that may correspond to small labels.

[0060] Step 10242: Based on the boundary corrosion results of the main body region of the box, interference regions and abnormal area regions located outside the main body region of the box are removed from the candidate regions by region intersection and area filtering to obtain the main body region of the small label.

[0061] As described above, segmentation using the combined saturation channel and grayscale threshold effectively utilizes the saturation difference between the label and the carton background while also considering grayscale information. This improves the detection rate of small labels against complex backgrounds. Combined with the boundary erosion results of the main body area of ​​the carton, intersection and union operations can quickly eliminate false detection areas located outside the carton (such as conveyor belts and environmental backgrounds), reducing interference. Area filtering further filters out abnormal areas that are too large or too small due to printing noise or stains, ensuring that the located area truly corresponds to the small label. This method does not rely on complex target detection models, is computationally efficient, and can adapt to label position fluctuations and slight deformations, providing a reliable guarantee for the accurate extraction of the second region of interest image.

[0062] In one embodiment of the present invention, step 1025 includes steps 10251 to 10253: Step 10251: Calculate the label tilt angle by the intersection of the left and right sampling lines with the boundary of the main body area of ​​the small label.

[0063] Step 10252: If the label tilt angle is within a preset range, perform rotation correction on the main body area of ​​the small label to obtain the corrected main body area of ​​the small label, thereby reducing the impact of label tilt on subsequent recognition.

[0064] Step 10253: The corrected small label main body area is cropped, scaled proportionally, and centered to obtain the second region of interest image.

[0065] As described above, by calculating the label tilt angle through the intersection of the left and right sampling lines and the region boundary, the degree of rotation of the small label in the image can be accurately detected. Rotation correction is only performed when the tilt angle is within a preset range, avoiding image distortion caused by over-correction or miscorrection. After rotation correction, irrelevant edges are removed, the label is scaled proportionally to maintain the aspect ratio, and the label is centered and filled to a uniform size. This ensures that the image of the second region of interest has consistent geometric alignment and scale before being input into the network, effectively eliminating input variations caused by differences in the angle of carton placement and label pasting skew. This ensures that the second branch of the dual-branch network can extract stable and comparable local features, significantly improving the accuracy and robustness of subsequent recognition.

[0066] Please refer to Figure 7 In one embodiment of the present invention, step 103 includes steps 1031 to 1033: Step 1031: Input the first region of interest image into the first ConvNeXt-Tiny backbone network for feature extraction and output the first feature vector.

[0067] Step 1032: Input the second region of interest image into the second ConvNeXt-Tiny backbone network for feature extraction and output the second feature vector.

[0068] Step 1033: Input the first feature vector and the second feature vector into the feature splicing layer, and output the fused feature vector to be detected.

[0069] As described above, two ConvNeXt-Tiny backbone networks with the fully connected classification layers removed are used to process the overall and local regions of the image respectively. This allows each branch to focus on learning the deep discriminative features of its own region, avoiding the overall features from overshadowing local details. The feature splicing layer fuses the dual outputs, preserving the overall layout information of the box while strengthening the differential representation of local small labels, significantly improving fine-grained recognition capabilities. As a modern lightweight backbone network, ConvNeXt-Tiny balances strong feature extraction capabilities and deployability. Meanwhile, the removal of the original classification layer is dedicated to metric learning, and the two branches can project the overall layout information and local label information onto a unified feature space. The output fused feature vector can be accurately compared with a dedicated feature library, thereby effectively overcoming interference from lighting, dirt, etc., and improving recognition robustness and accuracy.

[0070] Please refer to Figure 7 In one embodiment of the present invention, step 105 includes steps 1051 to 1052: Step 1051: Determine the minimum distance from the distances.

[0071] Step 1052: Determine whether the minimum distance is less than or equal to a preset threshold. If yes, output the special edition category name (e.g., special edition category ID) of the center feature vector corresponding to the minimum distance in the special edition feature library. If no, output unknown special edition.

[0072] In one optional implementation, the preset threshold is 0.6.

[0073] In one optional implementation, in addition to outputting the special edition category name of the central feature vector corresponding to the minimum distance in the special edition feature library, the country or customer version identifier corresponding to the special edition category name, the minimum distance, and the identification time are also output.

[0074] As described above, the combination of distance matching and threshold judgment is computationally efficient and can avoid forcibly classifying unseen or abnormal samples into existing categories, thereby reducing the false positive rate.

[0075] The method described above can be deployed on packaging lines for instant noodles, cardboard food, or other products requiring differentiation of the bottom label. An industrial camera on the production line captures a bottom image of the cardboard box as it passes the shooting station. From this image, a classification ROI image (first region of interest image) and a small label ROI image (second region of interest image) are obtained. A pre-trained dual-branch convolutional neural network is then used to extract 1024-dimensional fused features, which are then matched against a pre-established label feature library. Taking highly similar labels such as "Malaysian version" and "Singapore labeled version" as examples, the method utilizes both the overall bottom printing layout and local label details to achieve joint determination. When the minimum distance is less than or equal to a preset threshold, the label classification result can be sent to the production line control unit, such as a MES (Manufacturing Execution System), PLC (Programmable Logic Controller), or rejection mechanism, for release, diversion, alarm, or anomaly interception. Figure 2 As shown; when the minimum distance is greater than the preset threshold, an unknown version is output, prompting manual review or addition to the inventory, thereby meeting the production line's needs for continuous, high-speed, stable and accurate automatic identification.

[0076] Please refer to Figure 8The present invention also provides a special identification system 200 for the bottom seal of a carton, including a memory 201, a processor 202, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the special identification method for the bottom seal of a carton as described above.

[0077] In summary, the cardboard box bottom label identification method and system of the present invention acquires an image of the bottom of the cardboard box to be inspected, extracts a first region of interest (ROI) image and a second ROI image based on the bottom image of the cardboard box bottom to be inspected, inputs the first ROI image and the second ROI image into a trained dual-branch convolutional neural network for feature extraction, outputs a fused feature vector to be inspected, calculates the distance between the fused feature vector to be inspected and each central feature vector in the label feature library, and obtains the label category name from the label feature library based on the distance. In this way, the dual-branch convolutional neural network extracts features of the overall area and local small label areas of the bottom of the cardboard box respectively, effectively solving the problem of overall features masking local differences in single image classification, enabling the model to accurately focus on key distinguishing information. At the same time, the recognition method based on feature vector distance matching has stronger robustness and generalization to shooting angle, printing deviation, lighting changes and stains compared with traditional template matching. The entire process requires no manual visual inspection, stably supports high-speed production line operations, and significantly reduces the rates of missed and false judgments, thereby improving the accuracy of special edition recognition. In addition, supervised training of the dual-branch network using the ArcFace classification head can improve the separability between different special edition categories through angular interval constraints and enhance the discriminative ability between similar special editions. This makes the extracted fusion feature vectors more discriminative in the metric space, laying the foundation for subsequent distance matching. By using the average of multiple fusion feature vectors under the same special edition from the historical sample set as the center feature vector, the distribution of similar samples can be summarized. This effectively suppresses noise, lighting, and printing deviations from a single sampling, resulting in a more stable and representative category center. Furthermore, the original judgment process that relied on the output of the classification head is transformed into a distance matching process based on a unified feature space, which facilitates subsequent incremental maintenance of the special edition feature library and supports the rejection of unknown categories. It also reduces the model coupling during online deployment.

[0078] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for identifying a special pattern on the bottom of a cardboard box seal, characterized in that, include: Capture images of the sealed bottom of the carton to be inspected; Based on the bottom image of the sealed carton to be inspected, a first region of interest image and a second region of interest image are extracted. The first region of interest image contains information about the main body of the carton, and the second region of interest image contains information about local label differences. The first region of interest image and the second region of interest image are input into the trained dual-branch convolutional neural network for feature extraction, and the output is the fused feature vector to be detected; Calculate the distance between the fused feature vector to be detected and each central feature vector in the special feature library; The special edition category name is obtained from the special edition feature library based on the distance.

2. The method according to claim 1, characterized in that, The special edition feature library includes special edition category names and their corresponding central feature vectors; Based on the distance, the special edition category name obtained from the special edition feature library includes: Determine the minimum distance from the distances mentioned above; Determine whether the minimum distance is less than or equal to a preset threshold. If so, output the special edition category name of the center feature vector corresponding to the minimum distance in the special edition feature library.

3. The method according to claim 1, characterized in that, The dual-branch convolutional neural network includes a first ConvNeXt-Tiny backbone network after removing the original fully connected classification layer, a second ConvNeXt-Tiny backbone network after removing the original fully connected classification layer, and a feature splicing layer. The first region of interest image and the second region of interest image are input into the trained dual-branch convolutional neural network for feature extraction, and the output fused feature vector to be detected includes: The first region of interest image is input into the first ConvNeXt-Tiny backbone network for feature extraction, and the first feature vector is output. The second region of interest image is input into the second ConvNeXt-Tiny backbone network for feature extraction, and the second feature vector is output. The first feature vector and the second feature vector are input into the feature splicing layer, and the fused feature vector to be detected is output.

4. The method according to claim 1, characterized in that, Before capturing the bottom image of the sealed carton to be inspected, the following steps are also included: Obtain a training dataset, which includes special category labels and their corresponding first region of interest (ROI) images and second region of interest (ROI) images; The dual-branch convolutional neural network and the ArcFace classification head are trained based on the training dataset to obtain the trained dual-branch convolutional neural network. Obtain historical sample sets; The historical sample set is input into the trained dual-branch convolutional neural network for feature extraction, and a fused feature vector is output. Calculate the mean of multiple fused feature vectors under the same special edition category to obtain the central feature vector of the special edition category; A special edition feature library is constructed based on the central feature vector and its corresponding special edition category name.

5. The method according to claim 1, characterized in that, Extracting a first region of interest (ROI) image and a second region of interest (ROI) image based on the bottom image of the sealed carton to be inspected includes: The bottom image of the sealed carton to be inspected is calibrated to obtain the calibrated image and its grayscale image. The main body of the box is located by locating the main body of the box from the calibrated grayscale image; Extract the first region of interest image based on the main body area of ​​the box; The small label main body region is obtained by locating the small label main body region in the calibrated image or the main body region of the box. Extract the second region of interest image based on the main region of the small label; The first region of interest image and the second region of interest image are normalized to obtain the processed first region of interest image and second region of interest image.

6. The method according to claim 5, characterized in that, The calibrated grayscale image is used to locate the main body of the enclosure, resulting in the main body area of ​​the enclosure including: Based on a preset grayscale threshold, the calibrated grayscale image is segmented to extract candidate dark areas corresponding to the main body of the box. Morphological opening and closing operations are performed sequentially on the candidate dark regions to obtain the processed candidate dark regions; Perform connected component analysis on the processed candidate dark regions, and select the largest connected region as the main body region of the box according to its area.

7. The method according to claim 5, characterized in that, Extracting the first region of interest image based on the main body region of the box includes: Find the inscribed rectangle for the main body area of ​​the box; Calculate the position of the midpoint of the upper edge of the inscribed rectangle, and use the midpoint position as the positioning anchor point; Based on the positioning anchor points, and combined with preset vertical offset, preset width, and preset height, a rectangular region of interest is constructed; If the rectangular region of interest exceeds the boundary of the main body region of the box, then after performing black padding expansion on the main body region of the box, the step of finding the inscribed rectangle of the main body region of the box is returned based on the expanded main body region of the box. If the rectangular region of interest does not exceed the boundary of the main body region of the box, then the rectangular region of interest is taken as the first region of interest image.

8. The method according to claim 5, characterized in that, The small label main body region is located by locating the small label main body region in the calibrated image or the main body region of the box, including: The calibrated image or the main body region of the box is jointly segmented based on the image saturation channel and grayscale threshold to extract candidate regions that may correspond to small labels; Based on the boundary erosion results of the main body region of the box, interference regions and abnormal area regions located outside the main body region of the box are removed from the candidate regions by region intersection and area filtering, so as to obtain the main body region of the small label.

9. The method according to claim 5, characterized in that, Extracting the second region of interest image based on the main region of the small label includes: The label tilt angle is calculated by the intersection of the left and right sampling lines with the boundary of the main area of ​​the small label. If the label tilt angle is within a preset range, then rotation correction is performed on the main body area of ​​the small label to obtain the corrected main body area of ​​the small label; The corrected small label main body area is cropped, scaled proportionally, and centered to obtain the second region of interest image.

10. A special identification system for the bottom seal of a cardboard box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements each step of the method for identifying the special version of the bottom of a carton seal as described in any one of claims 1 to 9.