A bottle body label real-time printing method and system based on image recognition

By introducing batch image depth analysis of pre-identified areas and pre-storing of label instructions on the packaging conveyor line, and using the YOLO model and path aggregation network for bottle feature extraction and instruction generation, the problem of low efficiency in processing small batches of multi-variety bottles is solved, and efficient and accurate label printing is achieved.

CN121597149BActive Publication Date: 2026-07-24GUANGZHOU GUANSHEN IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU GUANSHEN IND CO LTD
Filing Date
2025-12-01
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

When handling small batches of multi-variety bottles, existing packaging conveyor lines perform image recognition, data processing, and printing/labeling processes sequentially, which limits the overall cycle time of the system, easily leads to line congestion, and makes it difficult to improve efficiency.

Method used

A batch image depth analysis of the pre-identified region and a batch generation and pre-storage mechanism for label instructions are introduced. The bottle shape, color and texture features are extracted by the YOLO model, and multi-scale feature fusion is performed by the path aggregation network to generate label printing instructions and classify and store them. When a single bottle arrives, the instructions are quickly identified and retrieved for printing.

Benefits of technology

It improves overall labeling efficiency and accuracy, enhances production flexibility and intelligence, and solves efficiency bottlenecks and accuracy problems in the traditional model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597149B_ABST
    Figure CN121597149B_ABST
Patent Text Reader

Abstract

The application discloses a bottle body label real-time printing method and system based on image recognition, and comprises the following steps: acquiring image data sets of a batch of bottles to be labeled in a pre-recognition area, performing image depth analysis on the image data sets through a YOLO model to obtain the type and quantity of the batch of bottles to be labeled; generating label printing instructions in batches according to the type and quantity information of the batch of bottles, and storing the label printing instructions in a label information library according to the types of the bottles; when a single bottle arrives at a labeling station, quickly identifying the single bottle, confirming the type of the bottle, and according to the confirmed type information, calling the matched label printing instructions from the label information library to drive a printer to print a label; and attaching the real-time printed label to a label attaching position of the single bottle. Through the batch image depth analysis in the pre-recognition area and the batch generation and pre-storage mechanism of the label instructions, the overall labeling efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of product packaging technology, specifically to a method and system for real-time printing of bottle labels based on image recognition. Background Technology

[0002] Current packaging conveyor lines require mixed batch labeling of bottles of different types. For small batches and multiple varieties of bottles, mixed batch labeling is necessary. Currently, this is mainly achieved by taking real-time photos of individual bottles for identification, and then printing and labeling them. This "see and print" serial operation mode has obvious limitations: First, the image recognition, data processing, and label printing processes are performed sequentially, and the overall system cycle time is limited by the processing time of a single bottle. Especially when there are many types of bottles, the instantaneous pressure of identification and matching is high, which can easily lead to congestion on the production line and make it difficult to significantly improve efficiency. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a real-time bottle label printing method and system based on image recognition. By introducing batch image depth analysis of the pre-identification area and a batch generation and pre-storage mechanism for label instructions, the pre-generation and classified storage of label printing instructions are realized, which shortens the processing time of a single bottle, improves the overall labeling efficiency and accuracy, and enhances the flexibility and intelligence of production.

[0004] This invention provides a method for real-time printing of bottle labels based on image recognition, the method comprising: Image datasets of bottles to be labeled are obtained within the pre-identification area. Image depth analysis of the image dataset is performed using the YOLO model to obtain the type and quantity of bottles to be labeled. Based on the type and quantity information of the bottles in the batch, batch label printing instructions are generated, and the label printing instructions are stored in the label information database according to the bottle type. When a single bottle arrives at the labeling station, the single bottle is quickly identified to confirm its type. Based on the confirmed type information, the matching label printing instruction is retrieved from the label information database to drive the printer to print the label. The labels are printed in real time and affixed to the labeling area on each individual bottle.

[0005] Furthermore, the step of acquiring an image dataset of bottles to be labeled within the pre-identification area, and performing image depth analysis on the image dataset using the YOLO model to obtain the type and quantity of bottles to be labeled includes: Several image acquisition devices are set up in the pre-identification area, a polarizing filter is set in front of the lens of the image acquisition device, and a polarizing plate is set at the light source position in the pre-identification area. Several polarized bottle images at different angles are extracted to obtain an image dataset. The image dataset is subjected to multi-layer convolution and downsampling using the YOLO model to extract the shape, color, and texture depth features of the bottle from the image dataset. Multi-scale feature fusion is achieved through a path aggregation network. Bounding box regression, target confidence prediction, and category classification are performed in parallel on feature maps of different scales to distinguish and count bottle types in the image dataset and obtain the types and quantities of bottles in a batch.

[0006] Furthermore, the path aggregation network achieves multi-scale feature fusion, performing bounding box regression, target confidence prediction, and category classification in parallel on feature maps of different scales. This distinguishes and counts the types of bottles in the image dataset, obtaining the types and quantities of bottles in the batch to be labeled, including: The YOLO model's backbone network is used to downsample the input image multiple times, generating multi-level feature maps with different spatial resolutions and semantic intensities. The multi-level feature map is input into the path aggregation network, and deep semantic features and shallow precise localization features are fused layer by layer through a top-down upsampling path. The fused enhanced features are then retransmitted to each level through a bottom-up path to obtain bidirectional fused features. The bounding box coordinate regression, target confidence assessment and bottle category classification prediction analysis are performed on the bidirectional fusion features to output the batch bottle type detection results. Based on the detection results, the bottle types in the image dataset are distinguished and counted to obtain the type and quantity of the batch of bottles to be labeled.

[0007] Furthermore, the method of achieving multi-scale feature fusion through path aggregation network, performing bounding box regression, target confidence prediction, and category classification in parallel on feature maps of different scales, distinguishing and counting bottle types in the image dataset, and obtaining the types and quantities of bottles in a batch also includes: The total value is calculated by converting the bottle count of the batch of bottles to be labeled into the total number of bottles in the batch of bottles to be labeled based on the number of bottle types and the bottle data of each bottle type. The calculated total value is compared with the total number of bottles in the batch to be labeled. If the calculated total value is greater than the total number of bottles in the batch to be labeled, the label information is matched according to the calculated total value. If the calculated total value is less than the total number of bottles in the batch to be labeled, then the difference between the calculated total value and the total number of bottles in the batch to be labeled is calculated, and the number of bottles of several bottle types is adjusted according to the distribution ratio of several bottle types.

[0008] Furthermore, the step of generating label printing instructions in batches based on the type and quantity information of the bottles in the batch, and storing the label printing instructions in the label information database according to bottle type, includes: Based on the type of bottles in the batch, query and retrieve the label content related to the type of bottles in the product information database, and create a batch content work order containing the label content and a unique version number; Based on the quantity of bottles in the batch, extract the label content corresponding to the bottle type in the batch content work order, and combine the label content with the label template to generate a label printing instruction; The label printing instructions are associated with the version number of the batch content work order, and the label printing instructions are stored in the label information database according to bottle type.

