Target object identification and replacement method and system for advertisement exhibition image

By performing image segmentation and difference measurement marking on advertising exhibition images, combining clustering and expansion expansion technology, the problem of indistinguishability between targets and backgrounds in complex backgrounds is solved, and high-accurate target recognition and segmentation is achieved.

CN119693697AActive Publication Date: 2025-03-25SHENZHEN SHENLAN CREATIVE MANAGEMENT CO LTD

Patent Information

Application Number
CN202411756657.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-25
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In complex backgrounds, the target object may be masked by the texture, color, or pattern of the background, making the target in the image in indistinguishable from the background.

Method used

By segmenting the advertising exhibition images, identifying the foreground target data and background data, calculating the pixel difference metric between the pixel value and the preset background model, marking the difference pixel points, and removing the pseudoforeground area through clustering and expansion expansion techniques.

Benefits of technology

It effectively reduces interference between the target and the background, improves the accuracy of target recognition, and can accurately locate the foreground target area in complex backgrounds, avoiding background interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693697A_ABST
    Figure CN119693697A_ABST
Patent Text Reader

Abstract

The invention provides a target object identification and replacement method and system for an advertisement exhibition image, and is applied to the field of image data processing. According to the method, the advertisement image is divided into the foreground target area and the background area, interference between the target and the background is effectively reduced, the target area and the background area can be independently extracted especially in a complex background, and therefore the accuracy of follow-up target recognition is improved, and the user experience is improved. And meanwhile, which areas belong to the foreground target and which areas belong to the background can be accurately judged by calculating the difference between the pixel value of the current image frame and the preset background model, and the foreground target area in the image can be accurately positioned by marking difference pixel points in the area information, so that the accuracy of the foreground target area is improved. Therefore, interference of a complex background on the target area can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image data processing, and in particular to a method and system for identifying and replacing target objects in advertising exhibition images. Background Art

[0002] In today's society, the advertising industry is booming, and billboards of all sizes can be seen everywhere. Advertising is a means of propaganda that uses certain forms of media to openly and widely convey information to the public for a specific need. Setting up billboards in public places with a large flow of people is a common form of propaganda.

[0003] The target objects in advertising exhibitions often appear in very complex backgrounds. The dynamic elements, cluttered objects, changing lighting, etc. in the background will interfere with the recognition of the target objects. The complexity of the background increases the difficulty of target recognition, making the target objects seem to blend in with the background. In some scenes, the background itself may even contain other target information. Summary of the invention

[0004] The present invention aims to solve the problem that in a complex background, a target object may be masked by the texture, color or pattern of the background, making it difficult to distinguish the target from the background in the image, and to provide a method and system for identifying and replacing a target object in an advertising exhibition image.

[0005] The present invention adopts the following technical means to solve the technical problem:

[0006] The present invention provides a method for identifying and replacing a target object of an advertisement exhibition image, comprising:

[0007] Based on the pre-uploaded advertising exhibition image, identifying corresponding image data from the advertising exhibition image, wherein the image data specifically includes foreground target data and background data;

[0008] Determining whether a preset color overlap is detected in the image data;

[0009] If yes, the advertisement exhibition image is segmented, the corresponding region information is divided in the image data, the pixel difference metric between the pixel value of the current image frame and the preset background model is calculated from the region information, and the difference pixel points of the region information are marked according to the pixel difference metric, wherein the region information specifically includes the target region and the background region;

[0010] Determining whether the area information of the difference pixels can be matched continuously;

[0011] If not, the difference pixels are clustered into connected areas, non-adjacent isolated pixels are detected in the connected areas, and based on the isolated pixels, the pseudo foreground areas in the connected areas are identified, and the areas to be filtered whose area values ​​in the pseudo foreground areas are less than a preset number of pixels are removed.

[0012] Furthermore, before the step of segmenting the advertisement exhibition image and dividing the corresponding area information in the image data, the step further includes:

[0013] Applying a preset convolutional neural network to extract hierarchical features of the advertising exhibition image, and generating corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color;

[0014] Determine whether the candidate area matches a preset area category, wherein the area category specifically includes a category label and a position of the target;

[0015] If so, a segmentation mask corresponding to the candidate area is constructed through a preset mask branch, the segmentation mask is aligned with the preset target bounding box of the advertising exhibition image, and the target bounding box is combined with the segmentation mask. According to the alignment result and the combination result, the pixel-level segmentation of each target object in the advertising exhibition image is divided.

[0016] Furthermore, the step of marking the difference pixels of the region information according to the pixel difference metric further includes:

[0017] Based on the preset dynamic characteristics of the advertising exhibition image, constructing a difference threshold of the pixel difference measurement;

[0018] Determining whether the pixel difference metric exceeds the preset pixel difference threshold;

[0019] If so, then based on the pixel difference metric, each pixel that is significantly different from the background is marked, and the pixel points are classified into foreground pixels and background pixels. By applying a preset weighted average to the foreground pixels and the background pixels, the current image change of the advertising exhibition image is dynamically updated.

[0020] Furthermore, the step of clustering the difference pixels into connected areas and detecting non-adjacent isolated pixels in the connected areas further includes:

[0021] Based on the preset domain relationship of the difference pixel points, performing domain detection on the pixels in the connected area to verify the connection relationship of the pixels, wherein the domain relationship specifically includes horizontal, vertical and diagonal adjacency;

[0022] Determining whether the connection relationship conforms to the domain relationship;

[0023] If so, a preset structural element is applied to expand the pixel to obtain a foreground pixel overlapping with the pixel, and the foreground area of ​​the advertising exhibition image is dynamically updated according to the foreground pixel, wherein the structural element specifically includes a square, a circle and a cross.

[0024] Furthermore, the step of determining whether a preset color overlap is detected in the image data further includes:

[0025] Extracting color features of each pixel from the image data, comparing the color features with a preset target color range, and calculating the color overlap of each pixel;

[0026] Determining whether the color overlap reaches a preset threshold;

[0027] If so, the foreground pixels corresponding to the color overlap are identified, and based on the foreground pixels, the corresponding foreground areas are marked from the image data.

[0028] Furthermore, the step of determining whether the area information of the difference pixels can be matched continuously further includes:

[0029] Calculating the mean and variance of the difference pixel points based on the pre-divided local area of ​​the advertising exhibition image;

[0030] Determining whether the mean and the variance detect a preset fluctuation;

[0031] If so, the corresponding noise features are identified from the difference pixels, the difference threshold is dynamically adjusted according to the noise features, and the falsely detected noise areas are removed according to the difference threshold, wherein the noise features specifically include Gaussian noise, salt and pepper noise, and speckle noise.

[0032] Furthermore, the step of identifying corresponding image data from the pre-uploaded advertisement exhibition image further includes:

[0033] Applying a preset target detection algorithm to identify target object categories in the advertising exhibition image, wherein the target object categories specifically include products, texts, and brand logos;

[0034] Determining whether the target object category has preset advertising elements, wherein the advertising elements specifically include pattern, background and texture features;

[0035] If so, based on the advertising elements, the target object category is matched to a preset advertising theme, and the advertising exhibition image is divided into corresponding advertising categories according to the advertising theme, wherein the advertising theme specifically includes a company logo, brand logo and product icon, and the advertising category specifically includes product advertising, promotional advertising and brand advertising.

[0036] The present invention also provides a target object recognition and replacement system for advertising exhibition images, comprising:

[0037] A recognition module, used to recognize corresponding image data from the pre-uploaded advertising exhibition image, wherein the image data specifically includes foreground target data and background data;

[0038] A determination module, used for determining whether a preset color overlap is detected in the image data;

[0039] an execution module, configured to, if yes, perform image segmentation on the advertisement exhibition image, divide corresponding region information in the image data, calculate a pixel difference metric between a pixel value of a current image frame and a preset background model from the region information, and mark the difference pixel points of the region information according to the pixel difference metric, wherein the region information specifically includes a target region and a background region;

[0040] A second judgment module is used to judge whether the area information of the difference pixels can be matched continuously;

[0041] The second execution module is used to cluster the difference pixels into connected areas if not possible, detect non-adjacent isolated pixels in the connected areas, identify the pseudo foreground areas in the connected areas based on the isolated pixels, and remove the areas to be filtered in the pseudo foreground areas whose area values ​​are less than a preset number of pixels.

[0042] Furthermore, it also includes:

[0043] An extraction module, used for applying a preset convolutional neural network to extract hierarchical features of the advertising exhibition image, and generating corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color;

[0044] A third judgment module is used to judge whether the candidate area matches a preset area category, wherein the area category specifically includes a category label and a position of the target;

[0045] The third execution module is used to, if yes, construct a segmentation mask corresponding to the candidate area through a preset mask branch, align the segmentation mask with the preset target bounding box of the advertising exhibition image, and combine the target bounding box with the segmentation mask, and divide the pixel-level segmentation of each target object in the advertising exhibition image according to the alignment result and the combination result.

[0046] Furthermore, the execution module also includes:

[0047] A construction unit, configured to construct a difference threshold of the pixel difference metric based on a preset feature dynamic of the advertising exhibition image;

[0048] A judging unit, configured to judge whether the pixel difference metric exceeds the preset pixel difference threshold;

[0049] The execution unit is used to, if so, mark each pixel point that is significantly different from the background according to the pixel difference metric, classify the pixel points into foreground pixels and background pixels, and dynamically update the current image change of the advertising exhibition image by applying a preset weighted average to the foreground pixels and the background pixels.

[0050] The present invention provides a method and system for identifying and replacing target objects in advertising exhibition images, which has the following beneficial effects:

[0051] The present invention divides the advertisement image into a foreground target area and a background area by performing image segmentation on the advertisement image, thereby effectively reducing the interference between the target and the background. In particular, in a complex background, the target area and the background area can be extracted separately, thereby improving the accuracy of subsequent target recognition. At the same time, by calculating the difference measure between the pixel value of the current image frame and the preset background model, it is possible to accurately determine which areas belong to the foreground target and which areas belong to the background. Moreover, by marking the difference pixel points in the area information, the foreground target area in the image can be accurately located, thereby avoiding the interference of the complex background on the target area. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A schematic flow chart of an embodiment of a method for identifying and replacing a target object in an advertisement exhibition image according to the present invention;

[0053] Figure 2 It is a structural block diagram of an embodiment of a target object recognition and replacement system for advertising exhibition images of the present invention. DETAILED DESCRIPTION

