Cigarette box image recognition method and device and electronic equipment

By introducing cigarette box material parameters during the data enhancement process, the cigarette box image is generated based on the relative position of the observation point and the cigarette box and the optical properties of the cigarette box material, the problem of difficulty in simulating the special material and variable appearance of the cigarette box is solved, and the image generation with higher quality and accuracy is achieved.

CN120219886APending Publication Date: 2025-06-27SHANDONG INSPUR DIGITAL BUSINESS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510384378.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Traditional data enhancement methods are difficult to accurately simulate the special materials and variable appearance of cigarette packaging boxes, resulting in insufficient clarity and poor simulation of real scenes when taking pictures or HD cigarette screenshots at the cigarette counter.

Method used

In the data enhancement process, the cigarette box material parameters are introduced, and a more realistic cigarette box image is generated based on the relative position of the observation point and the cigarette box and the optical properties of the cigarette box material.

Benefits of technology

It significantly improves the effect and accuracy of image generation, overcomes the limitations of traditional data enhancement technology when processing special materials, and improves image clarity and color accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219886A_ABST
    Figure CN120219886A_ABST
Patent Text Reader

Abstract

The invention provides a cigarette box image recognition method and device and electronic equipment, and belongs to the technical field of image recognition. The cigarette box image recognition method comprises the following steps: adding cigarette box material parameters into a data enhancement function in a cigarette box image recognition model; obtaining a cigarette box picture observed based on at least two angles and two distances, and defining a coordinate value of a preset observation point relative to the cigarette box; establishing a mapping relation between the coordinate values and preset point locations on the cigarette box, and defining RGB reflection coefficient vectors [rhoR, rhoG, rhoB] corresponding to the preset point locations on the cigarette box picture based on cigarette box material parameters; and generating a cigarette box image based on the RGB reflection coefficient vector [rhoR, rhoG, rhoB]. Cigarette box material parameters are introduced in the data enhancement process, and a more real cigarette box image is generated based on the relative position of the observation point and the cigarette box and the optical property of the cigarette box material, so that the image generation effect and accuracy are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of image recognition, and particularly relates to a method, device, and electronic device for cigarette box image recognition. Background Art

[0002] In the field of information technology, especially in image recognition technology, data augmentation technology is an important means to improve the effect of model training.

[0003] Traditional data augmentation methods mainly rely on geometric transformations (such as rotation, scaling, cropping, etc.) and color transformations to simulate photos taken under different angles, distances, and lighting conditions.

[0004] However, for the special materials and variable appearances of cigarette packaging boxes, these traditional augmentation methods are insufficient. The diversity of cigarette packaging materials leads to the possibility that data augmentation pictures generated by fixed color and brightness transformation rules may not accurately reflect the shooting effects in the actual environment. Especially when dealing with pictures taken at cigarette counters or high-definition cigarette screenshots, insufficient clarity and poor simulation of real scenes have become problems that need to be solved urgently. Summary of the Invention

[0005] To solve at least one aspect of the technical problems in the background art, this application provides a method for cigarette box image recognition. By introducing cigarette box material parameters during the data augmentation process and generating more realistic cigarette box images based on the relative position between the observation point and the cigarette box and the optical properties of the cigarette box material, the effect and accuracy of image generation are effectively improved.

[0006] The technical solution adopted by this application is as follows:

[0007] An embodiment of this application provides a method for cigarette box image recognition, including:

[0008] Adding cigarette box material parameters to the data augmentation function in the cigarette box image recognition model;

[0009] Obtaining cigarette box pictures observed from at least two angles and two distances, and defining the coordinate values of a preset observation point relative to the cigarette box;

[0010] Establishing a mapping relationship between the coordinate values and preset points on the cigarette box, and defining the RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette box picture based on the cigarette box material parameters;

[0011] Based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B, generate a cigarette case image.