[0009] Furthermore, after batch bottle identification is completed, querying and retrieving label content related to all bottle types in the batch from the product information database, and creating a batch content work order containing the label content and a unique version number includes: After completing image acquisition and type identification of the batch of bottles within the pre-identification area, a temporary database containing information on the type and quantity of the batch of bottles is generated; The product information database is queried according to the temporary database to obtain the production information of the bottle products. The production information of the bottle products is encapsulated in a unified data format to generate character data with the current timestamp and batch serial number. Create a batch content work order based on the character data of each bottle product.

[0010] Furthermore, when a single bottle arrives at the labeling station, the single bottle is quickly identified to confirm its type, and based on the confirmed type information, a matching label printing instruction is retrieved from the label information database to drive the printer to print the label, including: When the bottle arrives at the labeling station, it is illuminated momentarily by a high-frequency triggered stroboscopic light source, and simultaneously a high-speed image acquisition device is used to acquire a clear image of the bottle in a relatively static state. Structural features of key areas of the bottle are identified in the clear image, and the type of bottle is confirmed based on the structural features; The bottle type information is used as index data, and the label printing instructions corresponding to the bottle type information are queried in the label information database based on the index data. The label printing instruction is retrieved and sent to the printer, causing the printer to print labels based on the label printing instruction.

[0011] Furthermore, the step of momentarily illuminating the bottle with a high-frequency triggered stroboscopic light source when the bottle arrives at the labeling station, and simultaneously acquiring an image using a high-speed image acquisition device to obtain a clear image of the bottle in a relatively static state, includes: When the bottle arrives at the labeling station, it is continuously and instantaneously illuminated by a high-frequency triggered stroboscopic light source, and the bottle is photographed and image acquired by a high-speed image acquisition device of the same frequency to obtain a set of bottle images. Motion blur analysis is performed on the image set of bottles to evaluate the degree of blur in the bottle images acquired by the high-speed image acquisition device; When the blur level exceeds a preset threshold, the trigger frequency or pulse width of the strobe light source is adjusted, and the shooting frequency of the high-speed image acquisition device is adjusted simultaneously to re-acquire the image of the bottle and obtain a clear image of the bottle in a relatively static state.

[0012] Furthermore, the step of identifying structural features of key areas of the bottle in the clear image and confirming the type of bottle based on the structural features includes: Perform contour recognition on the clear image to obtain the basic contour of the bottle; Based on the basic outline, mark the image regions corresponding to the key areas of the bottle in the clear image; The image region is locally enhanced to obtain the structural features of the key areas of the bottle; The structural features are compared and matched with standard features in the database, and the type of bottle is determined based on the comparison and matching results.

[0013] The present invention also provides a real-time bottle label printing system based on image recognition, the real-time printing system comprising: Image acquisition and analysis module: Acquires image datasets of bottles to be labeled within the pre-identification area, performs image depth analysis on the image dataset using the YOLO model, and obtains the type and quantity of bottles to be labeled. Label instruction generation and storage module: Based on the type and quantity information of the bottles in the batch, it generates label printing instructions in batches and stores the label printing instructions in the label information database according to the bottle type; Bottle recognition and instruction retrieval module: When a single bottle arrives at the labeling station, the module quickly identifies the bottle, confirms its type, and retrieves the matching label printing instruction from the label information database based on the confirmed type information to drive the printer to print the label. Labeling module: Affixes real-time printed labels to the labeling locations on individual bottles.

[0014] This invention provides a method and system for real-time bottle label printing based on image recognition. By introducing batch image depth analysis of pre-identified areas and a mechanism for batch generation and pre-storage of label instructions, it effectively solves the efficiency and accuracy bottlenecks of the traditional "see-and-print" mode. By obtaining the type and quantity information of the entire batch of bottles in advance, the system can pre-generate and classify and store label printing instructions. Thus, when a single bottle arrives at the labeling station, it only needs to be quickly identified and the prepared instructions retrieved, significantly shortening the processing time per bottle, improving overall labeling efficiency and accuracy, and enhancing the flexibility and intelligence of production. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart of the real-time bottle label printing method based on image recognition in an embodiment of the present invention; Figure 2 This is a schematic diagram of the image processing process for a batch of bottles to be labeled in an embodiment of the present invention; Figure 3 This is a schematic diagram of multi-scale feature fusion of image data of a batch of bottles to be labeled in an embodiment of the present invention; Figure 4 This is a schematic diagram of a real-time bottle label printing system based on image recognition in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1: Figure 1 A flowchart of a real-time bottle label printing method based on image recognition according to an embodiment of the present invention is shown. Figure 2 This illustration shows a schematic diagram of the image processing procedure for a batch of bottles to be labeled, as shown in an embodiment of the present invention. The real-time label printing method for the bottles includes: S11: Obtain the image dataset of the batch of bottles to be labeled within the pre-identification area, and perform image depth analysis on the image dataset using the YOLO model to obtain the type and quantity of the batch of bottles to be labeled.

[0019] A pre-identification area is set up on a small-batch, multi-variety bottle labeling conveyor line. This allows the labeling system to identify and collect information about the batch of bottles before they arrive at the labeling station, enabling pre-identification of the type and quantity of the bottles and improving labeling efficiency. A camera module captures images of the batch of bottles within the pre-identification area, and these images are compiled into an image dataset. Image processing and analysis of this dataset allows for the identification of the type and quantity of bottles before they enter the labeling station.

[0020] Furthermore, the real-time object detection algorithm model (You Only Look Once, YOLO) can quickly and accurately identify bottles in the bottle image dataset and determine the type and quantity of bottles by performing deep analysis on the bottle image dataset.

[0021] Specifically, the step of acquiring an image dataset of bottles to be labeled within the pre-identification area, and performing image depth analysis on the image dataset using the YOLO model to obtain the type and quantity of bottles to be labeled includes: Several image acquisition devices are set up in the pre-identification area, a polarizing filter is set in front of the lens of the image acquisition device, and a polarizing plate is set at the light source position in the pre-identification area. Several polarized bottle images at different angles are extracted to obtain an image dataset. Furthermore, the image acquisition device can be one of an industrial camera, a CCD camera, or a CMOS camera, capable of acquiring visual information of the batch of bottles to be labeled within the pre-identification area. A polarizing filter is placed in front of the lens of the image acquisition device, selectively allowing light with a specific polarization direction to pass through, while a polarizing plate is placed at the light source position in the pre-identification area to generate light with a specific polarization direction. The combined use of the polarizing filter and polarizing plate effectively eliminates specular reflections and glare that may exist on the bottle surface, thereby obtaining a clearer and more detailed bottle image. By introducing polarized light technology into the pre-identification area, reflections and glare that may exist on the bottle surface are effectively suppressed, enabling the image acquisition device to capture clearer and more detailed bottle images. Therefore, when performing depth analysis on the image dataset, the YOLO model can more accurately extract the shape, color, and texture depth features of the bottle, avoiding inaccurate feature extraction problems caused by poor lighting conditions or bottle reflections.