[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The implementation of the objectives, functional features and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Reference Figure 1 , a target object recognition and replacement method for an advertisement exhibition image in an embodiment of the present invention, comprising:

[0057] S1: Based on the pre-uploaded advertising exhibition image, identifying corresponding image data from the advertising exhibition image, wherein the image data specifically includes foreground target data and background data;

[0058] S2: Determine whether a preset color overlap is detected in the image data;

[0059] S3: If yes, perform image segmentation on the advertisement exhibition image, divide corresponding region information in the image data, calculate the pixel difference metric between the pixel value of the current image frame and the preset background model from the region information, and mark the difference pixel points of the region information according to the pixel difference metric, wherein the region information specifically includes the target region and the background region;

[0060] S4: Determine whether the area information of the difference pixel points can be matched continuously;

[0061] S5: If not, cluster the difference pixels into connected areas, detect non-adjacent isolated pixels in the connected areas, identify the pseudo foreground areas in the connected areas based on the isolated pixels, and remove the areas to be filtered whose area values ​​in the pseudo foreground areas are less than a preset number of pixels.

[0062] In this embodiment, the system identifies corresponding image data from the advertising exhibition image based on the pre-uploaded advertising exhibition image, and the image data specifically includes foreground target data and background data. Then the system determines whether the image data detects a preset color overlap to execute the corresponding steps; for example, when the system determines that the preset color overlap is not detected in the image data, the system will believe that there is no significant similarity in the color distribution between the foreground target and the background in the image, and the target and the background can be clearly distinguished. The system will directly perform target recognition and target area extraction without complex color overlap processing, and can rely more on other features for target extraction. Such as shape, structure and position, through image segmentation, edge detection, morphological operations, etc., further optimize the extraction and classification of targets, and can use simple threshold segmentation, region growing or connected domain detection methods to directly extract foreground target areas from images without using complex color matching or overlap detection technology, and can quickly identify and separate target areas, and perform further target analysis or feature extraction; for example, when the system determines that a preset color overlap is detected in the image data, the system will consider that there is a significant similarity in the color distribution between the foreground target and the background in the image, and the system will perform image segmentation on the advertising exhibition image, divide the corresponding area information in the image data, and the area information has The system includes the target area and the background area. The pixel difference measurement between the pixel value of the current image frame and the preset background model is calculated from the regional information. According to different pixel difference measurements, the difference pixel points of the regional information are marked. The system can further quantify the difference between the target and the background by calculating the difference measurement between each pixel value in the image data and the preset background model. This process helps to identify the target and the background. Although there is overlap in color, by measuring the difference, the system can more accurately distinguish the target area, even if there is a similar color or texture in the background. At the same time, the marking of the difference pixel points can help the system accurately extract the target area, especially when the background and the target color are similar. Different pixels serve as the boundary between the target and the background, and can accurately distinguish the foreground target and the background. By marking the difference pixels, the system can filter out noise or irrelevant areas with similar background colors to reduce false detections. In the case of color overlap, the system relies on calculating the difference between the pixel and the background model, and can distinguish the difference between the target area and the background in detail, overcoming the limitations of the traditional simple method based on color matching. Through these meticulous steps, the system can not only identify the background area, but also accurately locate the target. Even if the background and the target have similar colors, the accuracy of target detection can still be guaranteed. Then the system determines whether the field information of the difference pixels can be matched continuously to execute the corresponding steps.For example, when the system determines that the domain information of the difference pixels can be matched continuously, the system will consider the difference pixels in the image to form a coherent and continuous area. Usually, this area represents a foreground target, not noise or isolated points in the background. The system will mark these continuous areas as a foreground target area. This step is the key to target recognition and extraction. Through connected domain analysis, these difference pixels are clustered into a connected area, which can more accurately outline the boundary of the target area and further improve the accuracy of target recognition. At the same time, the target tracking operation is performed. The system can track these continuous areas in multiple image frames to maintain target recognition, especially in video surveillance or real-time advertising display. This step is crucial, and deeper analysis is performed, such as target size analysis, shape analysis, color analysis, etc., to further extract the feature information of the target, which is very valuable for applications such as advertising display and target monitoring. For example, when the system determines that the domain information of the difference pixels cannot be matched continuously, the system will consider that the difference pixels in the image cannot be continuous and may belong to noise or isolated points in the background. The system will cluster these difference pixels into connected areas and detect in these connected areas. Non-adjacent isolated pixels, based on isolated pixels at different positions, identify pseudo foreground areas in connected areas, and remove areas to be filtered with area values ​​less than the preset number of pixels in the pseudo foreground areas; the system further identifies pseudo foreground areas (such as isolated small areas) by clustering these difference pixels into connected areas. The system can effectively remove meaningless noise and ensure that the remaining target areas are not disturbed by noise. This step can avoid misidentification and missed identification, and improve the accuracy of target detection. At the same time, through the strategy of clustering and removing small pseudo foreground areas, the system can still maintain strong robustness in noisy environments. Even when the target area overlaps or is similar to the background, the system can still accurately separate and identify the target, reduce background interference, and improve the stability of image processing. In addition, by clustering connected areas and removing isolated noise pixels from them, the system can more accurately extract the target area. This step eliminates irrelevant small areas and noise to ensure that only coherent target areas are retained, which helps to improve the accuracy of target recognition and segmentation. Accurate identification of target areas can provide higher quality input data for subsequent analysis (such as target classification, tracking, segmentation, etc.). ;

[0063] It should be noted that the advertisement exhibition image is segmented, corresponding region information is divided in the image data, and the pixel difference measure between the pixel value of the current image frame and the preset background model is calculated from the region information. The specific examples are as follows:

[0064] Suppose there is an advertising exhibition image, the background of the image is a simple blue wall (background), and the advertising content is a red billboard (foreground target); the goal of the system is to separate the advertising content (foreground target) from the background (blue wall);

[0065] First, we need to segment the image to separate the foreground object and the background area; here we use a simple threshold segmentation method as an example:

[0066] Background area: blue wall, RGB value is (0, 0, 255);

[0067] Foreground target area: billboard, RGB value is (255, 0, 0);

[0068] For this image, the goal of segmentation is to separate the wall from the billboard by setting a threshold, such as setting the threshold of the red channel to 200; when the red channel value of a pixel is greater than 200, it is considered to be a foreground target (red billboard); otherwise, it belongs to the background (blue wall);

[0069] If the RGB value of a pixel in the image is (255, 0, 0), it is part of the red billboard and it will be classified as the foreground area; if the RGB value of a pixel is (0, 0, 255), it is part of the background wall and it will be classified as the background area;

[0070] Then, the pixel difference metric is calculated to calculate the color difference of each pixel to determine whether it belongs to the foreground object or the background area. The difference metric can be calculated in different ways, such as using the absolute difference method and the Euclidean distance.

[0071] Absolute difference method:

[0072] Calculate the difference between the RGB value of each pixel in the current image frame and the background model; assume that the background model has been set to the blue RGB value (0, 0, 255);

[0073] For the billboard area, the pixel RGB value is (255, 0, 0), and we compare it with the background model (0, 0, 255), then the difference = |255-0|+|0-0|+|0-255|=255+0+255=510; if the difference is greater than the set threshold (such as 100), the pixel is marked as a foreground target;

[0074] For the background area, the pixel RGB value is (0, 0, 255). Compared with the background model (0, 0, 255), the difference = |0-0| + |0-0| + |255-255| = 0 + 0 + 0 = 0; if the difference is less than the set threshold (such as 100), the pixel is marked as background;

[0075] Euclidean distance method:

[0076] Use Euclidean distance to calculate pixel differences, especially when the color changes in the image are complex, Euclidean distance can provide a more accurate difference measurement;

[0077] For the billboard area, the pixel RGB value is (255, 0, 0), compared with the background model (0, 0, 255), the Euclidean distance = √[(255-0) 2 +(0-0) 2 +(0-255) 2 ]=√(65025+0+65025)=√130050≈360.52; If the Euclidean distance exceeds the set threshold (for example, 200), the pixel is marked as a foreground object;

[0078] For the background area, the pixel RGB value is (0, 0, 255), which is compared with the background model (0, 0, 255). The Euclidean distance = √[(0-0) 2 +(0-0) 2 +(255-255) 2 ]=√(0+0+0)=0; if the Euclidean distance is less than the set threshold (such as 200), the pixel is marked as background;

[0079] Then the target and background are distinguished. Through the above difference measurement, the system can successfully distinguish the foreground target from the background; the following are the specific results:

[0080] Foreground target (billboard): Because the color of the billboard is significantly different from the background (the difference between red and blue is large), the difference measurement of most pixels will exceed the set threshold (such as 510 or 360.52), so it is identified as the foreground target area;

[0081] Background area (wall): The background wall is blue, which is consistent with the color of the background model, so its difference metric is very small (0) and is marked as the background area;

[0082] Finally, the segmentation effect: after the image is segmented and processed with difference measurement, the system can accurately separate the billboard area from the wall background area and mark them as different area information; this lays the foundation for subsequent image analysis (such as target recognition, object tracking, etc.); it is finally concluded that there is a clear difference between the red color of the billboard and the blue color of the background, so their difference measurement values ​​are very high and they are easily identified as foreground targets, while the blue color of the background area is similar to the preset background model, with a difference measurement of 0, and is identified as the background;

[0083] In summary, by segmenting the advertising exhibition image into foreground targets and background areas, using color thresholds or other methods, the billboards and background walls are distinguished. At the same time, by calculating the difference between the current pixel and the preset background model (using absolute difference or Euclidean distance), the system can determine which pixels belong to the foreground target and which belong to the background area. Moreover, through the difference measurement, the foreground target (billboard) and the background (blue wall) are accurately separated, providing a clear area division for subsequent processing.

[0084] It should be supplemented that the difference pixels are clustered into connected areas, and non-adjacent isolated pixels are detected in the connected areas. The specific examples are as follows:

[0085] There is an advertising exhibition image, which contains a red billboard (foreground object) and some blue background; because there may be texture or messy patterns in the background, there may also be some noise in the image (such as isolated blue pixels);

[0086] First, the pixel difference is calculated. The system first calculates the difference metric between each pixel in the image and the background; for example:

[0087] Assume that the background color is blue (RGB: 0, 0, 255) and the foreground of the billboard is red (RGB: 255, 0, 0); the system checks the color value of each pixel one by one and calculates the difference with the background model; the pixel whose pixel value differs from the background by more than a set threshold (i.e. the red billboard part) is marked as a difference pixel;

[0088] Then the difference pixels are clustered into connected regions. The system uses the connected region analysis algorithm to cluster these difference pixels into one or more connected regions. Assume that the foreground (red billboard) in the image is composed of the following difference pixels:

[0089] Pixel A: red;

[0090] Pixel B: red;

[0091] Pixel C: red;

[0092] Pixel D: red;

[0093] Pixel E: blue (background);

[0094] Pixel F: red;

[0095] Pixel G: blue (background);

[0096] Pixel H: red;

[0097] These red difference pixels (A, B, C, D, F, H) belong to the same connected region and represent the foreground area of ​​the billboard; the blue pixels (E and G) are considered the background area;

[0098] Then, the system detects isolated pixels. In these connected areas, the system checks whether there are isolated pixels. Suppose the system finds that pixel D is adjacent to only one pixel, while the rest of the red pixel area is closely connected, so pixel D appears to be "isolated".

[0099] Finally, the isolated pixels are removed. The system removes the isolated pixels according to a preset area threshold (for example, an area less than 10 pixels is considered as noise). Since pixel D is isolated and its area is less than the threshold, it is considered as noise and is removed.

[0100] In summary, in the above example, the system finally identified the foreground area of ​​the billboard and removed irrelevant noise or isolated pixels, so that the foreground area of ​​the billboard (composed of pixels A, B, C, F, H) was successfully separated, while the background part (blue area) was accurately retained; through the clustering of difference pixels and the removal of isolated pixels, the system effectively solved the problem of noise interference in complex backgrounds and successfully separated the foreground target and background in the advertising exhibition image.

[0101] In this embodiment, the advertisement exhibition image is segmented, and before the step S3 of dividing the corresponding area information in the image data, the following is further included:

[0102] S301: applying a preset convolutional neural network to extract hierarchical features of the advertising exhibition image, and generating corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color;

[0103] S302: Determine whether the candidate region matches a preset region category, wherein the region category specifically includes a category label and a position of a target;

[0104] S303: If yes, construct a segmentation mask corresponding to the candidate area through a preset mask branch, align the segmentation mask with the preset target bounding box of the advertising exhibition image, and combine the target bounding box with the segmentation mask, and divide the pixel-level segmentation of each target object in the advertising exhibition image according to the alignment result and the combination result.

[0105] In this embodiment, the system applies a pre-set convolutional neural network to extract hierarchical features of the advertising exhibition image. The hierarchical features specifically include shape, texture and color. Based on these hierarchical features, corresponding candidate areas are generated. Then the system determines whether these candidate areas match the pre-set area categories. The area categories specifically include the category label and position of the target, so as to execute the corresponding steps. For example, when the system determines that the candidate area corresponding to the hierarchical features cannot match the pre-set area category, the system will consider that the candidate area does not contain the target, or the contained target does not match the expected category. The system will adjust the output threshold of the convolutional neural network, improve the quality of the candidate area by optimizing the algorithm, and use more The features of different types, such as multi-scale features or adaptive convolutional networks commonly used in deep learning, are used to enhance the robustness of target features. At the same time, non-maximum suppression methods are used to remove redundant or overlapping candidate regions to ensure that each candidate region corresponds to only one target category. Multi-task learning is introduced, combining position regression and category recognition tasks to improve the accuracy of the model in position and category matching. If the model cannot effectively match the category label under specific environments or conditions (such as uneven lighting, angle changes, etc.), the adaptability of the model to diverse targets can be enhanced by increasing the training data sets under different environmental conditions. For example, when the system determines that the candidate region corresponding to the hierarchical feature generation can match the category of the pre-set region, at this time The system will consider that the candidate area meets expectations, and will construct a segmentation mask corresponding to the candidate area through a pre-set mask branch, align the segmentation mask with the pre-set target bounding box of the advertising exhibition image, and combine the target bounding box with the segmentation mask. According to the alignment result and the combination result, the pixel-level segmentation of each target object in the advertising exhibition image is divided; by aligning the generated candidate area with the target bounding box and combining it with the segmentation mask, the system can achieve pixel-level target segmentation, which means that the target can not only be accurately identified, but also its shape and boundary in the image can be accurately determined, ensuring that the separation of the target object from the background is more refined and accurate, and combining the segmentation mask with the target bounding box , which helps to refine the classification results of the candidate area. By aligning the segmentation mask with the target bounding box, the system can further refine the position and shape of the target and optimize the detection results, thereby providing more accurate classification and positioning information. By generating a segmentation mask based on a pre-set mask branch and aligning the target bounding box, the target can be segmented quickly and accurately, which not only improves the segmentation accuracy, but also reduces redundant calculations, making the system have better real-time performance. By refining the pixel-level segmentation of the target, the system can not only perform static target recognition, but also provide accurate data support for subsequent target tracking. In the real-time display of advertising exhibitions, accurate target segmentation can effectively help track and analyze the behavior and changes of the target;

[0106] It should be noted that the preset convolutional neural network is used to extract the hierarchical features of the advertising exhibition image, and the corresponding candidate regions are generated based on the hierarchical features. The specific examples are as follows:

[0107] Suppose there is an image of an advertising exhibition, which contains multiple billboards, exhibits and other spectators; the goal of the system is to extract features from this image through a convolutional neural network and generate candidate regions for further identification of billboards;

[0108] Input image and convolutional neural network (CNN) feature extraction, first input the image to a pre-trained convolutional neural network; assume that the image size is 800×600 pixels and contains multiple objects, including billboards and exhibits; the advertising exhibition image contains brightly colored billboards with many details, such as text, logos, patterns, etc. on the billboards, and the background is cluttered exhibits and audiences; each layer of the convolution operation CNN extracts features at different levels;

[0109] The first convolution layer extracts low-level features from the image, such as edges and lines. These low-level features may not be able to identify billboards, but they are the basis for recognizing more complex images.

[0110] Middle layer convolution: As the convolutional network goes deeper, the network begins to learn more complex shapes and textures; for example, the rectangular edges of the billboard, the shape of the font, and even the unique color pattern of the billboard. At this point, the network is already able to recognize some features of the billboard, such as straight edges and fonts.

[0111] Advanced feature layers: Deeper convolutional layers (such as those in VGGNet or ResNet) can extract the structural features of the billboard as a whole, including the specific text on the billboard, the logo, and the pattern of the background.

[0112] The feature map then generates candidate regions. CNN generates candidate regions through hierarchical feature maps. Candidate regions refer to areas in the image that may contain target objects. Based on different features (such as color, shape, texture, etc.), the system generates several candidate boxes.

[0113] Feature map: The advanced convolutional layers of CNN (such as the last few layers of ResNet) generate a feature map of size 50×50, where each point represents the characteristics of a small area in the image; each point contains the feature vector of the area, which describes the color, texture, shape, etc. of the area;

[0114] Generate candidate regions: Based on the feature map, the system uses the Region Proposal Network (RPN) to generate candidate regions. The RPN generates multiple possible candidate boxes at each position on the feature map by means of a sliding window. Each candidate box has a score indicating the likelihood that it contains the target. For example, the system may generate multiple candidate boxes for the area where the billboard is located, and the score of each box indicates the confidence that the billboard may be located in that area. If the billboard is located in the center of the image, the RPN may generate several candidate boxes in the center of the image, which may include part or all of the billboard.

[0115] After the candidate regions are screened and multiple candidate regions are generated, the system will screen out the region most likely to contain the target based on the confidence score of each candidate frame. If the candidate frame has a high score, it means that the region is likely to contain a billboard.

[0116] Candidate box screening: The system will screen based on the confidence score, remove low-scoring areas, and only retain high-confidence candidate boxes; for example, the system screens out a rectangular area located in the center of the image. This area has a high confidence score and may contain a billboard; other low-confidence areas may only contain background or other irrelevant objects;

[0117] Then, the system verifies the match between the region and the target category. It determines whether these candidate regions match the pre-set target category, for example, whether a candidate region is a "billboard";

[0118] Category matching: The system verifies whether each candidate box contains a billboard based on the preset target category label; if the features of a candidate area match the features of a billboard (e.g., rectangular shape, text, color), then the system considers the area to match the target category;

[0119] Example: Suppose a candidate box is located in the center of an image, and the texture, color, shape and other features of the area meet the characteristics of a billboard; the system will consider this area to be a billboard and may mark the candidate area as a "billboard" category;

[0120] Finally, the candidate regions are output. The system will output all candidate regions that meet the conditions. These candidate regions may contain billboards or other targets, which are determined by the category matching results.

[0121] Candidate region output: The output candidate region can be part or all of the billboard in the image. The system can assign a category label and location information to each candidate region. Assuming that the candidate region in the central part of the image is identified as a billboard, the system will output the location, shape and category label of the region (such as "billboard").

[0122] In summary, the convolutional neural network automatically extracts the hierarchical features of the advertising exhibition images, avoiding the trouble of artificial feature design, and can automatically identify the shape, texture, color and other features of the billboards. At the same time, the candidate region generation method based on deep learning is more accurate than the traditional image processing method (such as sliding window, HOG features, etc.), and can better identify the targets in complex backgrounds. Even if the advertising exhibition image contains multiple complex objects or the background is cluttered, the system can accurately identify the billboard target through the generated candidate regions.

[0123] It should be noted that, through the preset mask branch, a segmentation mask corresponding to the candidate area is constructed, the segmentation mask is aligned with the preset target bounding box of the advertising exhibition image, and the target bounding box is combined with the segmentation mask. The specific example is as follows:

[0124] Suppose there is an image of an advertising exhibition, which contains multiple billboards and other elements; the goal of the system is to use a convolutional neural network (CNN) to extract the hierarchical features of the image, and then generate a segmentation mask of the billboard through the candidate regions and perform target segmentation;

[0125] First, extract hierarchical features and generate candidate regions. Use a preset convolutional neural network (such as ResNet, VGG, etc.) to extract features from the advertising exhibition image. Through the convolutional layer of the network, the hierarchical features of the image (such as shape, texture, color, etc.) will be extracted. These hierarchical features will help the network generate potential target regions.

[0126] Assume that the extracted feature map contains information such as billboards, other markers, and background; the image resolution is 800×600 pixels, and contains multiple billboards, each with different patterns and texts; through the region proposal network (RPN) or other candidate region generation algorithm, the network will propose multiple candidate regions (bounding boxes), which may include billboards, backgrounds, and other objects;

[0127] For example, suppose the network proposes the following candidate regions:

[0128] Candidate region 1: bounding box (100, 150) to (200, 250), which is a billboard;

[0129] Candidate region 2: bounding box (300, 400) to (500, 600), which is another billboard;

[0130] Candidate region 3: bounding box (600, 700) to (700, 800), which is a background region;

[0131] Then, a segmentation mask is generated through the mask branch. On the basis of target detection, an accurate segmentation mask needs to be generated. The mask branch generates a corresponding mask for each candidate region. For each candidate region (for example, candidate region 1), the network will generate a corresponding segmentation mask based on the features of the region. Assume that the mask generated by the billboard corresponding to candidate region 1 is a 28×28 binary image (the mask size is usually smaller than the candidate box), in which the billboard part is marked as 1 and the other parts are marked as 0.

[0132] For example, the resulting mask might look like this:

[0133] The pixels within the billboard area are marked as 1;

[0134] The background area outside the billboard is marked as 0;

[0135] Mask diagram (28×28): 0000000000000000000000000000000 00000011111111111111111110000000 00000111111111111111111111000000 00000111111111111111111111000000 00000111111111111111111111000000 00000111111111111111111111000000 00000111111111111111111111000000 00000011111111111111111110000000 0000000000000000000000000000000

[0145] The above 28×28 mask marks the billboard area as 1 and the other background areas as 0;

[0146] Align the segmentation mask with the target bounding box. The generated segmentation mask size is 28×28 pixels, but the actual target area (billboard) may be larger than the mask. In order to accurately apply the segmentation mask to the image, it is necessary to scale the mask according to the bounding box of the candidate area and align it to the actual target area. Assuming that the bounding box of candidate area 1 is (100, 150) to (200, 250), it can be known that the actual location of the billboard is this area.

[0147] Next, the mask is scaled to the size of the bounding box. Here, the 28×28 mask needs to be enlarged to a size of 100×100 (assuming the size of the target area); this scaling process uses an interpolation algorithm (such as bilinear interpolation) to ensure image coherence; after scaling, the mask will cover the billboard area in the image; the scaled mask may look like this (this is a simplified illustration):

[0148] Scaled mask (100×100): 000000000000000000000000000000000 0000001111111111111111111100000000 0000011111111111111111111110000000 0000011111111111111111111111000000 0000011111111111111111111111000000 0000011111111111111111111111000000 0000011111111111111111111110000000 0000001111111111111111111100000000 000000000000000000000000000000000

[0158] This mask represents the exact outline of the billboard, scaled to match the target area;

[0159] Finally, the target bounding box is combined with the segmentation mask. Specifically, the combination operation is to cover the scaled mask to the actual position of the target in the image to achieve accurate segmentation of the target; the scaled mask is covered to the area where the billboard is located (for example, the area from (100, 150) to (200, 250) in the advertising exhibition image), and this mask is combined with the pixels of the target bounding box to generate a pixel-level segmentation map of the billboard; the final image will show the accurate segmentation of the billboard, with the background part as 0 and the billboard part as 1;

[0160] Assume that the size of the original advertising exhibition image is 800×600 pixels, and the billboard area is between (100, 150) and (200, 250); after the above steps, the system will generate a 100×100 segmentation mask for the billboard area and cover it to the corresponding position, finally achieving pixel-level segmentation of the billboard area;

[0161] Billboard area: marked as 1;

[0162] Background area: marked as 0;

[0163] In summary, the above process is repeatedly applied to each target in the image (such as other billboards, exhibits, etc.) to ensure that each target area is accurately segmented; and this detailed process shows how to generate segmentation masks for candidate regions through mask branches, align and combine the masks with the target bounding boxes, and thus achieve accurate segmentation of targets in advertising exhibition images; this process can effectively improve the accuracy of image segmentation, especially when dealing with complex backgrounds and targets, to ensure clear separation of targets and backgrounds.

[0164] In this embodiment, the step S3 of marking the difference pixels of the region information according to the pixel difference metric further includes:

[0165] S31: constructing a difference threshold of the pixel difference measurement based on the preset feature dynamics of the advertising exhibition image;

[0166] S32: Determine whether the pixel difference metric exceeds the preset pixel difference threshold;

[0167] S33: If yes, then based on the pixel difference metric, mark each pixel point that is significantly different from the background, classify the pixel points into foreground pixels and background pixels, and dynamically update the current image change of the advertising exhibition image by applying a preset weighted average to the foreground pixels and the background pixels.

[0168] In this embodiment, the system constructs a difference threshold of pixel difference measurement based on the pre-set feature dynamics of the advertising exhibition image, and then the system determines whether these pixel difference measurements exceed the difference threshold of the pixel difference measurement to perform the corresponding steps; for example, when the system determines that the pixel difference measurement does not exceed the difference threshold of the pixel difference measurement, the system will consider that the pixels in the current area are very close to the background model and it is difficult to distinguish the target from the background. The system will ignore these areas where the pixel difference measurement does not exceed the difference threshold and will not mark them as foreground targets to avoid mistakenly identifying the background as the target. By continuing to calculate the difference measurement of other areas, more accurate target areas are identified. At the same time, the threshold parameters are adjusted to appropriately lower the threshold to enhance the recognition ability of subtle differences, thereby improving the detection accuracy of foreground targets, and more features are introduced, such as motion information, texture information, color histogram, etc., to further verify whether the area belongs to the foreground target; for example, when the system determines that the pixel difference measurement exceeds the difference threshold of the pixel difference measurement, the system will consider that the pixels in the current area can be separated from the background model. The system will mark each pixel point that is significantly different from the background according to the pixel difference measurement, and divide these pixel points into The system classifies foreground pixels and background pixels, and dynamically updates the current image changes of the advertising exhibition image by applying a preset weighted average to the foreground pixels and the background pixels; the system reduces the risk of misidentification by clearly distinguishing the foreground and the background. For example, if the color or texture of the advertising content and the background in the image is quite different, it can help the system accurately identify the area of ​​the advertisement instead of misjudging the background as the target. At the same time, when the foreground pixels and the background pixels are updated by weighted averaging, the background model can be dynamically adjusted as the image changes, which enables the system to cope with the dynamic changes of the environment in the advertising exhibition image, such as changes in lighting, movement of background objects, etc., to maintain accurate recognition of the target. Moreover, by classifying and weighted averaging the foreground pixels, the system can not only identify the target, but also refine the boundary of the foreground area. The weighted average enables the system to smooth the transition between the foreground and the background, avoiding misjudgment or unclear boundaries caused by sudden pixel differences. By accurately marking the foreground pixels and dynamically updating the background, the system can reduce unnecessary calculations and only focus on the processing of the foreground area, which not only improves the detection accuracy, but also improves the processing speed. It is suitable for real-time or high-frequency updated advertising display systems.

[0169] It should be noted that, according to the pixel difference metric, each pixel point that is significantly different from the background is marked, and the pixel points are classified into foreground pixels and background pixels. By applying a preset weighted average to the foreground pixels and the background pixels, the current image change of the advertising exhibition image is dynamically updated. The specific example is as follows:

[0170] Suppose there is an advertising exhibition image, the background in the image is a gray wall, and the advertising content displayed on the advertising board is updated regularly; the color of the advertising content may be similar to the color of the background wall, and the advertising board has different textures and text content;

[0171] Assume that the color of the wall is light gray and the texture of the background is stable; in the first few frames, the system analyzes the advertising exhibition image and builds a background model, which includes the wall color and texture; the system extracts each pixel from the advertising exhibition image and calculates the difference between the pixel value and the background model; suppose the color of a certain pixel is red, which is very different from the light gray of the background wall, so this pixel will be marked as a "foreground pixel";

[0172] If the color of a pixel is light gray, this pixel is very close to the gray in the background model and will be marked as a "background pixel"; mark foreground pixels and background pixels:

[0173] Foreground pixels: Text, patterns, and other areas on the ad content that are not background will be marked as foreground;

[0174] Background pixels: Areas not covered by walls and billboards will be marked as background;

[0175] For example, the red text on the advertising board (such as "Special Offer") is quite different from the light gray background wall, so the red text area will be marked as foreground pixels; while the gray border on the advertising board is similar in color to the background wall, so it will be marked as background pixels;

[0176] When the background pixels in the image are marked, the system will update the background model by weighted averaging. For example, if the gray of the wall area becomes slightly darker in some image frames, the system will adjust the average gray in the background model based on the background pixels in the new image frames. This weighted average update ensures that the background model can adapt to changes in the environment and avoid background misidentification caused by lighting changes or other factors.

[0177] By separating foreground and background pixels, the system can accurately identify the target area in the advertising board. For example, the red text on the advertising board is quite different from the background wall, so the system can accurately identify the red text area. At the same time, the pixels in the background wall area have not changed, so they remain stable.

[0178] Assume that the advertising content of the billboard has changed, for example, from "Summer Sale" to "Autumn New Products". Since the background model has been dynamically updated according to the previous frame, the foreground pixels of the new advertising content (such as new font color, text style, etc.) can be accurately detected and separated from the background. Even if the color of the billboard partially overlaps with the color of the background wall, the system can still accurately identify the new content of the billboard through the updated background model to avoid misidentifying the advertising content as the background. Therefore, in advertising exhibitions, the content on the billboard will change regularly, such as from "Summer Sale" to "Autumn New Products". Although the color of the advertising content and the color of the background wall are somewhat similar, the text, pattern and other elements on the billboard have unique texture and color characteristics. The system achieves accurate target recognition and segmentation through the following steps:

[0179] By calculating the pixel difference between the advertisement content and the background wall, the difference area between the advertisement board and the background wall is identified; the foreground is the content on the advertisement board, and the background is the wall and other static areas; as the lighting changes or other minor changes, the background model is adjusted through weighted averaging so that the color and texture of the background can adapt to environmental changes; even if the content on the advertisement board changes, the system accurately identifies the new content on the advertisement board through the updated background model, ensuring accurate detection of the advertisement target;

[0180] In summary, in the above example, through this dynamically updated background model and precise foreground detection, the system can effectively handle the similarity problem between the foreground and background in the advertising exhibition image, thereby achieving accurate target detection and segmentation. Even if the color of the advertising content is similar to the background color, the system can ensure accurate recognition of the advertising content by marking the foreground pixels and updating the background model.

[0181] In this embodiment, the difference pixels are clustered into connected areas, and in step S5 of detecting non-adjacent isolated pixels in the connected areas, the following is further included:

[0182] S51: Based on the preset domain relationship of the difference pixel points, perform domain detection on the pixels in the connected area to verify the connection relationship of the pixels, wherein the domain relationship specifically includes horizontal, vertical and diagonal adjacency;

[0183] S52: Determine whether the connection relationship conforms to the domain relationship;

[0184] S53: If yes, then expand the pixel using a preset structure element to obtain a foreground pixel overlapping with the pixel, and dynamically update the foreground area of ​​the advertisement display image according to the foreground pixel, wherein the structure element specifically includes a square, a circle and a cross.

[0185] In this embodiment, the system performs field detection on pixels in the connected area based on the pre-set field relationship of the difference pixels, which specifically includes horizontal, vertical and diagonal adjacency, to verify the connection relationship of these pixels, and then the system determines whether the connection relationship conforms to the pre-set field relationship to execute the corresponding steps; for example, when the system determines that the connection relationship of these pixels cannot conform to the pre-set field relationship, the system will consider that the segmentation of certain targets is discontinuous, resulting in some pixels being mistakenly marked as isolated points, then these isolated points cannot conform to the preset connection relationship, and the system will filter small areas and set a minimum area threshold. If the area of ​​a connected area is less than the threshold, , it is regarded as noise or isolated point and removed from the target area. At the same time, in the detection of connected areas, if pixels that do not conform to the domain relationship are detected, you can try to remove the isolated pixels that do not conform to the connection rules from the current area, or merge them into the adjacent area, readjust the target boundary through recursive search or graph cut algorithm (such as image segmentation method), correct the wrong segmentation, and use a variety of detection methods (such as color, texture, shape and other features) fusion, comprehensively consider the connectivity of different features, can effectively identify which are targets and which are backgrounds, and avoid mistaking background noise for foreground; for example, when the system determines that the connection relationship of these pixels can meet the pre-set domain relationship, then the system The system will consider that the pixels are continuous and connected, and there are no isolated points. The system will use the pre-set structural elements to expand these pixels. The structural elements specifically include square, circle and cross, to obtain the foreground pixels overlapping with these pixels, and dynamically update the foreground area of ​​the advertising exhibition image according to different foreground pixels; the system can identify the continuity of the target area by determining that the connection relationship of the pixels meets the preset domain rules, which means that the foreground target in the image is continuous in space, and will not cause the target area to be mis-segmented or broken due to noise or isolated points. Such processing ensures that the target area can completely cover the advertising content, avoids the wrong target separation and loss, and the expansion operation is also effective. By expanding the foreground pixels to the adjacent pixel area, the edge of the target area is made clearer. This is especially important for the complex background in the image, because the complex background may contain parts with texture, pattern or color similar to the target area, which may be mistakenly identified as the foreground, and different structural elements (square, circular, cross) are suitable for different image features. For example, the square structural element is suitable for regular rectangles or square targets, the circular structural element is suitable for circular targets, and the cross structural element is suitable for complex target shapes or areas with irregular edges. By flexibly applying different structural elements, the system can dynamically adjust the expansion strategy according to the shape and characteristics of the target to ensure accurate segmentation of the target area.

[0186] It should be noted that the pixels are expanded by applying a preset structural element to obtain foreground pixels overlapping with the pixels, and the foreground area of ​​the advertising exhibition image is dynamically updated according to the foreground pixels. The specific examples are as follows:

[0187] Consider an image of an advertising exhibition with a city street scene as the background and a large billboard containing multiple texts, icons, and product images. The color of the billboard and some areas of the background may be similar, and the boundaries of the advertising content are not always clearly visible, so the object detection algorithm may have difficulty perfectly segmenting the target area and the background. To solve this problem, the system applies a dilation operation to enhance the clarity of the foreground area.

[0188] The image shows a billboard with the words "buy one get one free" and a product icon. The background is a city street scene, and some streets are similar in color to the billboard. There is a shadow above the billboard, which makes the boundary between the text and icon unclear. Through convolutional neural network (CNN) detection, the system identifies the billboard area. The target area initially identified includes the text and icon of the advertisement, but due to the shadow and the background of similar color, some text boundaries and icon edges are not clear.

[0189] First, a dilation operation is performed. Assume that the system uses a square structure element of size 3x3 (i.e., a matrix of 3 rows and 3 columns). This structure element is applied to every pixel in the billboard area. In the billboard area, the square structure element scans the entire foreground area. Whenever the structure element overlaps a pixel, the pixel and the pixels in its neighborhood are marked as foreground pixels. This means that if a pixel is part of the billboard and the surrounding pixels are in the background or are occluded (such as shadows), the dilation operation will "expand" the pixel to the surrounding area. Through this expansion, the borders of the advertisement are smoothed and significantly expanded, filling any gaps that may exist.

[0190] The dilation operation fills in small gaps that might otherwise exist; for example, if the end of a billboard text is incompletely detected due to shadows or color transitions, the dilation operation will expand its edges to ensure that the end of the text is included in the foreground area; the pixel area around the icon is also expanded to ensure that the icon is not misidentified as the background because the background color is similar to it;

[0191] Then the foreground pixels that overlap with the pixels are obtained. After the dilation operation is completed, the border of the billboard is smoother, and the area of ​​the advertising text and icon becomes more complete; after the dilation, the area that overlaps with the original foreground pixels is considered to be the newly added foreground area; at this time, the icons, texts and other elements in the billboard are redefined as part of the foreground area;

[0192] The expanded foreground area covers more pixels, making the ad content more prominent; these newly added foreground pixels can help the system accurately distinguish the ad content from the background in subsequent processing, especially in the image segmentation stage;

[0193] Then the foreground area of ​​the advertising display image is dynamically updated. After dilation, the system will dynamically update the foreground area in the advertising display image; the originally incomplete billboard border is now "filled" to ensure that the boundaries between the advertising text, icon and background are clearer; that is, the foreground area of ​​the billboard becomes more coherent and the boundaries are clearer, ensuring that every detail of the advertising content is accurately extracted; for example, the "buy one get one free" text becomes more complete after dilation, the details of the advertising icon are not disturbed by the background, and the influence of the shadow part is reduced; in the subsequent image segmentation, the system can more easily extract the advertising content from the background to avoid misidentification;

[0194] In summary, by applying the dilation operation to the billboard area, the foreground area in the image is expanded and enhanced, especially in the parts with blurred boundaries or interfered by shadows or backgrounds with similar colors; the dilation operation ensures that all parts of the billboard (text, icons, pictures) can be accurately extracted, avoiding confusion between the background and the advertising content, and improving the accuracy of subsequent target detection and image processing; the dynamically updated foreground area makes the advertising content appear clearer and more prominent in the image, which helps to achieve more efficient advertising recognition and display.

[0195] In this embodiment, the step S2 of determining whether the image data detects a preset color overlap further includes:

[0196] S21: extracting color features of each pixel from the image data, comparing the color features with a preset target color range, and calculating the color overlap of each pixel;

[0197] S22: Determine whether the color overlap reaches a preset threshold;

[0198] S23: If yes, identifying the foreground pixels corresponding to the color overlap, and marking the corresponding foreground area from the image data based on the foreground pixels.

[0199] In this embodiment, the system extracts the color features of each pixel from the image data, compares these color features with a preset target color range to calculate the color overlap of each pixel, and then the system determines whether these color overlaps reach a preset threshold to execute the corresponding steps; for example, when the system determines that the color features of each pixel do not reach the preset threshold, the system will consider that there is a large difference between these pixels in the image and the predetermined target color range, which may indicate that these pixels belong to the background or do not meet the color features of the target. The system will further check other features (such as texture, shape, etc.), combine edge detection, shape analysis and other features to confirm the shape and boundary of the target, apply other types of feature matching or background modeling to the area where the pixel is located, and re-segment the entire area or recalibrate the target detection model, gradually converge to a more suitable target area, and appropriately relax the color range or adjust the threshold, adjust the target color range, and increase the threshold to include more pixels that may belong to the target area; for example, when the system determines that the color features of each pixel have reached a preset threshold, the system will consider These pixels in the image are almost the same as the predetermined target color. The system will identify the foreground pixels corresponding to the low and medium values ​​of these colors, and mark the corresponding foreground areas from the image data based on these foreground pixels. The system can accurately identify the foreground area that matches the target color in the image by comparing color features. For example, if a part of the advertising image is a preset red area, and the color features of the area match the threshold, the system will identify these pixels as belonging to the foreground. This precise color matching helps to efficiently locate the target area and avoid interference from irrelevant backgrounds. At the same time, through strict color threshold restrictions, the system can reduce the probability of misidentification. Only when the color of the pixel meets the characteristics of the target color will it be marked as a foreground pixel, which effectively avoids confusion with the background or other irrelevant objects and ensures that the target area is accurately segmented. Based on the identification of foreground pixels, the system can effectively delineate the target area and further perform pixel-level segmentation, which means that the targets in the advertising exhibition image (such as advertising slogans, commodities or specific elements) can be accurately extracted, providing accurate basic data for subsequent analysis or processing (such as content recognition, target tracking, etc.).

[0200] In this embodiment, the step S4 of judging whether the area information of the difference pixel points can be matched continuously further includes:

[0201] S41: calculating the mean and variance of the difference pixel points based on the pre-divided local area of ​​the advertising exhibition image;

[0202] S42: Determine whether the mean and the variance detect a preset fluctuation;

[0203] S43: If yes, then identify the corresponding noise features from the difference pixels, dynamically adjust the difference threshold according to the noise features, and remove the falsely detected noise areas according to the difference threshold, wherein the noise features specifically include Gaussian noise, salt and pepper noise, and speckle noise.

[0204] In this embodiment, the system calculates the mean and variance of the difference pixels based on the local areas pre-divided by the advertising exhibition image, and then determines whether the mean and variance detect a preset fluctuation to execute the corresponding steps; for example, when the system determines that the mean and variance of the difference pixels do not detect a preset fluctuation, the system will consider that there is no noise area in these difference pixels, and the system will continue to monitor other areas where changes may exist. By expanding the detection range, the system can find changes in other areas to ensure complete foreground target detection, and at the same time regard these stable areas as background areas, ignore the influence of these areas in foreground detection, avoid invalid calculations, and help improve efficiency, because the system does not need to repeatedly process the background area, and although the difference pixels in the area do not show significant fluctuations, the system can still further verify whether there is a foreground target in the area through other features (such as shape, texture, edge, etc.), and can enhance the detection of foreground targets if necessary; for example, when the system determines that the mean and variance of the difference pixels detect a preset fluctuation, the system will consider that there is a noise area in these difference pixels, and the system will identify corresponding noise features from these difference pixels. The noise features specifically include Gaussian noise Gaussian noise, salt and pepper noise and speckle noise are detected by the system. The difference threshold is adjusted dynamically according to different noise characteristics, and the misdetected noise area is removed according to the difference threshold. By identifying and removing the noise area, the system can effectively eliminate the influence of Gaussian noise, salt and pepper noise and speckle noise on foreground detection, which helps to improve the accuracy of image segmentation and avoid misjudging noise as foreground targets or wrong background areas. At the same time, by dynamically adjusting the difference threshold according to different noise characteristics, the system can more accurately adapt to different types of noise influences. For areas with strong noise, the system can appropriately relax the threshold to reduce the possibility of noise being misjudged as foreground. For clearer areas, the system can strictly enforce the threshold limit to ensure more accurate foreground detection. After noise processing, the distinction between background and foreground in the image will be clearer. The system can more accurately identify the foreground target area and avoid misdetection or missed detection. Especially in complex advertising exhibition images, noise can easily affect the accurate recognition of the target. Timely noise removal helps accurate target segmentation. It can better cope with dynamically changing environments or other external interferences and improve robustness. Even if the image contains a certain degree of noise, the system can still accurately extract the target area and dynamically adjust the strategy to ensure efficient and stable target detection and segmentation.

[0205] It should be noted that, based on the pre-divided local area of ​​the advertising exhibition image, the mean and variance of the difference pixel points are calculated, and a specific example is as follows:

[0206] Suppose there is an advertising exhibition image containing multiple billboards, passers-by and background. The color of the billboard is different from the background color. The goal of the system is to identify the difference between the billboard (foreground target) and the background by calculating the pixel difference of each local area in the image.

[0207] Assume that the image has a resolution of 500x500 pixels and we divide it into a 10x10 grid with each local region of size 50x50 pixels;

[0208] First, divide the image area into 100 local areas with 10 rows and 10 columns, and the size of each local area is 50x50 pixels. For example, the pixel position of the first local area is (0:50, 0:50), the position of the second area is (50:100, 0:50), and so on.

[0209] Assume that a background model has been preset, which represents the background by averaging the background color value; the background color may be light blue or gray, depending on the actual color of the image background;

[0210] Then calculate the difference of the difference pixels. For each local area, calculate the difference between each pixel and the background model. Assume that in a local area, the background is gray, and the color of the billboard in the area is reddish. Assume that the color value of the image is based on the RGB mode, and the RGB value of each pixel ranges from 0 to 255. For example, in a 50x50 local area, the RGB values ​​of some pixels are as follows:

[0211] Background pixels (gray background): (128, 128, 128)

[0212] Advertisement board pixels (foreground): (200, 50, 50)

[0213] For each pixel, the difference metric can be obtained by calculating its Euclidean distance with the background model; for example, for (200, 50, 50) and (128, 128, 128), the difference of the pixel can be calculated:

[0214]

[0215] The result was a difference measure ≈160.85;

[0216] Calculate the mean and variance. In this local area, calculate the mean and variance of all difference pixels; assuming that there are 50x50=2500 pixels in this area, after calculating the difference metric, get the difference value array of all pixels in this area (example part):

[0217] difference_metric = [160.85, 150.12, 140.60, ..., 180.45, 155.60, 145.25]

[0218] Calculate the mean (average difference):

[0219]

[0220] Assume that the calculated mean is mean = 160;

[0221] Calculate the variance (the degree of dispersion of the difference values):

[0222]

[0223] Assume that the calculated variance is variance = 4000;

[0224] Then, the fluctuation is judged. Assuming the preset threshold is: when the mean is greater than 100 and the variance is greater than 1000, it is considered that the area is significantly different from the background, that is, the area may contain a foreground object; in this example, the mean is 160 and the variance is 4000, which are both above the threshold, so the system considers that the local area may be a foreground area and may contain an advertisement board;

[0225] Finally, the system marks the local area as the foreground area and further processes the area, such as object detection or segmentation; if the mean and variance of other areas are small, they may be considered as background areas;

[0226] In summary, through the above steps, the system can calculate the mean and variance based on the pixel differences in the local area, evaluate whether the area is significantly different from the background, and determine whether the area may be a foreground target area by setting a threshold. It can then process the targets and backgrounds in the advertising exhibition image to achieve automated target detection and segmentation.

[0227] In this embodiment, based on the pre-uploaded advertisement exhibition image, the step S1 of identifying corresponding image data from the advertisement exhibition image further includes:

[0228] S11: applying a preset target detection algorithm to identify target object categories in the advertising exhibition image, wherein the target object categories specifically include products, texts, and brand logos;

[0229] S12: Determine whether the target object category has preset advertising elements, wherein the advertising elements specifically include pattern, background and texture features;

[0230] S13: If yes, then based on the advertising element, the target object category is matched to a preset advertising theme, and the advertising exhibition image is divided into corresponding advertising categories according to the advertising theme, wherein the advertising theme specifically includes a company logo, brand logo and product icon, and the advertising category specifically includes product advertising, promotional advertising and brand advertising.

[0231] In this embodiment, the system applies a preset target detection algorithm to identify the target object category in the advertising exhibition image, the target object category specifically includes products, text and brand logos, and then the system determines whether these target object categories have preset advertising elements, the advertising elements specifically include patterns, background and texture features, so as to execute corresponding steps; for example, when the system determines that the target object category in the advertising exhibition image does not have the preset advertising elements, the system will think that the target object may have a low relevance to the advertisement, or it is not a key component of the advertisement, the system will remove these target objects from the advertising detection results, and will not perform further advertising element analysis to avoid affecting the accuracy of subsequent advertising content recognition, and at the same time further process the occluded part in the image, and try to complete the missing advertising element information through image repair, image filling and other technologies, so as to improve the recognition accuracy of the advertising elements, and re-examine the classification rules and model training data of the target detection algorithm, and may need to optimize the algorithm, adjust the accuracy of target object classification, and reduce the situation of misidentification; for example, when the system determines that the target object category in the advertising exhibition image has the preset advertising elements, this When the system finds that the target object has a high correlation with the advertisement, the system will match the target object category to the pre-set advertisement theme based on these advertisement elements. The advertisement theme specifically includes the company logo, brand logo and product icon. The advertisement exhibition image is divided into corresponding advertisement categories according to different advertisement themes. The advertisement categories specifically include product advertisement, promotional advertisement and brand advertisement. By accurately identifying the advertisement elements, the system can better understand the advertisement content in the image and avoid misidentifying non-advertising elements as advertisements. The advertisement elements, as strong identification marks, help the system distinguish between advertisements and non-advertising areas to ensure the recognition accuracy of the target object. At the same time, by matching the advertisement theme based on the advertisement elements, the system can classify the advertisements more finely. The advertisements can be subdivided into different categories, such as product advertisements, promotional advertisements and brand advertisements. This can not only identify the advertisement content, but also understand the purpose and type of the advertisement. In addition, the advertisement exhibition images are divided according to the advertisement categories (such as product advertisements, promotional advertisements and brand advertisements), which can provide accurate classification data for subsequent advertisement effect analysis, trend analysis and consumer response analysis. This hierarchical advertisement analysis provides basic data for the evaluation of advertisement effect.

[0232] Reference Figure 2 , is a target object recognition and replacement system for an advertisement exhibition image in an embodiment of the present invention, comprising:

[0233] The recognition module 10 is used to recognize corresponding image data from the pre-uploaded advertising exhibition image, wherein the image data specifically includes foreground target data and background data;

[0234] A determination module 20, used for determining whether a preset color overlap is detected in the image data;

[0235] The execution module 30 is used to perform image segmentation on the advertising exhibition image, divide the corresponding region information in the image data, calculate the pixel difference metric between the pixel value of the current image frame and the preset background model from the region information, and mark the difference pixel points of the region information according to the pixel difference metric, wherein the region information specifically includes the target region and the background region;

[0236] A second judgment module 40 is used to judge whether the area information of the difference pixel points can be matched continuously;

[0237] The second execution module 50 is used to cluster the difference pixels into connected areas if not possible, detect non-adjacent isolated pixels in the connected areas, identify pseudo foreground areas in the connected areas based on the isolated pixels, and remove the areas to be filtered in the pseudo foreground areas whose area values ​​are less than a preset number of pixels.

[0238] In this embodiment, the recognition module 10 recognizes the corresponding image data from the advertising exhibition image based on the pre-uploaded advertising exhibition image, and the image data specifically includes foreground target data and background data, and then the judgment module 20 judges whether the image data detects the preset color overlap to execute the corresponding steps; for example, when the system determines that the preset color overlap is not detected in the image data, the system will believe that there is no significant similarity in the color distribution between the foreground target and the background in the image, and the target and the background can be clearly distinguished. The system will directly perform target recognition and target area extraction without complex color overlap processing, and can rely more on other features for target recognition. The target extraction, such as shape, structure and position, is further optimized through image segmentation, edge detection, morphological operations, etc., and a simple threshold segmentation, region growth or connected domain detection method can be used to directly extract the foreground target area from the image without using complex color matching or overlap detection technology. The target area can be quickly identified and separated to perform further target analysis or feature extraction; for example, when the system determines that a preset color overlap is detected in the image data, the execution module 30 will consider that there is a significant similarity in the color distribution between the foreground target and the background in the image, and the system will perform image segmentation on the advertising exhibition image, divide the corresponding area information in the image data, and the area The information specifically includes the target area and the background area. The pixel difference measurement between the pixel value of the current image frame and the preset background model is calculated from the area information. According to different pixel difference measurements, the difference pixel points of the area information are marked. The system can further quantify the difference between the target and the background by calculating the difference measurement between each pixel value in the image data and the preset background model. This process helps to identify the target and the background. Although there is overlap in color, by measuring the difference, the system can more accurately distinguish the target area, even if there is a similar color or texture in the background. At the same time, the marking of the difference pixel points can help the system accurately extract the target area, especially when the background and the target color are similar. Pixel points serve as the boundary between the target and the background, and can accurately distinguish the foreground target and the background. By marking the difference pixels, the system can filter out noise or irrelevant areas with similar colors to the background, reducing false detections. In addition, in the case of color overlap, the system relies on calculating the difference between the pixel and the background model, and can distinguish the difference between the target area and the background in detail, overcoming the limitations of the traditional simple method based on color matching. Through these meticulous steps, the system can not only identify the background area, but also accurately locate the target. Even if the colors of the background and the target are similar, the accuracy of target detection can still be guaranteed. Then the second judgment module 40 judges whether the field information of the difference pixels can be matched continuously to execute the corresponding steps.For example, when the system determines that the domain information of the difference pixels can be matched continuously, the system will consider that the difference pixels in the image constitute a coherent and continuous area. Usually, this area represents a foreground target, not noise or isolated points in the background. The system will mark these continuous areas as a foreground target area. This step is the key to target recognition and extraction. Through the connected domain analysis, these difference pixels are clustered into a connected area, which can more accurately outline the boundary of the target area and further improve the accuracy of target recognition. At the same time, the target tracking operation is performed. The system can track these continuous areas in multiple image frames to maintain the recognition of the target. This step is particularly important in video surveillance or real-time advertising display, and perform deeper analysis, such as target size analysis, shape analysis, color analysis, etc., to further extract the characteristic information of the target, which is very valuable for applications such as advertising display and target monitoring. For example, when the system determines that the domain information of the difference pixels cannot be matched continuously, the second execution module 50 will consider that the difference pixels in the image cannot be continuous and may belong to noise or isolated points in the background. The system will cluster these difference pixels into connected areas. In these connected areas Detect non-adjacent isolated pixels in the image processing system, identify the pseudo foreground area in the connected area based on the isolated pixels at different positions, and remove the area to be filtered in the pseudo foreground area whose area value is less than the preset number of pixels; the system further identifies the pseudo foreground area (such as isolated small area) by clustering these difference pixels into connected areas. The system can effectively remove meaningless noise and ensure that the remaining target area is not disturbed by noise. This step can avoid misidentification and missed identification and improve the accuracy of target detection. At the same time, through the strategy of clustering and removing small pseudo foreground areas, the system can still maintain strong robustness in a noisy environment. Even if the target area overlaps or is similar to the background, the system can still accurately separate and identify the target, reduce background interference, and improve the stability of image processing. In addition, by clustering the connected areas and removing isolated noise pixels from them, the system can more accurately extract the target area. This step eliminates irrelevant small areas and noise to ensure that only coherent target areas are retained, which helps to improve the accuracy of target recognition and segmentation. The accurate recognition of the target area can provide higher quality input data for subsequent analysis (such as target classification, tracking, segmentation, etc.). ;

[0239] In this embodiment, it also includes:

[0240] An extraction module, used for applying a preset convolutional neural network to extract hierarchical features of the advertising exhibition image, and generating corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color;

[0241] A third judgment module is used to judge whether the candidate area matches a preset area category, wherein the area category specifically includes a category label and a position of the target;

[0242] The third execution module is used to, if yes, construct a segmentation mask corresponding to the candidate area through a preset mask branch, align the segmentation mask with the preset target bounding box of the advertising exhibition image, and combine the target bounding box with the segmentation mask, and divide the pixel-level segmentation of each target object in the advertising exhibition image according to the alignment result and the combination result.

[0243] In this embodiment, the system applies a pre-set convolutional neural network to extract hierarchical features of the advertising exhibition image. The hierarchical features specifically include shape, texture and color. Based on these hierarchical features, corresponding candidate areas are generated. Then the system determines whether these candidate areas match the pre-set area categories. The area categories specifically include the category label and position of the target, so as to execute the corresponding steps. For example, when the system determines that the candidate area corresponding to the hierarchical features cannot match the pre-set area category, the system will consider that the candidate area does not contain the target, or the contained target does not match the expected category. The system will adjust the output threshold of the convolutional neural network, improve the quality of the candidate area by optimizing the algorithm, and use more The features of different types, such as multi-scale features or adaptive convolutional networks commonly used in deep learning, are used to enhance the robustness of target features. At the same time, non-maximum suppression methods are used to remove redundant or overlapping candidate regions to ensure that each candidate region corresponds to only one target category. Multi-task learning is introduced, combining position regression and category recognition tasks to improve the accuracy of the model in position and category matching. If the model cannot effectively match the category label under specific environments or conditions (such as uneven lighting, angle changes, etc.), the adaptability of the model to diverse targets can be enhanced by increasing the training data sets under different environmental conditions. For example, when the system determines that the candidate region corresponding to the hierarchical feature generation can match the category of the pre-set region, at this time The system will consider that the candidate area meets expectations, and will construct a segmentation mask corresponding to the candidate area through a pre-set mask branch, align the segmentation mask with the pre-set target bounding box of the advertising exhibition image, and combine the target bounding box with the segmentation mask. According to the alignment result and the combination result, the pixel-level segmentation of each target object in the advertising exhibition image is divided; by aligning the generated candidate area with the target bounding box and combining it with the segmentation mask, the system can achieve pixel-level target segmentation, which means that the target can not only be accurately identified, but also its shape and boundary in the image can be accurately determined, ensuring that the separation of the target object from the background is more refined and accurate, and combining the segmentation mask with the target bounding box , which helps to refine the classification results of the candidate area. By aligning the segmentation mask with the target bounding box, the system can further refine the position and shape of the target and optimize the detection results, thereby providing more accurate classification and positioning information. By generating a segmentation mask based on a pre-set mask branch and aligning the target bounding box, the target can be segmented quickly and accurately, which not only improves the segmentation accuracy, but also reduces redundant calculations, making the system have better real-time performance. By refining the pixel-level segmentation of the target, the system can not only perform static target recognition, but also provide accurate data support for subsequent target tracking. In the real-time display of advertising exhibitions, accurate target segmentation can effectively help track and analyze the behavior and changes of the target.

[0244] In this embodiment, the execution module further includes:

[0245] A construction unit, configured to construct a difference threshold of the pixel difference metric based on a preset feature dynamic of the advertising exhibition image;

[0246] A judging unit, configured to judge whether the pixel difference metric exceeds the preset pixel difference threshold;

[0247] The execution unit is used to, if so, mark each pixel point that is significantly different from the background according to the pixel difference metric, classify the pixel points into foreground pixels and background pixels, and dynamically update the current image change of the advertising exhibition image by applying a preset weighted average to the foreground pixels and the background pixels.

[0248] In this embodiment, the system constructs a difference threshold of pixel difference measurement based on the pre-set feature dynamics of the advertising exhibition image, and then the system determines whether these pixel difference measurements exceed the difference threshold of the pixel difference measurement to perform the corresponding steps; for example, when the system determines that the pixel difference measurement does not exceed the difference threshold of the pixel difference measurement, the system will consider that the pixels in the current area are very close to the background model and it is difficult to distinguish the target from the background. The system will ignore these areas where the pixel difference measurement does not exceed the difference threshold and will not mark them as foreground targets to avoid mistakenly identifying the background as the target. By continuing to calculate the difference measurement of other areas, more accurate target areas are identified. At the same time, the threshold parameters are adjusted to appropriately lower the threshold to enhance the recognition ability of subtle differences, thereby improving the detection accuracy of foreground targets, and more features are introduced, such as motion information, texture information, color histogram, etc., to further verify whether the area belongs to the foreground target; for example, when the system determines that the pixel difference measurement exceeds the difference threshold of the pixel difference measurement, the system will consider that the pixels in the current area can be separated from the background model. The system will mark each pixel point that is significantly different from the background according to the pixel difference measurement, and divide these pixel points into The system classifies foreground pixels and background pixels, and dynamically updates the current image changes of the advertising exhibition image by applying a preset weighted average to the foreground pixels and the background pixels; the system reduces the risk of misidentification by clearly distinguishing the foreground and the background. For example, if the color or texture of the advertising content and the background in the image is quite different, it can help the system accurately identify the area of ​​the advertisement instead of misjudging the background as the target. At the same time, when the foreground pixels and the background pixels are updated by weighted averaging, the background model can be dynamically adjusted as the image changes, which enables the system to cope with the dynamic changes of the environment in the advertising exhibition image, such as changes in lighting, movement of background objects, etc., to maintain accurate recognition of the target. Moreover, by classifying and weighted averaging the foreground pixels, the system can not only identify the target, but also refine the boundary of the foreground area. The weighted average enables the system to smooth the transition between the foreground and the background, avoiding misjudgment or unclear boundaries caused by sudden pixel differences. By accurately marking the foreground pixels and dynamically updating the background, the system can reduce unnecessary calculations and only focus on the processing of the foreground area, which not only improves the detection accuracy, but also improves the processing speed. It is suitable for real-time or high-frequency updated advertising display systems.

[0249] In this embodiment, the second execution module further includes:

[0250] A verification unit, configured to perform field detection on pixels in the connected area based on a field relationship preset for the difference pixels, and verify the connection relationship of the pixels, wherein the field relationship specifically includes horizontal, vertical and diagonal adjacency;

[0251] A second judging unit, used to judge whether the connection relationship conforms to the domain relationship;

[0252] The second execution unit is used to apply a preset structure element to expand the pixel to obtain a foreground pixel overlapping with the pixel, and dynamically update the foreground area of ​​the advertising exhibition image according to the foreground pixel, wherein the structure element specifically includes a square, a circle and a cross.

[0253] In this embodiment, the system performs field detection on pixels in the connected area based on the pre-set field relationship of the difference pixels, which specifically includes horizontal, vertical and diagonal adjacency, to verify the connection relationship of these pixels, and then the system determines whether the connection relationship conforms to the pre-set field relationship to execute the corresponding steps; for example, when the system determines that the connection relationship of these pixels cannot conform to the pre-set field relationship, the system will consider that the segmentation of certain targets is discontinuous, resulting in some pixels being mistakenly marked as isolated points, then these isolated points cannot conform to the preset connection relationship, and the system will filter small areas and set a minimum area threshold. If the area of ​​a connected area is less than the threshold, , it is regarded as noise or isolated point and removed from the target area. At the same time, in the detection of connected areas, if pixels that do not conform to the domain relationship are detected, you can try to remove the isolated pixels that do not conform to the connection rules from the current area, or merge them into the adjacent area, readjust the target boundary through recursive search or graph cut algorithm (such as image segmentation method), correct the wrong segmentation, and use a variety of detection methods (such as color, texture, shape and other features) fusion, comprehensively consider the connectivity of different features, can effectively identify which are targets and which are backgrounds, and avoid mistaking background noise for foreground; for example, when the system determines that the connection relationship of these pixels can meet the pre-set domain relationship, then the system The system will consider that the pixels are continuous and connected, and there are no isolated points. The system will use the pre-set structural elements to expand these pixels. The structural elements specifically include square, circle and cross, to obtain the foreground pixels overlapping with these pixels, and dynamically update the foreground area of ​​the advertising exhibition image according to different foreground pixels; the system can identify the continuity of the target area by determining that the connection relationship of the pixels meets the preset domain rules, which means that the foreground target in the image is continuous in space, and will not cause the target area to be mis-segmented or broken due to noise or isolated points. Such processing ensures that the target area can completely cover the advertising content, avoids the wrong target separation and loss, and the expansion operation is also effective. By expanding the foreground pixels to the adjacent pixel area, the edge of the target area is made clearer. This is especially important for the complex background in the image, because the complex background may contain parts with texture, pattern or color similar to the target area, which may be mistakenly identified as the foreground, and different structural elements (square, circular, cross) are suitable for different image features. For example, the square structural element is suitable for regular rectangles or square targets, the circular structural element is suitable for circular targets, and the cross structural element is suitable for complex target shapes or areas with irregular edges. By flexibly applying different structural elements, the system can dynamically adjust the expansion strategy according to the shape and characteristics of the target to ensure accurate segmentation of the target area.

[0254] In this embodiment, the judgment module further includes:

[0255] A calculation unit, used for extracting color features of each pixel from the image data, comparing the color features with a preset target color range, and calculating the color overlap of each pixel;

[0256] A third judging unit, used to judge whether the color overlap degree reaches a preset threshold;

[0257] The third execution unit is configured to identify foreground pixels corresponding to the color overlap degree, and mark a corresponding foreground area from the image data based on the foreground pixels.

[0258] In this embodiment, the system extracts the color features of each pixel from the image data, compares these color features with a preset target color range to calculate the color overlap of each pixel, and then the system determines whether these color overlaps reach a preset threshold to execute the corresponding steps; for example, when the system determines that the color features of each pixel do not reach the preset threshold, the system will consider that there is a large difference between these pixels in the image and the predetermined target color range, which may indicate that these pixels belong to the background or do not meet the color features of the target. The system will further check other features (such as texture, shape, etc.), combine edge detection, shape analysis and other features to confirm the shape and boundary of the target, apply other types of feature matching or background modeling to the area where the pixel is located, and re-segment the entire area or recalibrate the target detection model, gradually converge to a more suitable target area, and appropriately relax the color range or adjust the threshold, adjust the target color range, and increase the threshold to include more pixels that may belong to the target area; for example, when the system determines that the color features of each pixel have reached a preset threshold, the system will consider These pixels in the image are almost the same as the predetermined target color. The system will identify the foreground pixels corresponding to the low and medium values ​​of these colors, and mark the corresponding foreground areas from the image data based on these foreground pixels. The system can accurately identify the foreground area that matches the target color in the image by comparing color features. For example, if a part of the advertising image is a preset red area, and the color features of the area match the threshold, the system will identify these pixels as belonging to the foreground. This precise color matching helps to efficiently locate the target area and avoid interference from irrelevant backgrounds. At the same time, through strict color threshold restrictions, the system can reduce the probability of misidentification. Only when the color of the pixel meets the characteristics of the target color will it be marked as a foreground pixel, which effectively avoids confusion with the background or other irrelevant objects and ensures that the target area is accurately segmented. Based on the identification of foreground pixels, the system can effectively delineate the target area and further perform pixel-level segmentation, which means that the targets in the advertising exhibition image (such as advertising slogans, commodities or specific elements) can be accurately extracted, providing accurate basic data for subsequent analysis or processing (such as content recognition, target tracking, etc.).

[0259] In this embodiment, the second determination module further includes:

[0260] A second calculation unit, configured to calculate the mean and variance of the difference pixel points based on the local area pre-divided by the advertising exhibition image;

[0261] A fourth judgment unit, used for judging whether the mean and the variance detect a preset fluctuation;

[0262] The fourth execution unit is used to identify the corresponding noise features from the difference pixels, dynamically adjust the difference threshold according to the noise features, and remove the falsely detected noise areas according to the difference threshold, wherein the noise features specifically include Gaussian noise, salt and pepper noise, and speckle noise.

[0263] In this embodiment, the system calculates the mean and variance of the difference pixels based on the local areas pre-divided by the advertising exhibition image, and then determines whether the mean and variance detect a preset fluctuation to execute the corresponding steps; for example, when the system determines that the mean and variance of the difference pixels do not detect a preset fluctuation, the system will consider that there is no noise area in these difference pixels, and the system will continue to monitor other areas where changes may exist. By expanding the detection range, the system can find changes in other areas to ensure complete foreground target detection, and at the same time regard these stable areas as background areas, ignore the influence of these areas in foreground detection, avoid invalid calculations, and help improve efficiency, because the system does not need to repeatedly process the background area, and although the difference pixels in the area do not show significant fluctuations, the system can still further verify whether there is a foreground target in the area through other features (such as shape, texture, edge, etc.), and can enhance the detection of foreground targets if necessary; for example, when the system determines that the mean and variance of the difference pixels detect a preset fluctuation, the system will consider that there is a noise area in these difference pixels, and the system will identify corresponding noise features from these difference pixels. The noise features specifically include Gaussian noise Gaussian noise, salt and pepper noise and speckle noise are detected by the system. The difference threshold is adjusted dynamically according to different noise characteristics, and the misdetected noise area is removed according to the difference threshold. By identifying and removing the noise area, the system can effectively eliminate the influence of Gaussian noise, salt and pepper noise and speckle noise on foreground detection, which helps to improve the accuracy of image segmentation and avoid misjudging noise as foreground targets or wrong background areas. At the same time, by dynamically adjusting the difference threshold according to different noise characteristics, the system can more accurately adapt to different types of noise influences. For areas with strong noise, the system can appropriately relax the threshold to reduce the possibility of noise being misjudged as foreground. For clearer areas, the system can strictly enforce the threshold limit to ensure more accurate foreground detection. After noise processing, the distinction between background and foreground in the image will be clearer. The system can more accurately identify the foreground target area and avoid misdetection or missed detection. Especially in complex advertising exhibition images, noise can easily affect the accurate recognition of the target. Timely noise removal helps accurate target segmentation. It can better cope with dynamically changing environments or other external interferences and improve robustness. Even if the image contains a certain degree of noise, the system can still accurately extract the target area and dynamically adjust the strategy to ensure efficient and stable target detection and segmentation.

[0264] In this embodiment, the identification module further includes:

[0265] An identification unit, used to apply a preset target detection algorithm to identify the target object category in the advertising exhibition image, wherein the target object category specifically includes products, texts and brand logos;

[0266] a fifth determination unit, configured to determine whether the target object category has preset advertising elements, wherein the advertising elements specifically include pattern, background and texture features;

[0267] A fifth execution unit is used to match the target object category to a preset advertising theme based on the advertising element, and divide the advertising exhibition image into corresponding advertising categories according to the advertising theme, wherein the advertising theme specifically includes a company logo, brand logo and product icon, and the advertising category specifically includes product advertising, promotional advertising and brand advertising.

[0268] In this embodiment, the system applies a preset target detection algorithm to identify the target object category in the advertising exhibition image, the target object category specifically includes products, text and brand logos, and then the system determines whether these target object categories have preset advertising elements, the advertising elements specifically include patterns, background and texture features, so as to execute corresponding steps; for example, when the system determines that the target object category in the advertising exhibition image does not have the preset advertising elements, the system will think that the target object may have a low relevance to the advertisement, or it is not a key component of the advertisement, the system will remove these target objects from the advertising detection results, and will not perform further advertising element analysis to avoid affecting the accuracy of subsequent advertising content recognition, and at the same time further process the occluded part in the image, and try to complete the missing advertising element information through image repair, image filling and other technologies, so as to improve the recognition accuracy of the advertising elements, and re-examine the classification rules and model training data of the target detection algorithm, and may need to optimize the algorithm, adjust the accuracy of target object classification, and reduce the situation of misidentification; for example, when the system determines that the target object category in the advertising exhibition image has the preset advertising elements, this When the system finds that the target object has a high correlation with the advertisement, the system will match the target object category to the pre-set advertisement theme based on these advertisement elements. The advertisement theme specifically includes the company logo, brand logo and product icon. The advertisement exhibition image is divided into corresponding advertisement categories according to different advertisement themes. The advertisement categories specifically include product advertisement, promotional advertisement and brand advertisement. By accurately identifying the advertisement elements, the system can better understand the advertisement content in the image and avoid misidentifying non-advertising elements as advertisements. The advertisement elements, as strong identification marks, help the system distinguish between advertisements and non-advertising areas to ensure the recognition accuracy of the target object. At the same time, by matching the advertisement theme based on the advertisement elements, the system can classify the advertisements more finely. The advertisements can be subdivided into different categories, such as product advertisements, promotional advertisements and brand advertisements. This can not only identify the advertisement content, but also understand the purpose and type of the advertisement. In addition, the advertisement exhibition images are divided according to the advertisement categories (such as product advertisements, promotional advertisements and brand advertisements), which can provide accurate classification data for subsequent advertisement effect analysis, trend analysis and consumer response analysis. This hierarchical advertisement analysis provides basic data for the evaluation of advertisement effect.

[0269] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for identifying and replacing target objects in advertising exhibition images, characterized in that: The following steps are involved: Based on the pre-uploaded advertising exhibition image, identifying corresponding image data from the advertising exhibition image, wherein the image data specifically includes foreground target data and background data; Determining whether a preset color overlap is detected in the image data; If yes, the advertisement exhibition image is segmented, the corresponding region information is divided in the image data, the pixel difference metric between the pixel value of the current image frame and the preset background model is calculated from the region information, and the difference pixel points of the region information are marked according to the pixel difference metric, wherein the region information specifically includes the target region and the background region; Determining whether the area information of the difference pixels can be matched continuously; If not, the difference pixels are clustered into connected areas, non-adjacent isolated pixels are detected in the connected areas, and based on the isolated pixels, the pseudo foreground areas in the connected areas are identified, and the areas to be filtered whose area values ​​in the pseudo foreground areas are less than a preset number of pixels are removed.

2. The target object recognition and replacement method of the advertising exhibition image according to claim 1, characterized in that: The step of segmenting the advertisement display image and dividing the corresponding area information in the image data also includes: Applying a preset convolutional neural network to extract hierarchical features of the advertising exhibition image, and generating corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color; Determine whether the candidate area matches a preset area category, wherein the area category specifically includes a category label and a position of the target; If so, a segmentation mask corresponding to the candidate area is constructed through a preset mask branch, the segmentation mask is aligned with the preset target bounding box of the advertising exhibition image, and the target bounding box is combined with the segmentation mask. According to the alignment result and the combination result, the pixel-level segmentation of each target object in the advertising exhibition image is divided.

3. The method for identifying and replacing target objects in advertisement exhibition images according to claim 1, characterized in that: The step of marking the difference pixels of the region information according to the pixel difference metric further includes: Based on the preset dynamic characteristics of the advertising exhibition image, constructing a difference threshold of the pixel difference measurement; Determining whether the pixel difference metric exceeds the preset pixel difference threshold; If so, then based on the pixel difference metric, each pixel that is significantly different from the background is marked, and the pixel points are classified into foreground pixels and background pixels. By applying a preset weighted average to the foreground pixels and the background pixels, the current image change of the advertising exhibition image is dynamically updated.

4. The method for identifying and replacing target objects in advertisement exhibition images according to claim 1, characterized in that: The step of clustering the difference pixels into connected areas and detecting non-adjacent isolated pixels in the connected areas further includes: Based on the preset domain relationship of the difference pixel points, performing domain detection on the pixels in the connected area to verify the connection relationship of the pixels, wherein the domain relationship specifically includes horizontal, vertical and diagonal adjacency; Determining whether the connection relationship conforms to the domain relationship; If so, a preset structural element is applied to expand the pixel to obtain a foreground pixel overlapping with the pixel, and the foreground area of ​​the advertising exhibition image is dynamically updated according to the foreground pixel, wherein the structural element specifically includes a square, a circle and a cross.

5. The method for identifying and replacing target objects in advertisement exhibition images according to claim 1, characterized in that: The step of determining whether the image data detects a preset color overlap further includes: Extracting color features of each pixel from the image data, comparing the color features with a preset target color range, and calculating the color overlap of each pixel; Determining whether the color overlap reaches a preset threshold; If so, the foreground pixels corresponding to the color overlap are identified, and based on the foreground pixels, the corresponding foreground areas are marked from the image data.

6. The method for identifying and replacing target objects in advertisement exhibition images according to claim 1, characterized in that: The step of determining whether the area information of the difference pixels can be matched continuously also includes: Calculating the mean and variance of the difference pixel points based on the pre-divided local area of ​​the advertising exhibition image; Determining whether the mean and the variance detect a preset fluctuation; If so, the corresponding noise features are identified from the difference pixels, the difference threshold is dynamically adjusted according to the noise features, and the falsely detected noise areas are removed according to the difference threshold, wherein the noise features specifically include Gaussian noise, salt and pepper noise, and speckle noise.

7. The method for identifying and replacing target objects in advertisement exhibition images according to claim 1, characterized in that: The step of identifying corresponding image data from the pre-uploaded advertisement exhibition image further includes: Applying a preset target detection algorithm to identify target object categories in the advertising exhibition image, wherein the target object categories specifically include products, texts, and brand logos; Determining whether the target object category has preset advertising elements, wherein the advertising elements specifically include pattern, background and texture features; If so, based on the advertising elements, the target object category is matched to a preset advertising theme, and the advertising exhibition image is divided into corresponding advertising categories according to the advertising theme, wherein the advertising theme specifically includes a company logo, brand logo and product icon, and the advertising category specifically includes product advertising, promotional advertising and brand advertising.

8. A target object recognition and replacement system for advertising exhibition images, characterized in that: include: A recognition module, used to recognize corresponding image data from the pre-uploaded advertising exhibition image, wherein the image data specifically includes foreground target data and background data; A determination module, used for determining whether a preset color overlap is detected in the image data; an execution module, configured to, if yes, perform image segmentation on the advertisement exhibition image, divide corresponding region information in the image data, calculate a pixel difference metric between a pixel value of a current image frame and a preset background model from the region information, and mark the difference pixel points of the region information according to the pixel difference metric, wherein the region information specifically includes a target region and a background region; A second judgment module is used to judge whether the area information of the difference pixels can be matched continuously; The second execution module is used to cluster the difference pixels into connected areas if not possible, detect non-adjacent isolated pixels in the connected areas, identify the pseudo foreground areas in the connected areas based on the isolated pixels, and remove the areas to be filtered in the pseudo foreground areas whose area values ​​are less than a preset number of pixels.

9. The target object recognition and replacement system for advertising exhibition images according to claim 8, characterized in that: Also includes: An extraction module, used for applying a preset convolutional neural network to extract hierarchical features of the advertising exhibition image, and generating corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color; A third judgment module is used to judge whether the candidate area matches a preset area category, wherein the area category specifically includes a category label and a position of the target; The third execution module is used to, if yes, construct a segmentation mask corresponding to the candidate area through a preset mask branch, align the segmentation mask with the preset target bounding box of the advertising exhibition image, and combine the target bounding box with the segmentation mask, and divide the pixel-level segmentation of each target object in the advertising exhibition image according to the alignment result and the combination result.

10. The target object recognition and replacement system for advertising exhibition images according to claim 8, characterized in that: The execution module also includes: A construction unit, configured to construct a difference threshold of the pixel difference metric based on a preset feature dynamic of the advertising exhibition image; A judging unit, configured to judge whether the pixel difference metric exceeds the preset pixel difference threshold; The execution unit is used to, if so, mark each pixel point that is significantly different from the background according to the pixel difference metric, classify the pixel points into foreground pixels and background pixels, and dynamically update the current image change of the advertising exhibition image by applying a preset weighted average to the foreground pixels and the background pixels.

Citation Information

Patent Citations

  • Improved visual background extraction based movement target detection method

    CN104392468A

  • Identification camera capable of automatically carrying out portrait cutout and method thereof

    CN105184787A

  • Image processing method and apparatus, mobile terminal, and computer readable storage medium

    CN108961302A

  • Moving object detection method and system, computing device and storage medium

    CN109859236A

  • Target pose estimation method, electronic equipment and medium

    CN110363817A

Cited By

  • Microorganism shielding identification method, system, equipment and medium

    CN121437898A