[0012] According to the cigarette case image recognition method provided by the embodiments of the present application, first, the optical properties of the cigarette case material are added to the data augmentation function, so that the generated training samples are closer to the shooting effect in the actual environment. Then, by obtaining cigarette case pictures from at least two angles and two distances, and defining the coordinate values of the preset observation points relative to the cigarette case, an accurate three-dimensional space model is established. Based on this model and the RGB reflection coefficient vector [ρ R , ρ G , ρ B of the cigarette case material, the color performance of each preset point under different lighting conditions is calculated, so as to generate high-quality cigarette case images. This method not only overcomes the limitations of traditional data augmentation techniques in dealing with special materials, but also improves the image clarity and color accuracy, provides richer and more representative samples for subsequent model training, and greatly enhances the reliability and adaptability of model recognition.

[0013] According to an embodiment of the present application, adding the cigarette case material parameters to the data augmentation function in the cigarette case image recognition model specifically includes:

[0014] Construct an optical property database of the cigarette case material, and the optical property database includes at least reflectivity and light transmittance;

[0015] Based on the cigarette case pictures and corresponding material properties, use the data augmentation function to generate training samples.

[0016] According to an embodiment of the present application, obtaining the cigarette case pictures observed from at least two angles and two distances, and defining the coordinate values of the preset observation points relative to the cigarette case specifically includes:

[0017] Set a reference point on the cigarette case, and measure the horizontal distance, vertical distance and depth direction between the preset observation point and the reference point;

[0018] Set the coordinate of the reference point as (0, 0, 0), and set the position coordinate of the preset observation point as (x, y, z).

[0019] According to an embodiment of the present application, establishing the mapping relationship between the coordinate values and the preset points on the cigarette case, and defining the RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette case picture based on the cigarette case material parameters specifically includes:

[0020] Construct a three-dimensional space model based on the reference point and the preset observation point, and associate the optical property database of the cigarette case material with the three-dimensional space model;

[0021] Based on the position coordinates of the preset observation points and the associated optical property database of cigarette case materials, calculate the RGB reflection coefficient vectors under different lighting conditions in the three-dimensional space model

[0022] [ρ R , ρ G , ρ B .

[0023] According to an embodiment of the present application, based on the RGB reflection coefficient vectors [ρ R , ρ G , ρ B , generate a cigarette case image, specifically:

[0024] Based on the data in the three-dimensional space model, the position coordinates (x, y, z) of the preset observation points, and the associated optical property database of cigarette case materials, establish a lighting model;

[0025] Using the lighting model, calculate the RGB reflection coefficient vectors [ρ R , ρ G , ρ B on each preset observation point under different lighting conditions;

[0026] Based on the ray tracing or rasterization algorithm, generate an initial image of the cigarette case according to the three-dimensional space model and the calculated RGB reflection coefficient vectors.

[0027] According to an embodiment of the present application, based on the RGB reflection coefficient vectors [ρ R , ρ G , ρ B , generate a cigarette case image, further including:

[0028] Input the generated initial image into a data enhancement function containing cigarette case material parameters to adjust the contrast, brightness, and add noise to the initial image.

[0029] According to an embodiment of the present application, the method further includes:

[0030] Adopt a quality assessment algorithm to perform clarity analysis, color accuracy analysis, material expressiveness analysis, noise level detection, and integrity check on the cigarette case image.

[0031] An embodiment of the second aspect of the present application provides a cigarette case image recognition device, including:

[0032] A parameter setting module, adapted to add cigarette case material parameters to a data enhancement function in a cigarette case image recognition model;

[0033] A coordinate definition module, adapted to obtain a picture of a cigarette case observed based on at least two angles and two distances, and define the coordinate values of a preset observation point relative to the cigarette case;

[0034] A mapping parameter establishment module, adapted to establish a mapping relationship between the coordinate values and preset points on the cigarette case, and define an RGB reflection coefficient vector [ρ corresponding to the preset points on the picture of the cigarette case based on the cigarette case material parameters R , ρ G , ρ B ;

[0035] An image generation module, adapted to generate a cigarette case image based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B .

[0036] An embodiment of the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the cigarette case image recognition method in any embodiment of the first aspect as described above.

[0037] An embodiment of the fourth aspect of the present application provides a non-volatile computer storage medium, on which computer-executable instructions are stored. When the computer program is executed by a processor, it implements the cigarette case image recognition method in any embodiment of the first aspect as described above. Description of the Drawings

[0038] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:

[0039] Figure 1 is a schematic flowchart of the cigarette case image recognition method provided by the embodiment of the present application;

[0040] Figure 2 is a schematic structural diagram of the cigarette case image recognition device provided by the embodiment of the present application;

[0041] Figure 3 is a schematic structural diagram of the electronic device provided by the embodiment of the present application.

[0042] Reference Signs:

[0043] 110, parameter setting module; 120, coordinate definition module; 130, mapping parameter establishment module; 140, image generation module;

[0044] 810, processor; 820, communication interface; 830, memory; 840, communication bus. Detailed implementation manners

[0045] To more clearly illustrate the overall concept of the present application, the following will be described in detail by way of examples in combination with the accompanying drawings of the specification.

[0046] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application may be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited by the specific embodiments disclosed below. It should be noted that, without conflict, the embodiments of the present application and the features in each embodiment may be combined with each other.

[0047] In the present application, unless otherwise clearly defined and limited, the first feature being "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are indirectly in contact through an intermediate medium. In the description of this specification, the description of reference terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.

[0048] As Figure 1 shown, an embodiment of the first aspect of the present application provides a method for recognizing a cigarette case image, including:

[0049] Step 100: Add cigarette case material parameters to the data augmentation function in the cigarette case image recognition model.

[0050] Step 200: Obtain cigarette case pictures observed from at least two angles and two distances, and define the coordinate values of a preset observation point relative to the cigarette case.

[0051] Step 300: Establish a mapping relationship between the coordinate values and preset points on the cigarette case, and define an RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette case picture based on the cigarette case material parameters.

[0052] Step 400: Generate a cigarette case image based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B .

[0053] In step 100, first, a database containing the optical properties of cigarette box materials is constructed. These properties include, but are not limited to, reflectivity and light transmittance, etc. Then, these material characteristics are added as parameters to the data augmentation function for cigarette box image recognition. In this way, the appearance changes of cigarette boxes under different lighting conditions in the real world can be more accurately simulated. This not only increases the diversity of the dataset but also enables the trained model to better handle image recognition tasks in various complex environments.

[0054] It can make up for the limitations brought by traditional data augmentation methods that only rely on geometric transformations (such as rotation, scaling) and color transformations. Specifically, due to the various optical properties of cigarette packaging materials, it is difficult for traditional enhancement means to accurately reproduce the visual effects of these materials in actual usage scenarios. By introducing material parameters, this method can significantly improve the realism of the generated images, thereby enhancing the accuracy and robustness of the subsequent image recognition model.

[0055] In step 200, it involves obtaining images of cigarette boxes from multiple perspectives and distances and recording the coordinate values of each observation point relative to the reference point on the cigarette box. For example, a specific position on the cigarette box can be set as the reference point, and then the distances in the horizontal, vertical, and depth directions from each preset observation point to this reference point are measured. This method helps to establish a multi-dimensional spatial model and provides accurate position information for subsequent processing.

[0056] By obtaining image data from multiple angles and distances, not only can the content of the dataset be enriched, but it also helps the recognition system understand the distribution of cigarette boxes in space and the different appearance characteristics presented as the observation angle changes. This is crucial for improving the accuracy of the image recognition algorithm because it allows the system to still make correct judgments when faced with images generated under different shooting conditions.

[0057] In step 300, first, a model is constructed in three-dimensional space based on the known coordinates of the observation points and the reference point of the cigarette box, and the optical property database of the cigarette box material is associated with this model. Next, using this three-dimensional model and the associated material optical property database, the RGB reflection coefficient vectors [ρ R , ρ G , ρ B at each preset point under different lighting conditions are calculated. This step is the key to achieving high-precision image generation.

[0058] By precisely calculating the RGB reflection coefficients of each preset point under different lighting conditions, it is possible to ensure that the generated cigarette box images are highly realistic. Especially when dealing with the surface of cigarette boxes with complex textures or special reflective properties, this method can effectively capture their subtle color and brightness changes, thus significantly improving the quality of the final images. In addition, this also provides more reliable basic data for subsequent image analysis.

[0059] In step 400, based on the three-dimensional space model, the preset observation point position coordinates, and the optical properties of the cigarette box material obtained in the previous steps, a lighting model is established. In this model, ray tracing or rasterization algorithms are used to generate the initial cigarette box images according to the calculated RGB reflection coefficient vectors. Subsequently, these initial images can be further processed, such as contrast adjustment, brightness regulation, and noise addition, to achieve a more realistic effect.

[0060] A key advantage of this process is that it can generate high-quality and diverse image samples, which not only consider the actual situation of the physical world but also incorporate artificial design data augmentation strategies. Such images are not only suitable for training efficient image recognition models but also can simulate the complexity of the real world to a certain extent. Therefore, this method can not only improve the effect of model training but also enhance its expressiveness and adaptability in practical applications.

[0061] According to the cigarette box image recognition method provided by the embodiments of the present application, first, the optical properties of the cigarette box material are added to the data augmentation function, making the generated training samples closer to the shooting effect in the actual environment. Then, by obtaining cigarette box pictures from at least two angles and two distances and defining the coordinate values of the preset observation point relative to the cigarette box, an accurate three-dimensional space model is established. Based on this model and the RGB reflection coefficient vector [ρ R , ρ G , ρ B of the cigarette box material, the color performance of each preset point under different lighting conditions is calculated, thereby generating high-quality cigarette box images. This method not only overcomes the limitations of traditional data augmentation techniques in dealing with special materials but also improves the image clarity and color accuracy, providing richer and more representative samples for subsequent model training and greatly enhancing the reliability and adaptability of model recognition.

[0062] In some embodiments of the present application, adding the cigarette box material parameters to the data augmentation function in the cigarette box image recognition model specifically includes:

[0063] Construct an optical property database of the cigarette box material, and the optical property database includes at least reflectivity and light transmittance;

[0064] Generate training samples using data augmentation functions based on cigarette box pictures and corresponding material properties.

[0065] Specifically, in the process of adding cigarette box material parameters to the data augmentation function of the cigarette box image recognition model, it is first necessary to construct an optical property database of cigarette box materials. This database should at least contain key optical properties such as the reflectivity and light transmittance of each cigarette box material. Reflectivity describes the ability of the material surface to reflect light, while light transmittance measures the degree to which light penetrates the material. These data are crucial for simulating the true appearance of cigarette boxes under different lighting conditions.

[0066] Based on the established optical property database of cigarette box materials, data augmentation processing is then carried out using the cigarette box pictures and their corresponding material properties. Specifically, it is to combine the actually captured cigarette box pictures with the specific material properties corresponding to the pictures (such as the reflectivity and light transmittance obtained from the database), and generate new training samples through the data augmentation function. This process allows for simulating the appearance effects of cigarette boxes under various lighting conditions, observation angles, and distances while maintaining the characteristics of the original image. This not only enriches the content of the training dataset but also improves the model's adaptability to diverse environmental changes in reality, thereby enhancing the accuracy and reliability of the final image recognition system.

[0067] In some embodiments of the present application, obtain cigarette box pictures observed from at least two angles and two distances, and define the coordinate values of a preset observation point relative to the cigarette box. Specifically:

[0068] Set a reference point on the cigarette box, and measure the horizontal distance, vertical distance, and depth direction between the preset observation point and the reference point;

[0069] Set the coordinate of the reference point as (0, 0, 0), and set the position coordinate of the preset observation point as (x, y, z).

[0070] Specifically, when obtaining cigarette box pictures observed from at least two angles and two distances and defining the coordinate values of a preset observation point relative to the cigarette box, it is first necessary to select a reference point on the cigarette box as the reference origin. This reference point can be any easily recognizable and fixed point on the cigarette box, such as a corner of the box or the position of a specific mark. Then, measure the horizontal distance, vertical distance, and the distance in the depth direction from the preset observation point to this reference point. In this way, the spatial position of the observation point relative to the cigarette box can be accurately determined.

[0071] Next, set the coordinates of the selected reference point as the origin (0, 0, 0) in three-dimensional space, and the position of the preset observation point is determined according to its actual measurement results relative to the reference point, expressed in the form of (x, y, z) coordinates. For example, if the preset observation point is 30 cm directly above, 20 cm to the right, and 10 cm in front of the reference point, its coordinates will be (20, 30, 10). This approach helps to establish an accurate three-dimensional space model, enabling the exact positional relationship between each observation point and the cigarette carton to be clarified. This step is crucial for generating high-quality cigarette carton images in subsequent steps, as it ensures that the images observed from different perspectives and distances can truly reflect the actual appearance of the cigarette carton, thereby improving the accuracy of image recognition.

[0072] In some embodiments of the present application, a mapping relationship is established between the coordinate values and the preset points on the cigarette carton, and the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B corresponding to the preset points on the cigarette carton picture is defined based on the cigarette carton material parameters. Specifically:

[0073] Construct a three-dimensional space model based on the reference point and the preset observation point, and associate the cigarette carton material optical property database with the three-dimensional space model;

[0074] Based on the position coordinates of the preset observation point and the associated cigarette carton material optical property database, calculate the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B under different lighting conditions in the three-dimensional space model.

[0075] Specifically, when establishing the mapping relationship between the coordinate values and the preset points on the cigarette carton, and defining the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B on the cigarette carton picture based on the cigarette carton material parameters, first, a three-dimensional space model needs to be constructed based on the set reference point and preset observation point. This model not only contains the specific shape and size information of the cigarette carton but also integrates the optical properties of each material under different lighting conditions, such as reflectivity and light transmittance, by associating the cigarette carton material optical property database.

[0076] Next, in this three-dimensional space model, using the position coordinates (x, y, z) of the preset observation point and the associated cigarette carton material optical property database, calculate the RGB reflection coefficient vector [ρ R ,ρ G ,ρ BThis means that according to different observation angles and light source positions, the color performance of each point on the cigarette box surface can be simulated. For example, a certain point may show a strong reflection effect under direct light, while it may present a softer tone in a diffused light environment. By this method, the appearance changes of the cigarette box under different lighting conditions can be accurately captured, thus generating more realistic and detailed images. This step greatly improves the realism and accuracy of the generated images, providing high-quality data support for subsequent image recognition.

[0077] In some embodiments of the present application, based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B , a cigarette box image is generated, specifically as follows:

[0078] Based on the three-dimensional space model, the preset observation point position coordinates (x, y, z), and the data in the associated optical property database of the cigarette box material, a lighting model is established;

[0079] Using the lighting model, calculate the RGB reflection coefficient vector [ρ R , ρ G , ρ B at each preset observation point under different lighting conditions;

[0080] Based on ray tracing or rasterization algorithms, generate an initial image of the cigarette box according to the three-dimensional space model and the calculated RGB reflection coefficient vector.

[0081] Specifically, the process of generating a cigarette box image based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B includes several key steps. First is to establish a lighting model. This step depends on the three-dimensional space model, the position coordinates (x, y, z) of the preset observation point, and the data in the associated optical property database of the cigarette box material. Through this information, an accurate lighting model can be constructed, which can simulate the light behavior under different lighting conditions, including the direction, intensity, and color of light, etc.

[0082] Next, based on the established lighting model, calculate the RGB reflection coefficient vector [ρ R , ρ G , ρ B at each preset observation point. This process takes into account the effects of different lighting conditions, such as direct light, diffused light, or ambient light, on the cigarette box surface. In this way, the color performance of each point on the cigarette box surface under various lighting conditions can be obtained, ensuring that the generated image can accurately reflect the actual visual effect in detail.

[0083] Finally, using ray tracing or rasterization algorithms, an initial image of the cigarette box is generated based on the three-dimensional space model and the calculated RGB reflection coefficient vector. Ray tracing is a technique that simulates how light interacts with the surface of objects. It can produce high-quality, realistic images, especially suitable for handling situations with complex materials and lighting conditions. The rasterization algorithm, on the other hand, focuses more on converting three-dimensional geometric shapes into two-dimensional images and is commonly used in real-time rendering. Through one (or a combination) of these two techniques, a high-quality initial image of the cigarette box can be generated based on all the above information. This method not only improves the realism and accuracy of the image but also provides a solid foundation for subsequent quality assessment and further data enhancement.

[0084] In some embodiments of the present application, based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B , generating an image of the cigarette box further includes:

[0085] Inputting the generated initial image into a data enhancement function containing cigarette box material parameters to perform contrast adjustment, brightness adjustment, and noise addition on the initial image.

[0086] Specifically, after generating the initial image of the cigarette box based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B , in order to further enhance the realism and diversity of the image, the generated initial image can also be input into a data enhancement function containing cigarette box material parameters for a series of adjustments. This process not only includes contrast adjustment and brightness adjustment but also involves operations such as noise addition.

[0087] First, contrast adjustment can enhance the difference between the brightest and darkest parts of the image, making the details in the image more prominent. This is particularly important for identifying cigarette boxes with complex patterns or color gradients. By precisely controlling the contrast, the image can be made closer to the actual shooting effect, thereby improving the effect of model training.

[0088] Second, brightness adjustment is used to simulate the visual effects under different lighting conditions. Different lighting intensities will significantly affect the color performance of the object surface. Appropriate brightness adjustment can make the generated image appear natural and realistic under various lighting conditions. This is crucial for ensuring that the image recognition model can still maintain a high accuracy rate in a changing real environment.

[0089] Finally, adding noise mimics various interference factors that may occur during camera shooting in the real world, such as sensor noise or ambient light noise. By adding an appropriate amount of noise to the image, the diversity and complexity of the dataset can be increased, helping to train a more robust image recognition model that can still make correct identifications when faced with real images of varying quality.

[0090] In summary, through a series of processes such as contrast adjustment, brightness adjustment, and noise addition to the generated initial images, not only can the realism and richness of the images be significantly improved, but also higher-quality and more representative sample data can be provided for subsequent model training, thereby enhancing the performance and reliability of the entire cigarette box image recognition system.

[0091] In some embodiments of the present application, the method further includes:

[0092] Using a quality assessment algorithm to perform clarity analysis, color accuracy analysis, material expressiveness analysis, noise level detection, and integrity check on the cigarette box image.

[0093] Specifically, using a quality assessment algorithm to perform multi-faceted analysis on the cigarette box image, including clarity, color accuracy, material expressiveness, noise level, and integrity check. This comprehensive quality assessment helps to ensure that the generated images are as close to the real situation as possible in terms of visual and physical characteristics. Clarity analysis ensures the sharpness of image details, enabling even the most subtle brand logos or packaging designs to be accurately recognized; color accuracy analysis ensures that the colors in the image are reproduced accurately, which is particularly important for identifying cigarette brands with specific color schemes. In addition, material expressiveness analysis can verify whether the image has successfully captured the optical properties of the actual material, such as reflectivity and light transmittance, thereby enhancing the model's understanding of different materials.

[0094] This comprehensive quality assessment not only improves the training efficiency and accuracy of the cigarette box image recognition model, but also enhances the stability and reliability of the model in practical applications. By strictly detecting the noise level and integrity of each generated image, the negative impact of low-quality samples on model training can be effectively excluded, ensuring the high purity of the training dataset. This provides a solid foundation for subsequent image recognition tasks, especially in the case of dealing with complex backgrounds or changing lighting conditions, and still maintains a high recognition accuracy. Ultimately, this method promotes the development of more intelligent and efficient cigarette product management and market monitoring solutions, helping to improve the digital management level of the entire industry.

[0095] As Figure 2 shown, an embodiment of the second aspect of the present application provides a cigarette box image recognition device, including:

[0096] A parameter setting module 110, adapted to add cigarette case material parameters to a data augmentation function in a cigarette case image recognition model;

[0097] A coordinate definition module 120, adapted to obtain a cigarette case picture observed based on at least two angles and two distances, and define coordinate values of a preset observation point relative to the cigarette case;

[0098] A mapping parameter establishment module 130, adapted to establish a mapping relationship between the coordinate values and preset points on the cigarette case, and define an RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette case picture based on the cigarette case material parameters;

[0099] An image generation module 140, adapted to generate a cigarette case image based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B ;

[0100] The cigarette case image recognition device provided by the second aspect embodiment of the present application can implement the cigarette case image recognition method in any of the above first aspect embodiments, so any technical effect in the above cigarette case image recognition method can be achieved, which will not be elaborated here.

[0101] The third aspect embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the cigarette case image recognition method in any of the above first aspect embodiments.

[0102] Figure 3 Schematically shows a physical structure diagram of an electronic device, as Figure 3 shown. The electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute the cigarette case image recognition method in any of the above first aspect embodiments, and the method includes:

[0103] Step 100: Add cigarette case material parameters to a data augmentation function in a cigarette case image recognition model.

[0104] Step 200: Obtain a cigarette case picture observed based on at least two angles and two distances, and define coordinate values of a preset observation point relative to the cigarette case.

[0105] Step 300: Establish a mapping relationship between coordinate values and preset points on the cigarette box, and define an RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette box picture based on the cigarette box material parameters.

[0106] Step 400: Generate a cigarette box image based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B .

[0107] In addition, when the logical instructions in the above-mentioned memory 830 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0108] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the cigarette box image recognition method provided by the above-mentioned various methods. The method includes:

[0109] Step 100: Add cigarette box material parameters to the data augmentation function in the cigarette box image recognition model.

[0110] Step 200: Obtain cigarette box pictures observed from at least two angles and two distances, and define the coordinate values of the preset observation points relative to the cigarette box.

[0111] Step 300: Establish a mapping relationship between coordinate values and preset points on the cigarette box, and define an RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette box picture based on the cigarette box material parameters.

[0112] Step 400: Based on the RGB reflection coefficient vector [ρR , ρ G , ρ B , generate a cigarette case image.

[0113] On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes the cigarette case image recognition method provided by the above-mentioned various methods. The method includes:

[0114] Step 100: Add cigarette case material parameters to the data augmentation function in the cigarette case image recognition model.

[0115] Step 200: Obtain cigarette case pictures observed based on at least two angles and two distances, and define the coordinate values of a preset observation point relative to the cigarette case.

[0116] Step 300: Establish a mapping relationship between the coordinate values and preset points on the cigarette case, and define the RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette case picture based on the cigarette case material parameters.

[0117] Step 400: Generate a cigarette case image based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B .

[0118] Finally, the present invention also provides a non-volatile computer storage medium, on which computer-executable instructions are stored. When the computer program is executed by a processor, it realizes the cigarette case image recognition method provided by the above-mentioned various methods. The method includes:

[0119] Step 100: Add cigarette case material parameters to the data augmentation function in the cigarette case image recognition model.

[0120] Step 200: Obtain cigarette case pictures observed based on at least two angles and two distances, and define the coordinate values of a preset observation point relative to the cigarette case.

[0121] Step 300: Establish a mapping relationship between the coordinate values and preset points on the cigarette case, and define the RGB reflection coefficient vector [ρ R , ρ G , ρ B corresponding to the preset points on the cigarette case picture based on the cigarette case material parameters.

[0122] Step 400: Generate a cigarette case image based on the RGB reflection coefficient vector [ρ R , ρ G , ρ B .

[0123] What is not described in this application can be realized by adopting or referring to the prior art.

[0124] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments.

[0125] The above description is only for the embodiments of this application and is not intended to limit this application. For those skilled in the art, various changes and modifications can be made to this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. A cigarette box image recognition method, characterized in that: include: Add cigarette box material parameters to the data augmentation function in the cigarette box image recognition model; Obtaining a cigarette box image observed based on at least two angles and two distances, and defining coordinate values ​​of a preset observation point relative to the cigarette box; Establish a mapping relationship between the coordinate value and the preset point on the cigarette box, and define the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ]; Based on the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ], generating cigarette box images.

2. The cigarette box image recognition method according to claim 1, characterized in that: The data enhancement function of adding cigarette box material parameters to the cigarette box image recognition model is specifically: Constructing a database of optical properties of cigarette box materials, wherein the database of optical properties at least includes reflectivity and light transmittance; Based on the cigarette box images and the corresponding material properties, a data augmentation function is used to generate training samples.

3. The cigarette box image recognition method according to claim 2, characterized in that: The step of obtaining a cigarette box image observed based on at least two angles and two distances and defining the coordinate values ​​of a preset observation point relative to the cigarette box is specifically: Setting a reference point on the cigarette box, and measuring the horizontal distance, vertical distance and depth direction between the preset observation point and the reference point; The coordinates of the reference point are set to (0, 0, 0), and the position coordinates of the preset observation point are set to (x, y, z).

4. The cigarette box image recognition method according to claim 3, characterized in that: The mapping relationship between the coordinate value and the preset point on the cigarette box is established, and the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ], specifically: Constructing a three-dimensional space model based on the reference point and the preset observation point, and associating the cigarette box material optical property database with the three-dimensional space model; Based on the position coordinates of the preset observation points and the associated database of optical properties of cigarette box materials, the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ].

5. The cigarette box image recognition method according to claim 4, characterized in that: The RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ], generate cigarette box images, specifically: Establishing an illumination model based on the three-dimensional spatial model, the preset observation point position coordinates (x, y, z) and the data in the associated cigarette box material optical property database; Using the illumination model, the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ]; Based on a ray tracing or rasterization algorithm, an initial image of the cigarette box is generated according to the three-dimensional space model and the calculated RGB reflection coefficient vector.

6. The cigarette box image recognition method according to claim 5, characterized in that: The RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ], generating cigarette box images, and also includes: The generated initial image is input into a data enhancement function including cigarette box material parameters, and contrast adjustment, brightness adjustment and noise addition are performed on the initial image.

7. The cigarette box image recognition method according to any one of claims 1 to 6, characterized in that: The method also includes: A quality assessment algorithm is used to perform clarity analysis, color accuracy analysis, material expression analysis, noise level detection and integrity check on the cigarette box image.

8. A cigarette box image recognition device, characterized in that: include: A parameter setting module, adapted to add cigarette box material parameters to a data enhancement function in a cigarette box image recognition model; A coordinate definition module, adapted to obtain a cigarette box image observed based on at least two angles and two distances, and define a coordinate value of a preset observation point relative to the cigarette box; A mapping parameter establishment module is adapted to establish a mapping relationship between the coordinate value and a preset point on the cigarette box, and define an RGB reflection coefficient vector [ρ] corresponding to the preset point on the cigarette box image based on the cigarette box material parameter. R ,ρ G ,ρ B ]; An image generation module is adapted to generate an image based on the RGB reflection coefficient vector [ρ R ,ρ G ,ρ B ], generating cigarette box images.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the cigarette box image recognition method according to any one of claims 1 to 7 is implemented.

10. A non-volatile computer storage medium having computer executable instructions stored thereon, characterized in that: When the computer program is executed by a processor, the cigarette box image recognition method according to any one of claims 1 to 7 is implemented.