[0022] The image dataset is processed using a YOLO model with multi-layer convolution and downsampling to extract the shape, color, and texture depth features of the bottles. The YOLO model's backbone typically contains multiple convolutional and downsampling layers. Multi-layer convolutional operations progressively extract features from the original image, from low-level edges and textures to high-level semantic information. Downsampling operations, while preserving key information, reduce the size of the feature maps, lower computational complexity, and increase the receptive field of the features. Through these operations, the shape, color, and texture depth features of the bottles can be effectively extracted from the image dataset. By combining these features, efficient and accurate bottle identification can be achieved.

[0023] This study utilizes a path aggregation network to achieve multi-scale feature fusion. Bounding box regression, target confidence prediction, and category classification are performed in parallel on feature maps at different scales to distinguish and count bottle types in an image dataset, obtaining the types and quantities of bottles in a batch. This multi-scale feature fusion allows the model to utilize feature information from different scales simultaneously, enhancing its ability to detect bottles of varying sizes and shapes. Parallel execution of bounding box regression, target confidence prediction, and category classification on feature maps at different scales ensures accurate bottle location identification, reliable target presence assessment, and accurate differentiation and counting of bottle types. This comprehensive image processing and deep learning approach improves the accuracy and robustness of bottle recognition from the source.

[0024] Furthermore, the Path Aggregation Network (PAN) is a structure used to enhance Feature Pyramid Networks (FPNs). It effectively fuses the precise localization information of shallow features with the rich semantic information of deep features through bottom-up path enhancement, thereby generating enhanced feature maps containing multi-scale contextual information. On these feature maps at different scales, bounding box regression, target confidence prediction, and category classification are performed in parallel. Bounding box regression aims to accurately predict the position and size of the bottle in the image; target confidence prediction is used to assess the probability that the detected target is a bottle; and category classification is used to identify the specific type of bottle. Through this multi-task parallel processing, the YOLO model can accurately distinguish the types of bottles in the image dataset and accurately count the number of each type of bottle, ultimately obtaining the type and quantity information of the batch of bottles to be labeled.

[0025] Specifically, Figure 3This illustration shows a multi-scale feature fusion diagram of image data of a batch of bottles to be labeled, as shown in an embodiment of the present invention. The multi-scale feature fusion is achieved through a path aggregation network, which performs bounding box regression, target confidence prediction, and category classification in parallel on feature maps of different scales. This process distinguishes and counts the types of bottles in the image dataset, obtaining the types and quantities of bottles in the batch to be labeled. The YOLO model's backbone network performs multiple downsampling operations on the input image to generate multi-level feature maps with different spatial resolutions and semantic intensities. The YOLO model's backbone network can be a deep convolutional neural network structure, capable of extracting multi-level feature information from the original input image.

[0026] The multi-level feature map is input into the path aggregation network, and deep semantic features and shallow precise localization features are fused layer by layer through a top-down upsampling path. The fused enhanced features are then retransmitted to each level through a bottom-up path to obtain bidirectional fused features.

[0027] Specifically, the YOLO model first fuses deep (high semantic, low resolution) feature maps with shallow (low semantic, high resolution) feature maps layer by layer through a top-down upsampling path. This process aims to transfer the rich semantic information contained in the deep features to the shallow features, thereby enhancing the semantic expressive power of the shallow features and improving the recognition accuracy of the target object (i.e., the bottle). Building on this, the network also incorporates a bottom-up path to re-transfer the enhanced features after fusion to each layer. This bottom-up path can transfer precise localization information from the shallow features to the deep features, thus compensating for the shortcomings of deep features in spatial localization, ultimately resulting in a bidirectional fused feature that combines rich semantic information and precise spatial localization capabilities.

[0028] The system performs bounding box coordinate regression, target confidence assessment, and bottle category classification predictive analysis on the bidirectional fusion features, outputting batch bottle type detection results. Based on the detection results, it distinguishes and counts the bottle types in the image dataset to obtain the type and quantity of bottles in the batch to be labeled. Bounding box coordinate regression aims to accurately predict the position and size of bottles in the image by outputting a series of coordinate values ​​to define each bottle. Target confidence assessment determines whether a bottle actually exists within the predicted bounding box and provides its probability of existence. Bottle category classification predictive analysis identifies the specific type of each detected bottle. Through these predictive analyses, the system can output batch bottle type detection results and, based on these results, distinguish and count the bottle types in the image dataset, ultimately obtaining accurate type and quantity information for the batch of bottles to be labeled.

[0029] Specifically, the method of achieving multi-scale feature fusion through path aggregation network, performing bounding box regression, target confidence prediction, and category classification in parallel on feature maps of different scales, distinguishing and counting bottle types in the image dataset, and obtaining the types and quantities of bottles in a batch also includes: The total number of bottles in the batch to be labeled is calculated based on the number of bottle types and the data for each bottle type. This calculation, after obtaining the structural features of each bottle through image recognition, combines preset or product information database-retrieved standard data for each bottle. This standard data can include the standard outline, volume, or weight of each bottle. Different combinations of features are used to determine the bottle type. However, due to issues with the arrangement of structural features in the image dataset, the number of bottles identified by the system may deviate from the actual number of bottles in the batch to be labeled. The final calculation combines the total number of bottles obtained through visual recognition with the actual total number of bottles in the batch to be labeled.

[0030] Furthermore, the total number of bottles in the batch to be labeled can be identified and counted by a sensor during the bottle feeding stage. A photoelectric sensor can be used to identify and count the bottles input to the labeling production line, thereby obtaining the actual total number of bottles in the batch to be labeled.

[0031] The calculated total value is compared with the total number of bottles in the batch to be labeled. If the calculated total value is greater than the total number of bottles in the batch to be labeled, the label information is matched according to the calculated total value. If the calculated total value is greater than the total number of bottles in the batch to be labeled, the label information is matched according to the calculated total value. The fact that the calculated total value is greater than the total number of bottles in the batch to be labeled reflects that when the visual recognition result shows that the number of bottles is greater than the actual physical number, in order to avoid missing labels, the system will tend to use a larger calculated total value to generate label printing instructions, ensuring that all possible bottles in the batch to be labeled can obtain labels, and even if the actual physical number is slightly lower, it can avoid production interruption due to insufficient labels.

[0032] If the calculated total value is less than the total number of bottles in the batch to be labeled, then the difference between the calculated total value and the total number of bottles in the batch to be labeled is calculated, and the number of bottles of several bottle types is adjusted according to the distribution ratio of several bottle types.

[0033] Furthermore, if the calculated total is less than the total number of bottles in the batch to be labeled, the difference between the calculated total and the total number of bottles in the batch to be labeled is calculated, and the number of bottles of several bottle types is adjusted according to the distribution ratio of several bottle types. This situation indicates that visual recognition may have missed identifications. In this case, the system will calculate the missing number and, based on the previously identified proportions of various bottle types, reasonably distribute this missing number to each type of bottle, thereby correcting the number of each type of bottle to more closely approximate the actual physical distribution. For example, if the batch identifies 60% type A bottles and 40% type B bottles, but the total is 10 bottles short, then the number of type A bottles will be increased by 6, and the number of type B bottles will be increased by 4.

[0034] Specifically, by introducing visual recognition to calculate the total number of bottles and comparing it with the total number of bottles in the batch to be labeled, this effectively solves the problem of inaccurate bottle counts that may result from relying solely on image recognition. Specifically, when there is a difference between the image recognition result and the actual total, this solution can adopt different correction strategies based on the difference. If the calculated total is greater than the actual total, the calculated total is used first for label matching to avoid insufficient labels due to underestimation of the quantity. If the calculated total is less than the actual total, the difference is calculated and adjusted according to the distribution ratio of bottle types, thereby compensating for potential omissions in image recognition. This ensures that the final bottle type and quantity information is closer to the actual situation, providing a more accurate basis for subsequent label printing and affixing.

[0035] By introducing a multi-verification mechanism—combining data conversion with comparison to the actual total—the potential errors of single image recognition are effectively mitigated, preventing label printing errors or waste caused by inaccurate recognition. Especially when the recognized quantity differs from the actual quantity, intelligent quantity adjustments are made to ensure a high degree of match between the label printing instructions and actual needs, thereby improving the reliability and production efficiency of the entire real-time bottle label printing method.

[0036] S12: Based on the type and quantity information of the bottles in the batch, generate label printing instructions in batches, and store the label printing instructions in the label information database according to the bottle type.

[0037] Specifically, based on production plans or order information, the system pre-organizes label data for batch bottles according to the bottle production specifications involved in the product production line at the start of a batch task. This enables modular and parameterized batch generation of batch bottles. Operators only need to input or import the types, quantities, and corresponding variable information of different bottles in the batch. The variable information includes production date, batch number, serial number range, and other data. By processing and identifying the types and quantities of batch bottles based on the image dataset, the system can batch generate label printing instructions for the corresponding batch of bottles to be labeled. Combined with the real-time detection process, the system can dynamically fill and serialize the data, thereby generating a unique serial number for each bottle. This ensures the independence and traceability of each label, greatly improving the efficiency and accuracy of the instruction preparation stage.

[0038] The generated massive number of printing instructions are categorized and stored in a label information database based on the bottle type and quantity information obtained from the image dataset. The system can establish an independent logical storage unit or data table for each bottle type and store all printing instructions belonging to that type in an orderly manner into the corresponding unit. Through this structured storage method, a highly efficient and collaborative logical framework is formed with the real-time recognition system at the front-end labeling station, thereby ensuring high-speed response of the production line and effectively avoiding confusion and printing errors between different types of labels.

[0039] Specifically, the step of generating label printing instructions in batches based on the type and quantity information of the bottles in the batch, and storing the label printing instructions in the label information database according to bottle type, includes: Based on the type of bottles in the batch, query and retrieve the label content related to the type of bottles in the product information database, and create a batch content work order containing the label content and a unique version number; Based on the quantity of bottles in the batch, extract the label content corresponding to the bottle type in the batch content work order, and combine the label content with the label template to generate a label printing instruction; The label printing instructions are associated with the version number of the batch content work order, and the label printing instructions are stored in the label information database according to bottle type.

[0040] The product information database can be understood as storing detailed information about all bottle-producing products, including but not limited to bottle specifications, materials, capacity, production batches, and the corresponding standard label content. Label content refers to all information to be printed on the bottle label, such as product name, production date, expiration date, batch number, barcode, QR code, ingredient list, brand logo, and any necessary legal or regulatory information. A unique version number ensures the accuracy and traceability of the label content; each batch content work order is assigned a unique identifier upon creation to distinguish between different batches or revisions of the label content. The batch content work order is a data structure or file that integrates all label-related information required for a specific batch of bottles, serving as an intermediate carrier for generating specific printing instructions.

[0041] Furthermore, a label template refers to a pre-designed label layout format, which defines the layout, font, size, color, and image position of each information element on the label. Label printing instructions are a sequence of commands generated based on the label content and label template, directly driving the printer to print. They contain all the parameters and data required for the printer to perform the printing operation.

[0042] In practical applications, associating label printing instructions with the version number of the batch work order aims to establish a clear correspondence between label printing instructions and the original label content, facilitating subsequent quality control, traceability, and auditing. The label information database is a centralized database storing all generated label printing instructions. By categorizing and storing instructions by bottle type, the efficiency of instruction retrieval and management convenience can be greatly improved.

[0043] Specifically, after batch bottle identification is completed, querying and retrieving label content related to all bottle types in the batch from the product information database, and creating a batch content work order containing the label content and a unique version number includes: After completing image acquisition and type identification of the batch of bottles within the pre-identification area, a temporary database containing information on the type and quantity of the batch of bottles is generated. By temporarily storing the image types and information of the batch of bottles within the pre-identification area in the temporary database, the standardization of information management can be improved.

[0044] The product information database is queried according to the temporary database to obtain the production information of the bottle products. The production information of the bottle products is encapsulated in a unified data format to generate character data with the current timestamp and batch serial number. Create a batch content work order based on the character data of each bottle product.

[0045] Specifically, after completing image acquisition and type identification of the batch of bottles within the pre-identification area, the system generates a temporary database. This temporary database stores the type and quantity information of the bottles in the current batch, serving as an intermediate data carrier for subsequent queries and processing. The bottle type information may include the bottle's model and specifications, while the quantity information refers to the specific number of each type of bottle in the batch.

[0046] Furthermore, based on the bottle type and quantity information recorded in the temporary database, the system queries the product information database. The product information database typically stores detailed production information for various bottle products, such as label content, production date, batch number, and product description. By querying, the system can retrieve the production information corresponding to the bottle type in the current batch. The retrieved bottle product production information is encapsulated in a unified data format to ensure data consistency and standardization. Based on this, the system generates character data with a current timestamp and batch serial number. The current timestamp records the time the data was generated, while the batch serial number uniquely identifies the batch data, thereby enhancing data traceability.

[0047] Finally, based on the character data of each bottle product, the system will construct a batch content work order. This batch content work order contains all the necessary label content and a unique version number, providing an accurate and traceable basis for generating subsequent label printing instructions.

[0048] S13: When a single bottle arrives at the labeling station, the single bottle is quickly identified to confirm the type of the bottle, and based on the confirmed type information, the matching label printing instruction is retrieved from the label information database to drive the printer to print the label.

[0049] When a single bottle arrives at the labeling station, the integrated vision recognition system is immediately activated. The system quickly captures an image of the bottle using an industrial camera, and utilizes preset light sources and a background to ensure image quality. Subsequently, the core intelligent processing unit analyzes the image in real time, extracting multi-dimensional features such as the bottle's outline dimensions, aspect ratio, color distribution, and even the shape of the bottle cap to form the basis for recognition. This automated sensing process accurately and efficiently confirms the bottle type, providing a reliable data foundation for subsequent operations.

[0050] Once the type is confirmed, the system immediately matches the recognition result with the label information database and automatically generates the corresponding label printing instruction, which is then sent to the printer. Based on advanced machine learning algorithms, the system can quickly extract and recognize bottle image features. Combined with bottle image processing information obtained from the image dataset of the pre-identified area, it can build a fast bottle type recognition system, ensuring fully automated processing from bottle recognition to label printing and improving the accuracy of the labeling production line.

[0051] When the bottle arrives at the labeling station, it is momentarily illuminated by a high-frequency triggered stroboscopic light source, and simultaneously image acquisition is performed using a high-speed image acquisition device. The purpose is to capture the instantaneous state of the bottle during its high-speed movement, thereby obtaining a clear image without motion blur. The high-frequency triggered stroboscopic light source can be understood as an illumination device capable of emitting high-intensity light in the form of extremely short pulses. Its triggering frequency matches the shooting frequency of the high-speed image acquisition device to ensure image acquisition is completed instantaneously upon illumination. The high-speed image acquisition device refers to a camera with high frame rate and short exposure time capabilities, capable of quickly capturing images to achieve "frozen" imaging of moving objects in conjunction with the stroboscopic light source. This allows for the acquisition of a clear image of the bottle in a relatively static state, which is the basis for subsequent accurate identification of the bottle type.

[0052] Furthermore, structural features of key areas of the bottle are identified in the clear image, and the type of bottle is confirmed based on these structural features. The structural features of key areas refer to distinctive geometric shapes, outlines, textures, or specific markings on the bottle body, such as the shape of the neck, the curves of the bottle body, bottom features, or embossed patterns. These features typically differ significantly between different types of bottles and can serve as a basis for identification. By analyzing and comparing these structural features, the specific type of a single bottle can be accurately identified.

[0053] Furthermore, the bottle type information is used as index data to query the label printing instructions corresponding to the bottle type information in the label information database. The index data is an identifier used to quickly locate and retrieve specific label printing instructions in the label information database; it is typically a unique code or name for the bottle type. The label information database stores pre-generated label printing instructions categorized by bottle type, with each instruction corresponding to a specific bottle's label content and format. By using the bottle type information as an index, label printing instructions that perfectly match the current bottle type can be efficiently retrieved from the label information database.

[0054] Finally, the label printing instruction is retrieved and sent to the printer, enabling the printer to print labels based on the instruction. The label printing instruction contains all the information needed to print the label, such as text content, pattern, size, and material. Upon receiving the instruction, the printer generates and prints the corresponding label in real time based on the instruction content.

[0055] Specifically, when the bottle arrives at the labeling station, the bottle is momentarily illuminated by a high-frequency triggered stroboscopic light source, and simultaneously, a high-speed image acquisition device is used to acquire a clear image of the bottle in a relatively static state, including: When the bottle arrives at the labeling station, it is continuously and instantaneously illuminated by a high-frequency triggered stroboscopic light source, and the bottle is photographed and image acquired by a high-speed image acquisition device of the same frequency to obtain a set of bottle images. Motion blur analysis is performed on the image set of bottles to evaluate the degree of blur in the bottle images acquired by the high-speed image acquisition device; When the blur level exceeds a preset threshold, the trigger frequency or pulse width of the strobe light source is adjusted, and the shooting frequency of the high-speed image acquisition device is adjusted simultaneously to re-acquire the image of the bottle and obtain a clear image of the bottle in a relatively static state.

[0056] When a batch of bottles to be labeled reaches the labeling area, they are sequentially transported to the labeling station via a limiting mechanism or a pushing mechanism. In this high-speed moving environment, high-frequency instantaneous illumination and high-speed image acquisition are used to obtain the bottle type. Combined with pre-set label printing instructions, the system addresses the issue of motion blur in the acquired images due to accumulated errors caused by environmental factors or the system's own workload. When the detected blur exceeds a preset threshold, the system intelligently adjusts the trigger frequency or pulse width of the strobe light source and simultaneously adjusts the shooting frequency of the high-speed image acquisition device. This feedback control mechanism optimizes the image acquisition parameters based on the actual motion blur, ensuring clear images of the bottles in a relatively stationary state for each acquisition, providing high-quality input data for subsequent bottle type identification.

[0057] Specifically, identifying the structural features of key areas of the bottle in the clear image and confirming the type of bottle based on the structural features includes: Perform contour recognition on the clear image to obtain the basic contour of the bottle; Based on the basic outline, mark the image regions corresponding to the key areas of the bottle in the clear image; The image region is locally enhanced to obtain the structural features of the key areas of the bottle; The structural features are compared and matched with standard features in the database, and the type of bottle is determined based on the comparison and matching results.

[0058] Specifically, contour recognition of the clear image refers to using image processing algorithms, such as Canny edge detection and the Sobel operator, to identify the outer boundary of the bottle, thereby obtaining the basic contour of the bottle. This basic contour provides a precise localization reference for subsequent feature extraction.

[0059] Furthermore, marking the corresponding key areas of the bottle in the clear image based on the basic outline refers to defining areas that play a decisive role in identifying the bottle type within the basic outline of the bottle or at specific locations, according to preset rules or models, after obtaining the overall outline of the bottle. These key areas may include the bottle neck, specific pattern areas on the bottle body, or bottom feature areas. These key areas typically contain unique structural information that distinguishes different bottle types.

[0060] Based on this, local enhancement processing is performed on the image region to improve the visibility and recognizability of structural features within the key areas. For example, image processing techniques such as contrast stretching, histogram equalization, and sharpening filtering can be used to make the texture and shape details within the key areas clearer, facilitating subsequent feature extraction. Thus, the structural features of the key areas of the bottle can be obtained; these features can include geometric shapes, texture patterns, color distribution, etc.

[0061] Finally, the structural features are compared and matched with standard features in the database to determine the type of bottle. Specifically, the structural features of the extracted key areas of the bottle are compared with feature templates of various standard bottle types pre-stored in the database. Comparison and matching can be performed by calculating the similarity between feature vectors, distance metrics, etc. When the matching degree reaches a preset threshold, the type of the current individual bottle can be confirmed.

[0062] By performing contour recognition on clear images, the main body of the bottle can be accurately defined, providing precise localization for subsequent feature extraction. Building upon this, by marking and locally enhancing key areas of the bottle, structural features crucial for bottle type identification are highlighted and optimized, avoiding interference from non-critical areas and improving the efficiency and accuracy of feature extraction. Finally, by comparing and matching these enhanced structural features with standard features in the database, the specific bottle type can be reliably confirmed, effectively supporting the rapid identification needs of individual bottles at the labeling station.

[0063] S14: Attach the live-printed label to the labeling location on the individual bottle.

[0064] The labeling system uses bottle type information as an index to quickly retrieve the label printing instructions matching the bottle type from a pre-stored label information database. These instructions are then sent to the printer, which prints the corresponding labels in real time. The labeling robot can then affix the corresponding labels to the labeling area of ​​each individual bottle.

[0065] Specifically, the operation process of the real-time bottle label printing method based on image recognition proposed in this embodiment of the invention includes: An image dataset of bottles to be labeled is acquired within a pre-identification area. The YOLO model is then used to perform depth analysis on the image dataset to determine the type and quantity of the bottles in the batch. Specifically, one or more image acquisition devices, such as industrial cameras, can be positioned within the pre-identification area to photograph bottles passing through that area. These image acquisition devices can be configured to capture images under specific triggering conditions. The acquired image dataset is then fed into a pre-trained YOLO model. The YOLO model analyzes these images, identifies the bottles present in the images, classifies each bottle, and counts the identified bottles, thereby obtaining information on the type and quantity of the bottles in the batch to be labeled.

[0066] Based on the type and quantity information of the bottles in the batch, label printing instructions are generated in batches and stored in a label information database according to bottle type. After obtaining the type and quantity information of the bottles in the batch, the system will generate corresponding label printing instructions in batches based on this information. For example, if the batch is identified as containing 100 type A bottles and 50 type B bottles, the system will generate label printing instructions for 100 type A bottles and 50 type B bottles. These instructions can include label text content, barcodes, QR codes, patterns, dimensions, material, and other information. After generation, these label printing instructions are categorized according to bottle type and stored in a label information database. The label information database can be a database system where each bottle type corresponds to one or more label templates or a set of generated printing instructions for subsequent quick retrieval.

[0067] When a single bottle arrives at the labeling station, it is quickly identified to determine its type. Based on this identification, the system retrieves the matching label printing instruction from the label database and drives the printer to print the label. As the bottle moves along the production line and reaches the labeling station again, the system performs another rapid identification. This identification can employ simplified visual recognition methods, such as identifying the bottle's shape, color, or pre-defined identifiers to quickly determine its type. Once the bottle type is confirmed, the system uses this type information as an index to quickly retrieve the matching label printing instruction from the pre-stored label database. These instructions are then sent to the printer, driving it to print the corresponding label in real time.

[0068] The labels are printed in real time and affixed to their designated labeling positions on individual bottles. Once printed, the labeling unit immediately removes the label from the printer and accurately affixes it to the pre-designated labeling position on each bottle. This process requires high precision and speed to ensure correct label application and to keep pace with the production line.

[0069] The image recognition-based real-time bottle label printing method of this application obtains the type and quantity information of bottles in advance by performing image depth analysis on batches of bottles in a pre-identification area, thereby realizing the batch generation and classified storage of label printing instructions. The operation steps of storing bottle type and quantity, as well as bottle label information, are set in the bottle conveying stage, thereby improving production cycle and efficiency.

[0070] Specifically, this invention effectively solves the efficiency and accuracy bottlenecks of the traditional "see-and-print" mode by introducing a batch image depth analysis of the pre-identified area and a batch generation and pre-storage mechanism for label instructions. By obtaining the type and quantity information of the entire batch of bottles in advance, the system can pre-generate and classify and store label printing instructions. Thus, when a single bottle arrives at the labeling station, it only needs to be quickly identified and the prepared instructions retrieved, significantly shortening the processing time per bottle, improving the overall labeling efficiency and accuracy, and enhancing the flexibility and intelligence of production.

[0071] Example 2: Figure 2 The present invention also provides a schematic diagram of a real-time bottle label printing system based on image recognition, the real-time printing system comprising: Image acquisition and analysis module 10: Acquires image datasets of the batch of bottles to be labeled within the pre-identification area, performs image depth analysis on the image dataset using the YOLO model, and obtains the type and quantity of the batch of bottles to be labeled.

[0072] In the pre-identification area, image acquisition equipment captures an image dataset of bottles to be labeled in the batch. These images are then subjected to deep analysis by the YOLO model to identify the type and quantity of bottles. For example, assuming a batch contains multiple types of beverage bottles, the YOLO model can accurately distinguish the quantity of mineral water bottles, juice bottles, and carbonated beverage bottles. Based on these identification results, the system generates corresponding label printing instructions in batches and stores these instructions in the label information database according to bottle type. For example, one batch of label instructions is generated for mineral water bottles, and another batch for juice bottles. When a single bottle on the production line moves to the labeling station, the system quickly identifies it to confirm its specific type. Once the type is determined, the system immediately retrieves the pre-stored label printing instructions matching the bottle type from the label information database and drives the printer to print the label in real time. Finally, the printed label is precisely affixed to the designated location on the bottle.

[0073] Specifically, identifying the bottle type and quantity from the image dataset of the batch of bottles to be labeled includes: The total number of bottles in the batch to be labeled is calculated based on the number of bottle types and the data for each bottle type. This calculation, after obtaining the structural features of each bottle through image recognition, combines preset or product information database-retrieved standard data for each bottle. This standard data can include the standard outline, volume, or weight of each bottle. Different combinations of features are used to determine the bottle type. However, due to issues with the arrangement of structural features in the image dataset, the number of bottles identified by the system may deviate from the actual number of bottles in the batch to be labeled. The final calculation combines the total number of bottles obtained through visual recognition with the actual total number of bottles in the batch to be labeled.

[0074] Furthermore, the total number of bottles in the batch to be labeled can be identified and counted by a sensor during the bottle feeding stage. A photoelectric sensor can be used to identify and count the bottles input to the labeling production line, thereby obtaining the actual total number of bottles in the batch to be labeled.

[0075] The calculated total value is compared with the total number of bottles in the batch to be labeled. If the calculated total value is greater than the total number of bottles in the batch to be labeled, the label information is matched according to the calculated total value. If the calculated total value is greater than the total number of bottles in the batch to be labeled, the label information is matched according to the calculated total value. The fact that the calculated total value is greater than the total number of bottles in the batch to be labeled reflects that when the visual recognition result shows that the number of bottles is greater than the actual physical number, in order to avoid missing labels, the system will tend to use a larger calculated total value to generate label printing instructions, ensuring that all possible bottles in the batch to be labeled can obtain labels, and even if the actual physical number is slightly lower, it can avoid production interruption due to insufficient labels.

[0076] If the calculated total value is less than the total number of bottles in the batch to be labeled, then the difference between the calculated total value and the total number of bottles in the batch to be labeled is calculated, and the number of bottles of several bottle types is adjusted according to the distribution ratio of several bottle types.

[0077] Furthermore, if the calculated total is less than the total number of bottles in the batch to be labeled, the difference between the calculated total and the total number of bottles in the batch to be labeled is calculated, and the number of bottles of several bottle types is adjusted according to the distribution ratio of several bottle types. This situation indicates that visual recognition may have missed identifications. In this case, the system will calculate the missing number and, based on the previously identified proportions of various bottle types, reasonably distribute this missing number to each type of bottle, thereby correcting the number of each type of bottle to more closely approximate the actual physical distribution. For example, if the batch identifies 60% type A bottles and 40% type B bottles, but the total is 10 bottles short, then the number of type A bottles will be increased by 6, and the number of type B bottles will be increased by 4.

[0078] Specifically, by introducing visual recognition to calculate the total number of bottles and comparing it with the total number of bottles in the batch to be labeled, this effectively solves the problem of inaccurate bottle counts that may result from relying solely on image recognition. Specifically, when there is a difference between the image recognition result and the actual total, this solution can adopt different correction strategies based on the difference. If the calculated total is greater than the actual total, the calculated total is used first for label matching to avoid insufficient labels due to underestimation of the quantity. If the calculated total is less than the actual total, the difference is calculated and adjusted according to the distribution ratio of bottle types, thereby compensating for potential omissions in image recognition. This ensures that the final bottle type and quantity information is closer to the actual situation, providing a more accurate basis for subsequent label printing and affixing.

[0079] Label instruction generation and storage module 20: Based on the type and quantity information of the batch of bottles, it generates label printing instructions in batches and stores the label printing instructions in the label information database according to the bottle type.

[0080] Specifically, the step of generating label printing instructions in batches based on the type and quantity information of the bottles in the batch, and storing the label printing instructions in the label information database according to bottle type, includes: Based on the type of bottles in the batch, query and retrieve the label content related to the type of bottles in the product information database, and create a batch content work order containing the label content and a unique version number; Based on the quantity of bottles in the batch, extract the label content corresponding to the bottle type in the batch content work order, and combine the label content with the label template to generate a label printing instruction; The label printing instructions are associated with the version number of the batch content work order, and the label printing instructions are stored in the label information database according to bottle type.

[0081] The product information database can be understood as storing detailed information about all bottle-producing products, including but not limited to bottle specifications, materials, capacity, production batches, and the corresponding standard label content. Label content refers to all information to be printed on the bottle label, such as product name, production date, expiration date, batch number, barcode, QR code, ingredient list, brand logo, and any necessary legal or regulatory information. A unique version number ensures the accuracy and traceability of the label content; each batch content work order is assigned a unique identifier upon creation to distinguish between different batches or revisions of the label content. The batch content work order is a data structure or file that integrates all label-related information required for a specific batch of bottles, serving as an intermediate carrier for generating specific printing instructions.

[0082] Furthermore, a label template refers to a pre-designed label layout format, which defines the layout, font, size, color, and image position of each information element on the label. Label printing instructions are a sequence of commands generated based on the label content and label template, directly driving the printer to print. They contain all the parameters and data required for the printer to perform the printing operation.

[0083] In practical applications, associating label printing instructions with the version number of the batch work order aims to establish a clear correspondence between label printing instructions and the original label content, facilitating subsequent quality control, traceability, and auditing. The label information database is a centralized database storing all generated label printing instructions. By categorizing and storing instructions by bottle type, the efficiency of instruction retrieval and management convenience can be greatly improved.

[0084] Bottle recognition and instruction retrieval module 30: When a single bottle arrives at the labeling station, the single bottle is quickly identified to confirm the type of the bottle, and based on the confirmed type information, the matching label printing instruction is retrieved from the label information database to drive the printer to print the label.

[0085] When the bottle arrives at the labeling station, a high-frequency triggered stroboscopic light source works synchronously with a high-speed image acquisition device, effectively solving the problem of blurred bottle images during high-speed movement and thus obtaining high-quality, clear bottle images. It is precisely because of this clear image that subsequent identification of key structural features of the bottle becomes accurate and reliable, thereby precisely confirming the bottle type. By using the confirmed bottle type information as index data for rapid searching in the label information database, it ensures that the label printing instruction that perfectly matches the current bottle type can be retrieved in a timely manner. Finally, the retrieved instruction is sent to the printer, achieving real-time and accurate label printing.

[0086] Specifically, the clear image is processed using image processing algorithms such as Canny edge detection and the Sobel operator to identify the bottle's outer boundary, thereby obtaining the bottle's basic outline. This basic outline provides a precise localization reference for subsequent feature extraction.

[0087] Furthermore, marking the corresponding key areas of the bottle in the clear image based on the basic outline refers to defining areas that play a decisive role in identifying the bottle type within the basic outline of the bottle or at specific locations, according to preset rules or models, after obtaining the overall outline of the bottle. These key areas may include the bottle neck, specific pattern areas on the bottle body, or bottom feature areas. These key areas typically contain unique structural information that distinguishes different bottle types.

[0088] Based on this, local enhancement processing is performed on the image region to improve the visibility and recognizability of structural features within the key areas. For example, image processing techniques such as contrast stretching, histogram equalization, and sharpening filtering can be used to make the texture and shape details within the key areas clearer, facilitating subsequent feature extraction. Thus, the structural features of the key areas of the bottle can be obtained; these features can include geometric shapes, texture patterns, color distribution, etc.

[0089] Finally, the structural features are compared and matched with standard features in the database to determine the type of bottle. Specifically, the structural features of the extracted key areas of the bottle are compared with feature templates of various standard bottle types pre-stored in the database. Comparison and matching can be performed by calculating the similarity between feature vectors, distance metrics, etc. When the matching degree reaches a preset threshold, the type of the current individual bottle can be confirmed.

[0090] Labeling module 40: Affixes real-time printed labels to the labeling positions on individual bottles.

[0091] The image recognition-based real-time bottle label printing system proposed in this embodiment of the invention uses an image acquisition and analysis module 10 to perform depth analysis on batches of bottles within a pre-identification area to obtain bottle type and quantity information in advance. This allows the label instruction generation and storage module 20 to batch generate and classify and store label printing instructions. When a single bottle arrives at the labeling station, the bottle recognition and instruction retrieval module 30 only needs to quickly identify and retrieve the pre-stored instructions to drive the printer to print the label, which is then affixed by the labeling module 40.

[0092] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.

[0093] Furthermore, the above provides a detailed description of the real-time printing method and system for bottle labels based on image recognition provided by the embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for real-time printing of bottle labels based on image recognition, characterized in that, The method for real-time printing of bottle labels includes: Image datasets of bottles to be labeled are obtained within the pre-identification area. Image depth analysis of the image dataset is performed using the YOLO model to obtain the type and quantity of bottles to be labeled. Based on the type and quantity information of the bottles in the batch, batch label printing instructions are generated, and the label printing instructions are stored in the label information database according to the bottle type. Based on the image dataset, the system processes and identifies the type and quantity information of the bottles in the batch, generates label printing instructions for the corresponding batch of bottles to be labeled in the system, and achieves dynamic filling and serialization of data in conjunction with the real-time detection process, generating a unique serial number for each bottle. In the label information database, an independent logical storage unit is established for each bottle type, and all printing instructions belonging to that type are stored in the corresponding logical storage unit in an orderly manner; When a single bottle arrives at the labeling station, the single bottle is quickly identified to confirm its type. Based on the confirmed type information, the matching label printing instruction is retrieved from the label information database to drive the printer to print the label. The labels are printed in real time and affixed to the labeling area on each individual bottle.

2. The real-time label printing method for bottles as described in claim 1, characterized in that, The process of acquiring an image dataset of bottles to be labeled within a pre-identification area, and performing image depth analysis on the image dataset using a YOLO model to determine the type and quantity of bottles to be labeled includes: Several image acquisition devices are set up in the pre-identification area, a polarizing filter is set in front of the lens of the image acquisition device, and a polarizing plate is set at the light source position in the pre-identification area. Several polarized bottle images at different angles are extracted to obtain an image dataset. The image dataset is subjected to multi-layer convolution and downsampling using the YOLO model to extract the shape, color, and texture depth features of the bottle from the image dataset. Multi-scale feature fusion is achieved through a path aggregation network. Bounding box regression, target confidence prediction, and category classification are performed in parallel on feature maps of different scales to distinguish and count bottle types in the image dataset and obtain the types and quantities of bottles in a batch.

3. The real-time label printing method for bottles as described in claim 2, characterized in that, The method achieves multi-scale feature fusion through path aggregation network, and performs bounding box regression, target confidence prediction, and category classification in parallel on feature maps of different scales. It distinguishes and counts the types of bottles in the image dataset, obtaining the types and quantities of bottles in the batch to be labeled, including: The YOLO model's backbone network is used to downsample the input image multiple times, generating multi-level feature maps with different spatial resolutions and semantic intensities. The multi-level feature map is input into the path aggregation network, and deep semantic features and shallow precise localization features are fused layer by layer through a top-down upsampling path. The fused enhanced features are then retransmitted to each level through a bottom-up path to obtain bidirectional fused features. The bounding box coordinate regression, target confidence assessment and bottle category classification prediction analysis are performed on the bidirectional fusion features to output the batch bottle type detection results. Based on the detection results, the bottle types in the image dataset are distinguished and counted to obtain the type and quantity of the batch of bottles to be labeled.

4. The real-time label printing method for bottles as described in claim 3, characterized in that, The method of achieving multi-scale feature fusion through path aggregation network, performing bounding box regression, target confidence prediction, and category classification in parallel on feature maps of different scales, distinguishing and counting bottle types in the image dataset, and obtaining the types and quantities of bottles in a batch also includes: The total value is calculated by converting the bottle count of the batch of bottles to be labeled into the total number of bottles in the batch of bottles to be labeled based on the number of bottle types and the bottle data of each bottle type. The calculated total value is compared with the total number of bottles in the batch to be labeled. If the calculated total value is greater than the total number of bottles in the batch to be labeled, the label information is matched according to the calculated total value. If the calculated total value is less than the total number of bottles in the batch to be labeled, then the difference between the calculated total value and the total number of bottles in the batch to be labeled is calculated, and the number of bottles of several bottle types is adjusted according to the distribution ratio of several bottle types.

5. The real-time bottle label printing method as described in claim 1, characterized in that, The step of generating label printing instructions in batches based on the type and quantity information of the bottles in the batch, and storing the label printing instructions in the label information database according to bottle type, includes: Based on the type of bottles in the batch, query and retrieve the label content related to the type of bottles in the product information database, and create a batch content work order containing the label content and a unique version number; Based on the quantity of bottles in the batch, extract the label content corresponding to the bottle type in the batch content work order, and combine the label content with the label template to generate a label printing instruction; The label printing instructions are associated with the version number of the batch content work order, and the label printing instructions are stored in the label information database according to bottle type.

6. The real-time bottle label printing method as described in claim 5, characterized in that, After the batch of bottles is identified, the product information database is queried and the label content related to all bottle types in that batch is retrieved. A batch content work order containing the label content and a unique version number is created, including: After completing image acquisition and type identification of the batch of bottles within the pre-identification area, a temporary database containing information on the type and quantity of the batch of bottles is generated; The product information database is queried according to the temporary database to obtain the production information of the bottle products. The production information of the bottle products is encapsulated in a unified data format to generate character data with the current timestamp and batch serial number. Batch content work orders are created based on the character data of each bottle product.

7. The real-time label printing method for bottles as described in claim 1, characterized in that, When a single bottle arrives at the labeling station, the single bottle is quickly identified to confirm its type. Based on the confirmed type information, a matching label printing instruction is retrieved from the label information database, and the printer is driven to print the label. This process includes: When the bottle arrives at the labeling station, it is illuminated momentarily by a high-frequency triggered stroboscopic light source, and simultaneously a high-speed image acquisition device is used to acquire a clear image of the bottle in a relatively static state. Structural features of key areas of the bottle are identified in the clear image, and the type of bottle is confirmed based on the structural features; The bottle type information is used as index data, and the label printing instructions corresponding to the bottle type information are queried in the label information database based on the index data. The label printing instruction is retrieved and sent to the printer, causing the printer to print labels based on the label printing instruction.

8. The method for real-time printing of bottle labels as described in claim 7, characterized in that, The process of momentarily illuminating the bottle upon its arrival at the labeling station using a high-frequency triggered stroboscopic light source, and simultaneously acquiring a clear image of the bottle in a relatively static state using a high-speed image acquisition device, includes: When the bottle arrives at the labeling station, it is continuously and instantaneously illuminated by a high-frequency triggered stroboscopic light source, and the bottle is photographed and images are acquired by a high-speed image acquisition device of the same frequency to obtain a set of bottle images. Motion blur analysis is performed on the image set of bottles to evaluate the degree of blur in the bottle images acquired by the high-speed image acquisition device; When the blur level exceeds a preset threshold, the trigger frequency or pulse width of the strobe light source is adjusted, and the shooting frequency of the high-speed image acquisition device is adjusted simultaneously to re-acquire the image of the bottle and obtain a clear image of the bottle in a relatively static state.

9. The real-time label printing method for bottles as described in claim 7, characterized in that, The step of identifying structural features of key areas of the bottle in the clear image and determining the type of bottle based on the structural features includes: Perform contour recognition on the clear image to obtain the basic contour of the bottle; Based on the basic outline, mark the image regions corresponding to the key areas of the bottle in the clear image; The image region is locally enhanced to obtain the structural features of the key areas of the bottle; The structural features are compared and matched with standard features in the database, and the type of bottle is determined based on the comparison and matching results.

10. A real-time bottle label printing system based on image recognition, characterized in that, The real-time printing system includes: Image acquisition and analysis module: Acquires image datasets of bottles to be labeled within the pre-identification area, performs image depth analysis on the image dataset using the YOLO model, and obtains the type and quantity of bottles to be labeled. Label instruction generation and storage module: Based on the type and quantity information of the bottles in the batch, it generates label printing instructions in batches and stores the label printing instructions in the label information database according to the bottle type; Based on the image dataset, the system processes and identifies the type and quantity information of the bottles in the batch, generates label printing instructions for the corresponding batch of bottles to be labeled in the system, and achieves dynamic filling and serialization of data in conjunction with the real-time detection process, generating a unique serial number for each bottle. In the label information database, an independent logical storage unit is established for each bottle type, and all printing instructions belonging to that type are stored in the corresponding logical storage unit in an orderly manner; Bottle recognition and instruction retrieval module: When a single bottle arrives at the labeling station, the module quickly identifies the bottle, confirms the type of the bottle, and retrieves the matching label printing instruction from the label information database based on the confirmed type information to drive the printer to print the label; Labeling module: Affixes real-time printed labels to the labeling locations on individual bottles.