Generative model training method and device and image processing method and device
By determining category labels based on attribute and quality information and training a generative model, the problems of low efficiency and high cost in existing sign recognition technologies are solved, achieving efficient and accurate sign target recognition and screening.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies for signboard target recognition and screening suffer from low efficiency of end-to-end binary classification models and high costs of manual post-processing, making it difficult to efficiently identify and screen effective signsboards.
By using attribute and quality information from sample signboard images, category labels are determined, and a generative model is used for training to improve the model's ability to perceive different categories, including the accuracy of identifying extracted and non-extracted categories.
This improved the accuracy and generalization performance of the generative model in recognizing signs, reduced the need for manual intervention, and lowered the recognition cost.
Smart Images

Figure CN121767780A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, specifically to the fields of large models, autonomous driving, and intelligent transportation, and in particular to a generative model training and image processing method and apparatus. Background Technology
[0002] In the production of map POI (Point of Interest) data, there are two main technical solutions for the identification and screening of signs: one is an end-to-end binary classification model screening solution, which adds a binary classification model after target detection to distinguish between valid and invalid signs; the other is a high-cost solution that relies entirely on manual post-processing, which loosely sets the detection algorithm to screen with high recall and then manually performs quality inspection and labeling one by one. Summary of the Invention
[0003] This disclosure provides a generative model training method, image processing method, apparatus, device, and storage medium.
[0004] In a first aspect, embodiments of this disclosure provide a generative model training method, the method comprising: determining a category label for a sample signboard image based on attribute information and quality information, wherein the category label is one of one or more non-extractable category labels among a plurality of extracted category labels; and training a generative model based on the sample signboard image and the category label.
[0005] Secondly, embodiments of this disclosure provide a method for processing a target signboard image, the method comprising: inputting a target signboard image to be processed into a generation model to generate a target category of the target signboard image, wherein the generation model is a generation model obtained by the method described in any implementation of the first aspect above; and performing signboard extraction processing on the target signboard image in response to determining that the target category is an extraction category.
[0006] Thirdly, embodiments of this disclosure provide a generative model training apparatus, which includes a construction module and a training module. The construction module can be configured to determine the category label of the sample signboard image based on the attribute information and quality information of the sample signboard image. The category label is one of one or more non-extractable category labels among a plurality of extracted category labels. The training module can be configured to train the generative model based on the sample signboard image and the category label.
[0007] Fourthly, embodiments of this disclosure provide an image processing apparatus, which includes a generation module and a processing module. The generation module is configured to input a target sign image to be processed into a generation model to generate a target category of the target sign image. The processing module is configured to perform sign extraction processing on the target sign image in response to determining that the target category is an extraction category.
[0008] Fifthly, embodiments of this disclosure provide an electronic device including one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first or second aspect.
[0009] In a sixth aspect, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon that, when executed by a processor, implements the method as described in either the first or second aspect.
[0010] In a seventh aspect, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method as described in either the first or second aspect.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0012] Figure 1 This is an exemplary system architecture diagram to which this disclosure can be applied; Figure 2 This is a flowchart of an embodiment of the generative model training method according to the present disclosure; Figure 3 This is a flowchart of yet another embodiment of the generative model training method according to the present disclosure; Figure 4 This is a schematic diagram of an application scenario of the generative model training method according to this disclosure; Figure 5 This is a flowchart of another embodiment of the image processing method according to the present disclosure; Figure 6 This is a schematic diagram of one embodiment of a generative model training apparatus according to the present disclosure; Figure 7 This is a schematic diagram of an embodiment of an image processing apparatus according to the present disclosure; Figure 8 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present disclosure. Detailed Implementation
[0013] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0014] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0015] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the generative model training methods of this disclosure can be applied.
[0016] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0017] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc.
[0018] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.
[0019] Server 105 can be a server that provides various services, such as determining the category label of the sample sign image based on the attribute information and quality information of the sample sign image, where the category label is one of one or more non-extractable category labels among multiple extracted category labels; and training the generative model based on the sample sign image and the category label.
[0020] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide generative model training services), or as a single software program or software module. No specific limitations are made here.
[0021] It should be noted that the generative model training method provided in the embodiments of this disclosure can be executed by server 105, terminal devices 101, 102, and 103, or by server 105 and terminal devices 101, 102, and 103 in cooperation with each other. Accordingly, all parts (e.g., units, sub-units, modules, and sub-modules) of the generative model training device can be entirely located in server 105, entirely located in terminal devices 101, 102, and 103, or separately located in server 105 and terminal devices 101, 102, and 103.
[0022] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0023] Figure 2 A flow 200 illustrating an embodiment of a generative model training method is shown. This generative model training method may specifically include the following steps: Step 201: Determine the category label of the sample signboard image based on its attribute and quality information.
[0024] In this embodiment, the sample signboard image can be any image that includes a signboard.
[0025] Specifically, depending on the source, sample signboard images can be categorized into several types. For example, human-sourced images are those captured by handheld devices (mobile phones, cameras) or drones around the store; surveillance-sourced images are those captured by cameras such as city road surveillance, business district security surveillance, and store surveillance cameras; and vehicle-sourced images are high-definition partial images of signs captured by vehicle-mounted acquisition devices (such as dashcams or close-up shots from street view acquisition vehicles).
[0026] Executing entity (e.g., Figure 1 The server 105 or terminal devices 101, 102, 103 can directly determine the category label of the sample signboard image based on the attribute information and quality information of the sample signboard image; alternatively, the signboard area of the sample signboard image can be determined first, and then the category label of the sample signboard image can be determined based on the attribute information and quality information of the signboard area. This application does not limit this.
[0027] Here, the execution entity determines the category label of the sample sign image based on its attribute information and quality information in various ways. For example, it can combine one or more of the attribute information and one or more of the quality information of the sample sign image to determine the category label; or it can determine the corresponding identifiers of one or more of the attribute information and one or more of the quality information of the sample sign image as the category label, and so on.
[0028] The attribute information of the sample signboard images may include the number of signs, whether they are associated with real stores, whether they include signboard names, and the type of signboard names; the quality information of the sample signboard images may include whether the signboard names are complete, whether the signboard names are obscured, and the degree of obscuration.
[0029] Specifically, multiple extractable tags may include: tags associated with a real store and having a single signboard, tags associated with a real store including the signboard name; multiple non-extractable tags may include: tags not associated with a real store but with the complete signboard name, tags associated with a real store but with an incomplete signboard name, etc.
[0030] Step 202: Train the generative model based on the sample signboard images and category labels.
[0031] In this embodiment, the executing entity can input the sample sign image into the generative model to generate a predicted category; construct a loss function based on the predicted category and category label; and train the generative model based on the loss function until the training completion condition is met.
[0032] Here, the conditions for training completion can include a variety of factors, such as training time exceeding a preset duration, training attempts exceeding a preset number of attempts, and the loss value calculated using the loss function being less than a loss value threshold.
[0033] The generative model can be any model used to generate predicted categories, such as CNN (Convolutional Neural Network) or LLM (Large Language Model).
[0034] Convolutional neural networks (CNNs) are deep learning models specifically designed to process data with a grid structure, such as images. They can include convolutional layers (for extracting local features), pooling layers (for dimensionality reduction), and fully connected layers (for classification output).
[0035] Large language models typically have a large number of parameters and learn the structure and semantics of language by training on large amounts of text data. A large language model can include an input layer, an embedding layer, an encoder / decoder, a feedforward neural network, and an output layer.
[0036] The input layer decomposes the input information into tokens and maps them to token identifiers, which are then input into the embedding layer. The embedding layer transforms the token identifiers into low-dimensional dense vectors and adds positional encoding to obtain processed data, which is then input into the encoder / decoder. The encoder / decoder uses a multi-layered stacked attention mechanism and feedforward neural network to deeply mine the contextual semantic relationships of the text, and inputs the mined data into the feedforward neural network. The feedforward neural network performs nonlinear transformations on the mined data and inputs the nonlinearly transformed data into the output layer. The output layer uses a linear layer and a softmax function to transform the nonlinearly transformed data into a token probability distribution, and uses the token with the highest probability as the generated result.
[0037] The embodiments of this disclosure determine the category label of the sample signboard image based on the attribute and quality information of the sample signboard image. The category label is one of one or more non-extractable category labels among multiple extracted category labels. Based on the sample signboard image and the category label, the generative model is trained, that is, the generative model is trained with multiple sample signboard images of different extracted categories and different non-extractable category samples. This helps to enhance the generative model's ability to perceive subtle differences between different extracted categories and different non-extractable categories, and effectively improves the model's generalization performance and recognition accuracy.
[0038] Further reference Figure 3 It shows Figure 2 The flowchart 300 shows another embodiment of the generative model training method. In this embodiment, the generative model training method flowchart 300 may include the following steps: Step 301: Determine the category label of the sample signboard image based on the attribute information and quality information of the sample signboard image.
[0039] In this embodiment, the implementation details and technical effects of step 301 can be found in the description of step 201, and will not be repeated here.
[0040] In some optional approaches, attribute information may include at least one of the following: whether it has a point of interest attribute, whether it is associated with a real store, and whether it includes a sign name; quality information may include at least one of the following: whether the sign name is complete, whether the sign name is obscured, whether the sign name is incomplete, and whether the sign has image quality issues.
[0041] In this implementation, whether the sample sign image has point of interest attributes, that is, whether the sign in the sample sign image has the core features of a point of interest in a geographic information system, can be determined by whether the sign is associated with accurate spatial location information (such as latitude and longitude coordinates, street address, business district, etc.) and corresponding commercial service information (such as store category, business scope, service level, etc.).
[0042] Specifically, sample sign images with point-of-interest attributes may include shop sign images, company sign images, etc.; sample sign images without point-of-interest attributes may include mobile vendor light signs, directional signs, advertising signs, bus stop signs, construction signs, honor plaques, couplets, etc.
[0043] Whether the sample signboard image is associated with a real store, that is, whether the sample signboard image contains key elements that reflect the offline physical business premises, can be judged by whether the sample signboard image contains elements such as storefronts, doors and windows.
[0044] Specifically, sample sign images associated with real stores may include images of signs erected on the road and located on both sides of the road with actual storefronts, and images of signs installed on buildings with actual storefronts, etc.; sample sign images not associated with real stores may include images of signs erected on the road and located on both sides of the road without actual storefronts, and images of signs installed on buildings without actual storefronts, etc.
[0045] Whether the sample sign image includes the sign name, that is, whether the sample sign image contains the core text information of the sign, can be determined by whether there are identifiable characters in the sign image and whether the characters have the identification attributes of the store, enterprise, or other entities.
[0046] Specifically, sample sign images that include the sign name may include street-front shop signs with the full name of the store, office building signs with the company name, chain store signs with the brand name, etc.; sample sign images that do not include the sign name may include decorative sign images that only display the image, pure symbol signs without any text content, etc.
[0047] Whether the name of the sign in the sample sign image is complete, that is, whether the text information in the sign area is complete and without omission, and whether it can completely restore the standard name of the sign. The specific judgment criteria can be at least one of the following: whether the character coverage of the text content reaches 100%, whether the font, font size and arrangement order of the text are consistent with the officially released standard name, and whether there are any problems such as stroke truncation, missing fields, or omission of key information.
[0048] Specifically, sample signboard images with complete signboard names may include store signboard images that clearly display the full name of "XX Catering Management Co., Ltd. XX Road Branch", chain store signboard images that fully present the brand's standard name and suffix, etc.; sample signboard images with incomplete signboard names may include corporate logo images that are missing the regional suffix due to layout limitations, street-facing signboard images with keywords truncated, etc.
[0049] Whether the sign name in the sample sign image is obscured, that is, whether the text area of the sign is obscured by external objects, making some or all of the text information unrecognizable. The specific criteria for judgment can be whether there are dynamic or static obstacles covering the character area of the sign name, and whether the obscured area affects the integrity of the text content.
[0050] Specifically, sample sign images with obscured names may include shop signs with some text obscured by street trees, corporate signs with core characters obscured by construction barriers, and street-facing signs with some characters obscured by passing vehicles or pedestrians; sample sign images with unobstructed names may include store signs with no external obstruction and completely exposed text areas, and office building signs with unobstructed installation locations.
[0051] Whether the name of the sign in the sample sign image is incomplete, that is, whether the text information is damaged due to the physical defects of the sign itself. The specific judgment criteria can be whether the text has problems such as broken strokes, missing characters, or blurred text due to the sign panel corrosion, fading and peeling of the lettering, damage from external impact, installation deformation, etc., and the defect is not related to the obstruction by external objects.
[0052] Specifically, sample sign images with incomplete sign names may include old store signs with some lettering falling off due to panel aging, corporate logos with damaged text areas due to external impacts, and street-facing signs with faded and blurred lettering due to long-term exposure to sunlight; sample sign images with complete sign names may include newly installed store signs with clear and complete lettering and no physical damage, and well-maintained brand chain signs without fading or peeling.
[0053] The presence of image quality issues in the sample sign images, i.e., whether the sign images acquired by the street view acquisition equipment have technical defects that affect subsequent recognition and analysis, can be determined based on whether the images have problems such as insufficient clarity (low resolution, blurred text edges), abnormal lighting (overexposure in strong light, noise in weak light, shadows in backlight), color reproduction distortion (color cast, fading), motion blur (equipment shaking, movement of the shooting target), and weather noise interference (rain, snow, fog, haze).
[0054] Specifically, sample sign images with image quality issues may include sign images with severe noise taken in low-light conditions at night, street-facing sign images with a blurry image taken on a rainy day, motion-blurred images with blurred text edges taken when the device is moving, and sign images with overexposed text areas due to direct strong light; sample sign images without image quality issues may include high-definition sign images with sufficient lighting, adequate resolution, sharp text edges, and accurate color reproduction.
[0055] This approach helps improve the richness of generated category tags by considering one or more of the following factors: whether the tag has a point of interest attribute, whether it is associated with a real store, whether it includes a signboard name, whether the signboard name is complete, whether the signboard name is obscured, and whether the signboard name is incomplete.
[0056] In some alternative approaches, the category label of the sample sign image is determined based on the attribute and quality information of the sample sign image, including: in response to the attribute and quality information of the sample sign image meeting the extraction criteria, determining the category label of the sample sign image as one of multiple extracted category labels.
[0057] In this implementation, the executing entity can determine whether the attribute information and quality information of the sample signboard image meet the extraction conditions. If so, the category label of the sample signboard image can be determined as one of the multiple extraction category labels.
[0058] The extraction criteria may include having point of interest attributes, being associated with real stores, including the sign name, having a complete sign name, having an unobstructed sign name, having an incomplete sign name, and having no image quality issues.
[0059] This implementation takes into account extraction conditions, improving the precision of the generated samples with extracted category labels.
[0060] In some alternative approaches, multiple extraction class tags can include multi-sign tags, single-sign tags, and logo tags.
[0061] In this implementation, the executing entity can determine whether the attribute information and quality information of the sample signboard image meet the extraction conditions. If so, the category label of the sample signboard image can be determined to be one of the multiple signboard label, single signboard label, and logo label.
[0062] Specifically, if the attribute information and quality information of the sample sign image meet the extraction conditions, and the sample sign image includes multiple signs, then the category label of the sample sign image can be determined as a multi-sign label; if the attribute information and quality information of the sample sign image meet the extraction conditions, and the sample sign image includes one sign, then the category label of the sample sign image can be determined as a single-sign label; if the attribute information and quality information of the sample sign image meet the extraction conditions, and the sample sign image does not include any signs, then the category label of the sample sign image can be determined as a sign label.
[0063] This implementation takes into account the extraction conditions and the number of signs, improving the precision and richness of the generated samples with extracted category labels.
[0064] In some alternative approaches, determining the category label of a sample sign image as one of a plurality of extracted category labels includes: determining the category label of the sample sign image as a multi-sign label in response to determining that the sample sign image includes multiple signs, and at least one of the multiple signs has a proper name and / or a generic name; determining the category label of the sample sign image as a single-sign label in response to determining that the sample sign image includes one sign, and the sign has a proper name and / or a generic name; and determining the category label of the sample sign image as a sign label in response to determining that the sample sign image does not include signs but includes signs.
[0065] In this implementation, if it is determined that the sample sign image includes multiple signs, and one or more of the multiple signs have a specific name and / or a general name, then the category label of the sample sign image can be determined as a multi-sign label.
[0066] Specifically, a proprietary name is used to indicate a name unique to a particular brand or enterprise, possessing uniqueness and trademark attributes. A generic name is used to indicate the industry category or service nature of a business, and is not exclusive.
[0067] If it is determined that a sample sign image contains a single sign, and that sign has a specific name and / or a generic name, then the category label for the sample sign image can be determined as the single sign label.
[0068] If it is determined that the sample signboard image does not contain a signboard but includes a logo, then the category label for the sample signboard image is determined to be the logo label.
[0069] A logo is a visual symbol or design used to represent a brand, company, or organization. It can be in textual, graphic, or a combination of both.
[0070] This implementation takes into account extraction conditions, the number of signs, and the content of the signs, thus improving the accuracy of the samples labeled with extraction category tags.
[0071] In some alternative approaches, determining the category label of the sample sign image based on its attribute and quality information includes: in response to the sample sign image's attribute and quality information not meeting at least one of the extraction criteria, determining the category label of the sample sign image as one of a plurality of non-extractable category labels.
[0072] In this implementation, the executing entity can determine whether the attribute information and quality information of the sample sign image meet the extraction conditions. If the attribute information and quality information of the sample sign image do not meet at least one of the extraction conditions, the category label of the sample sign image can be determined to be one of multiple non-extractable category labels.
[0073] The name of the non-extraction label can be associated with one or more of the extraction conditions that the attribute information and quality information of the sample signboard image do not meet. For example, the name of the non-extraction label can be determined directly based on the name of one or more of the extraction conditions that do not meet the conditions; or the name of the non-extraction label can be determined based on the numbers, English letters, punctuation marks or special symbols that correspond to one or more of the extraction conditions that do not meet the conditions.
[0074] Specifically, if the attribute information and quality information of the sample signboard image do not meet two of the extraction conditions, such as having point of interest attributes and being associated with a real store, then the name of the non-extraction label of the sample signboard image can be determined as "not having point of interest attributes and not associated with a real store". If the attribute information and quality information of the sample signboard image do not meet four of the extraction conditions, such as being associated with a real store, including the signboard name, having a complete signboard name, and having an unobstructed signboard name, and the identifier corresponding to being associated with a real store, including the signboard name, having a complete signboard name, and having an unobstructed signboard name is 4, then the non-extraction label of the sample signboard image can be determined as 4.
[0075] This implementation takes into account extraction conditions, improving the precision and richness of the generated samples labeled with non-extracted class tags.
[0076] In some optional approaches, multiple non-extractable tags may include: tags that do not have point of interest attributes, tags that are not associated with real stores, tags that do not include signboard names, tags with incomplete signboard names, tags with obscured signboard names, and tags with image quality issues.
[0077] In this implementation, the name of the non-extraction class label can be associated with one or more of the extraction conditions that the attribute information and quality information of the sample signboard image do not meet. For example, it may be a label that does not have a point of interest attribute, is not associated with a real store label, does not include a signboard name label, has an incomplete signboard name label, has an obscured signboard name, or has an image quality problem label.
[0078] Specifically, for example, if the attribute information and quality information of the sample signboard image do not meet at least one of the extraction conditions, such as having a point of interest attribute, then the category label of the sample signboard image can be determined as "not having a point of interest attribute"; if the attribute information and quality information of the sample signboard image do not meet at least one of the extraction conditions, such as being associated with a real store, then the category label of the sample signboard image can be determined as "not associated with a real store"; if the attribute information and quality information of the sample signboard image do not meet at least one of the extraction conditions, such as including the signboard name, then the category label of the sample signboard image can be determined as "not including the signboard name". Labels; if the attribute information and quality information of the sample sign image do not meet at least one of the extraction conditions, such as the sign name being complete, then the category label of the sample sign image can be determined as the "incomplete sign name" label; if the attribute information and quality information of the sample sign image do not meet at least one of the extraction conditions, such as the sign name being unobstructed, then the category label of the sample sign image can be determined as the "obstructed sign name" label; if the attribute information and quality information of the sample sign image do not meet at least one of the extraction conditions, such as the "no image quality problem" label, then the category label of the sample sign image can be determined as the "image quality problem" label.
[0079] For example, if the attribute and quality information of a sample signboard image does not have a point of interest attribute, then the category label of the sample signboard image can be determined as "no point of interest attribute label"; if the attribute and quality information of a sample signboard image has a point of interest attribute but is not associated with a real store, then the category label of the sample signboard image can be determined as "not associated with a real store label"; if the attribute and quality information of a sample signboard image has a point of interest attribute and is associated with a real store, but does not include the signboard name, then the category label of the sample signboard image can be determined as "does not include the signboard name label"; if the attribute and quality information of a sample signboard image has a point of interest attribute and is associated with a real store, If the sample signboard image includes a signboard name, but the name is incomplete, then its category label is "Incomplete Signboard Name". If the sample signboard image's attribute and quality information includes point-of-interest attributes, is associated with a real store, includes a signboard name, and has a complete signboard name, but the name is obscured, then its category label is "Obscured Signboard Name". If the sample signboard image's attribute and quality information includes point-of-interest attributes, is associated with a real store, includes a signboard name, has a complete signboard name, and has no obscuration, but the name is incomplete, then its category label is "Incomplete Signboard Name". If the sample signboard image's attribute and quality information includes point-of-interest attributes, is associated with a real store, includes a signboard name, has a complete signboard name, no obscuration, and no incompleteness, but has image quality issues, then its category label is "Image Quality Issues".
[0080] This implementation takes into account all aspects of the extraction conditions, improving the precision and richness of the generated samples labeled with non-extracted class tags.
[0081] Step 302: Calculate the ratio of the first reference size to the longest side size of the sign area in the sample sign image.
[0082] In this embodiment, the executing entity can calculate the ratio of the first reference size to the longest side size of the sign area in the sample sign image.
[0083] The first reference size can be determined based on the field of view of the generative model for data processing. The field of view is used to indicate the spatial boundary range of the input data that the generative model can effectively perceive, analyze and process in a single forward inference process.
[0084] Here, the methods for determining the sign area in the sample sign image can include various approaches. For example, directly inputting the sample sign image into a preset recognition model to identify the sign area of the sample sign image; or inputting the sample sign image into a recognition model that matches the corresponding source to identify the sign area of the sample sign image, etc.
[0085] The recognition model that matches the source of the sample sign image can include multiple models, such as a first model corresponding to a human source, a second model corresponding to a surveillance source, and a second model corresponding to a vehicle source.
[0086] Here, the first model can be trained based on human-sourced signboard image samples, the second model can be trained based on surveillance-sourced signboard image samples, and the third model can be trained based on vehicle-sourced signboard image samples.
[0087] The recognition model can be any model used for object detection, such as the YOLO (You Only Look Once) model, large language models, etc.
[0088] Step 303: Expand the sign area based on the ratio.
[0089] In this embodiment, after determining the ratio of the first reference size to the longest side size of the sign area in the sample sign image, the executing entity can use the center point of the sign area as the center and expand outward along each side of the sign area to indicate the ratio, such as 5, 6, etc.
[0090] It should be noted that the implementing entity can preset a minimum ratio, such as 3, to ensure that even small signs can be observed within a sufficient range.
[0091] Specifically, the executing entity can calculate the ratio of the first reference size to the longest side size of the sign area in the sample sign image, and compare the calculated ratio with the minimum ratio. If the calculated ratio is greater than the minimum ratio, the sign area is expanded according to the calculated ratio. If the calculated ratio is less than or equal to the minimum ratio, the sign area is expanded according to the minimum ratio.
[0092] Furthermore, it should be noted that the expanded sign area must follow the boundary detection rules, that is, the expanded sign area must not exceed the boundary of the sample sign image.
[0093] Step 304: Crop the sample sign image according to the expanded sign area to obtain the target sample image including the sign area.
[0094] In this embodiment, the executing entity can crop the sample sign image based on the boundary parameters of the expanded sign area to obtain a target sample image that includes the expanded sign area.
[0095] Step 305: Train the generative model based on the target sample image and category label.
[0096] In this embodiment, the executing entity can input the target sample image into the generative model to generate a predicted category; construct a loss function based on the predicted category and category label; and train the generative model based on the loss function until the training completion condition is met.
[0097] Since the area of the signboard region in some sample signboard images is relatively small on the whole image, directly inputting the whole image into a large model would introduce too much irrelevant noise, interfering with the accurate recognition of the target signboard. The above embodiments of this disclosure determine the category label of the sample signboard image based on the attribute information and quality information of the sample signboard image; calculate the ratio of the first reference size to the longest side size of the signboard region in the sample signboard image; expand the signboard region based on the ratio; crop the sample signboard image according to the expanded signboard region to obtain the target sample image including the signboard region; and train the generation model based on the target sample image and the category label, that is, dynamically expand the signboard region based on the first reference size and the size of the signboard region, so that the size of the image input to the model is as close as possible to the optimal field of view for the model to process data, thereby improving the recognition accuracy of the trained model.
[0098] In some alternative approaches, cropping the sample sign image according to the expanded sign area to obtain a target sample image including the sign area includes: cropping the sample sign image according to the expanded sign area to obtain an intermediate sign image; and in response to determining that the size of the intermediate sign image is larger than a second reference size, reducing the intermediate sign image to the second reference size to obtain the target sample image.
[0099] In this implementation, the executing entity can use the boundary parameters of the expanded sign area as a basis to crop the sample sign image and obtain an intermediate sign image that includes the expanded sign area.
[0100] Furthermore, the executing entity can determine whether the size of the intermediate sign image is larger than the second reference size. If it is larger, a preset interpolation algorithm can be used to reduce the intermediate sign image to the second reference size to obtain the target sample image. If it is less than or equal to the second reference size, no processing is performed on the intermediate sign image.
[0101] The second baseline size can be determined based on the resource constraints of the generated model deployment. These resource constraints include, but are not limited to, the peak computing power of the deployment carrier, the upper limit of memory capacity, the threshold of video memory bandwidth, the data transfer rate, and other core hardware parameters.
[0102] Here, the interpolation algorithm can include a variety of algorithms, such as nearest neighbor interpolation algorithm, bilinear interpolation algorithm, LANCZOS (Lanczos algorithm), etc.
[0103] Among them, the Lanzos algorithm can better preserve edge details and texture information when the image is reduced through complex mathematical interpolation calculations. Compared with the nearest neighbor algorithm or bilinear interpolation algorithm, it can significantly reduce the blurring and jagged effects that may be introduced during the reduction process.
[0104] Furthermore, it should be noted that the implementing entity can make proportional adjustments to the intermediate sign image based on the second reference size. Proportional adjustments can maintain the original proportions and geometric features of the image to the greatest extent while controlling the overall size of the image.
[0105] This implementation avoids the loss of detail caused by directly zooming in or out of the entire image, and effectively controls the number of tokens input to the model (the model processing speed slows down as the number of input tokens increases), thus improving the speed and accuracy of model processing.
[0106] In some alternative approaches, the generative model is trained based on sample signboard images and category labels, including: replacing the category labels with corresponding numerical identifiers to obtain the replaced category labels; and training the generative model based on the sample signboard images and the replaced category labels.
[0107] In this implementation, the executing entity can replace the category label with the corresponding numerical identifier to obtain the replaced category label.
[0108] Specifically, the extractable tags can include multiple sign tags, single sign tags, and logo tags, with the corresponding numerical identifiers being 1, 2, and 3, respectively; the non-extractable tags can include: tags without point of interest attributes, tags not associated with real stores, tags excluding sign names, tags with incomplete names, tags with unobstructed sign names, and tags without image quality issues, with the corresponding numerical identifiers being 4, 5, 6, 7, 8, 9, and 10, respectively.
[0109] Furthermore, the implementing entity can train the generative model based on the sample signboard image and the replaced category label.
[0110] This implementation constructs a label mapping mechanism, which maps category labels to codes, or complex text labels to simplified numerical representations. On the one hand, this encourages the model's feature extraction layer to focus more on distinguishing the semantic features of different categories, rather than spending time learning the generation of label text. On the other hand, since the numerical labels are decoupled from the specific textual expressions, the model learns the essential differences between categories, rather than superficial lexical differences, which helps improve the model's generalization ability.
[0111] See also Figure 4 , Figure 4 This is a schematic diagram of an application scenario of the generative model training method according to this embodiment.
[0112] For the acquired sample signboard images, the executing entity can use a recognition model that matches the source of the sample signboard image (such as vehicle source, pedestrian source, etc.) to identify the signboard area of the sample signboard image. Furthermore, based on the attribute information and quality information of the signboard area of the sample signboard image, the category label of the sample signboard image is determined. The category label can be one or more non-extractable category labels from a plurality of extracted category labels.
[0113] Specifically, first, it is determined whether the attribute information and quality information of the sample signboard image 401 possesses the point of interest attribute 402. If it does not possess the point of interest attribute, the category label of the sample signboard image can be determined as the label "Does not possess the point of interest attribute" 403. If the attribute information and quality information of the sample signboard image possess the point of interest attribute, it is determined whether the sample signboard image is associated with a real store 404. If it is not associated with a real store, the category label of the sample signboard image can be determined as the label "Not associated with a real store" 405. If the attribute information and quality information of the sample signboard image possess the point of interest attribute and are associated with a real store, it is determined whether the sample signboard image includes the signboard name 406. If it does not include the signboard name, the category label of the sample signboard image can be determined as the label "Does not include the signboard name" 407. If the attribute information and quality information of the sample signboard image possess the point of interest attribute, are associated with a real store, and include the signboard name, the category label of the sample signboard image can be determined as follows: The name can be used to determine whether the name of the sample signboard image is complete 408. If the name is incomplete, the category label of the sample signboard image can be determined as "Incomplete Name" 409. If the attribute information and quality information of the sample signboard image have point of interest attributes, are associated with real stores, include the signboard name, and have a complete name, it can be determined whether the name of the sample signboard image is obscured 410. If the name is obscured, the category label of the sample signboard image can be determined as "Obscured Name" 411. If the attribute information and quality information of the sample signboard image have point of interest attributes, are associated with real stores, include the signboard name, have a complete name, and have no obscuration, it can be determined whether the name of the sample signboard image is incomplete 412. If the name is incomplete, the category label of the sample signboard image can be determined as "Incomplete Name" 413. If the attribute information and quality information of the sample signboard image have point of interest attributes, are associated with real stores, include the signboard name, the signboard name is complete, the signboard name is unobstructed, and the signboard name is not incomplete, it can be determined whether the sample signboard image has image quality problems 414. If there are image quality problems, the category label of the sample signboard image can be determined as the label of having image quality problems 415.
[0114] If there are no image quality issues, it can be further determined whether the sample sign image includes multiple signs 416. If the sample sign image includes multiple signs, and one or more of the multiple signs have a specific name and / or a common name, then the category label of the sample sign image can be determined as the multiple sign label 417. If the sample sign image includes one sign, and the sign has a specific name and / or a common name, then the category label of the sample sign image can be determined as the single sign label 418. If the sample sign image does not include signs, but includes signs, then the category label of the sample sign image can be determined as the sign label 419.
[0115] Furthermore, before inputting the sample signboard image into the generation model, the ratio of the first reference size to the longest side size of the signboard area in the sample signboard image can be calculated; based on the ratio, the signboard area is expanded; the sample signboard image is cropped according to the expanded signboard area to obtain an intermediate sample image including the signboard area; in response to determining that the size of the intermediate signboard image is greater than the second reference size, the intermediate signboard image is reduced to the second reference size to obtain the target sample image.
[0116] Further reference Figure 5 This illustrates a flow 500 of an embodiment of an image processing method. In this embodiment, the flow 500 of the image processing method may include the following steps: Step 501: Input the target sign image to be processed into the generation model to generate the target category of the target sign image.
[0117] In this embodiment, the target sign image to be processed can be any image containing a sign. The executing entity can directly input the target sign image into the generation model to generate the target category of the target sign image; alternatively, it can first perform preprocessing operations on the target sign image, and then input the preprocessed target sign image into the generation model to generate the target category of the target sign image.
[0118] The preprocessing operations can include various types, such as region detection, expansion according to a preset ratio, scaling based on a preset size, etc.
[0119] Specifically, the preprocessing operation may include: using a recognition model that matches the source of the target sign image to perform sign detection on the sign image and determine the sign area; expanding the sign area according to the ratio of the first reference size to the longest side size of the sign area, and cropping the target sign image according to the expanded sign area to obtain an image including the sign area; and processing the cropped image containing the sign area according to a second reference size, for example, if it is smaller than the second reference size, no processing is performed, and if it is larger than the second reference size, it is reduced to the second reference size to obtain the processed image.
[0120] Here, the generative model is as follows: Figure 2 , Figure 3 The generated model obtained by the method described in the corresponding embodiment will not be repeated here.
[0121] Step 502: In response to determining that the target category is the extraction category, perform sign extraction processing on the target sign image.
[0122] In this embodiment, if the target category of the target sign image is determined to be an extraction category, the target sign image can be processed for sign extraction to obtain sign data; if the target category of the target sign image is determined to be a non-extraction category, the target sign image can be left unprocessed for sign extraction.
[0123] The extracted signboard data can be further used for map point of interest updates, business analysis, and more.
[0124] In addition, among some alternative approaches, generative models can also be applied to the cleaning of historical non-POI data of maps.
[0125] Specifically, the implementing entity can pre-extract a portion of image samples that have been confirmed as "non-POI false points" (such as invalid locations corresponding to fake shop signs) from the massive amount of sign images already available on the map; then analyze the common characteristics of these image samples, such as the source of data collection, whether there are abnormal markers related to competitors, etc., and based on these common characteristics, identify a batch of sign images suspected of being "non-POI false points".
[0126] Furthermore, the sign image suspected of being a "non-POI false point" is input into the generation model as the target sign image to be processed, and the target category of the target sign image is generated.
[0127] If the target category is an extraction category, it will be taken offline immediately; if the target category is not an extraction category, it will be taken offline after manual confirmation.
[0128] The embodiments of this disclosure input the target sign image to be processed into the generation model to generate the target category of the target sign image; in response to determining that the target category is an extraction category, the target sign image is subjected to sign extraction processing, thereby realizing accurate identification and processing of the category of the image to be processed.
[0129] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a generative model training device, which is similar to... Figure 2 The method embodiments shown correspond to those described.
[0130] like Figure 6 As shown, the generative model training device 600 of this embodiment includes a construction module 601 and a training module 602.
[0131] The construction module 601 can be configured to determine the category label of the sample signboard image based on the attribute information and quality information of the sample signboard image. The category label is one of one or more non-extractable category labels among multiple extracted category labels.
[0132] Training module 602 can be configured to train the generative model based on sample signboard images and category labels.
[0133] In some optional embodiments of this example, the sign attribute information includes at least one of the following: whether it has a point of interest attribute, whether it is associated with a real store, and whether it includes a sign name; the sign quality information includes at least one of the following: whether the sign name is complete, whether the sign name is obscured, whether the sign name is incomplete, and whether the sign has image quality problems.
[0134] In some optional embodiments of this example, the construction module is further configured to determine, in response to determining that the attribute information and quality information of the sample signboard image meet the extraction conditions, that the category label of the sample signboard image is one of a plurality of extraction category labels, the extraction conditions including: having point of interest attributes, being associated with real stores, including a signboard name, having a complete signboard name, having a signboard name that is not obscured, having a signboard that is not damaged, and having no image quality problems.
[0135] In some alternative embodiments of this example, the multiple extraction class tags include multi-sign tags, single-sign tags, and sign tags.
[0136] In some optional embodiments of this example, determining the category label of a sample signboard image as one of multiple extracted category labels includes: in response to determining that the sample signboard image includes multiple signs, and at least one of the multiple signs has a specific name and / or a generic name, determining the category label of the sample signboard image as a multiple signboard label; in response to determining that the sample signboard image includes one sign, and the sign has a specific name and / or a generic name, determining the category label of the sample signboard image as a single signboard label; in response to determining that the sample signboard image does not include signs but includes signs, determining the category label of the sample signboard image as a signboard label.
[0137] In some alternative embodiments of this example, the construction module is further configured to determine that the category label of the sample sign image is one of a plurality of non-extractable category labels in response to determining that the attribute information and quality information of the sample sign image do not meet at least one of the extraction conditions.
[0138] In some optional ways of this embodiment, multiple non-extractable tags include: tags that do not have point of interest attributes, tags that are not associated with real stores, tags that do not include signboard names, tags with incomplete signboard names, tags with obscured signboard names, and tags with image quality problems.
[0139] In some optional embodiments of this example, the training module further includes: a calculation unit, an expansion unit, a cropping unit, and a training unit. The calculation unit can be configured to calculate the ratio of a first reference size to the longest side size of the sign area in the sample sign image, where the first reference size is determined based on the field of view of the generative model during data processing. The expansion unit can be configured to expand the sign area based on the ratio. The cropping unit can be configured to crop the sample sign image according to the expanded sign area to obtain a target sample image including the sign area. The training unit can be configured to train the generative model based on the target sample image and the category label.
[0140] In some alternative embodiments of this example, the cropping unit may be further configured to crop the sample sign image according to the expanded sign area to obtain an intermediate sign image; in response to determining that the size of the intermediate sign image is greater than the second reference size, the intermediate sign image is reduced to the second reference size to obtain the target sample image, wherein the second reference size is determined based on the resource constraints of the generative model deployment.
[0141] In some optional embodiments of this example, the training module may further include a replacement unit and an execution unit. The replacement unit may be configured to replace the category label with the corresponding numerical identifier to obtain the replaced category label. The execution unit may be configured to train the generative model based on the sample signboard image and the replaced category label.
[0142] Further reference Figure 7 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an image processing apparatus, which is similar to... Figure 2 The method embodiments shown correspond to those described.
[0143] like Figure 7 As shown, the image processing apparatus 700 of this embodiment includes a generation module 701 and a processing module 702.
[0144] The generation module 701 can be configured to input the target sign image to be processed into the generation model and generate the target category of the target sign image.
[0145] The processing module 702 can be configured to perform sign extraction processing on the target sign image in response to determining that the target category is an extraction category.
[0146] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0147] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0148] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0149] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0150] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0151] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as methods for generating model training. For example, in some embodiments, the methods for generating model training may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the methods for generating model training described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform methods for generating model training by any other suitable means (e.g., by means of firmware).
[0152] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0153] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0154] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0156] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0157] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, also known as cloud computing servers or cloud hosts, which are hosting products within the cloud computing service ecosystem to address the management difficulties and weak business scalability inherent in traditional physical hosts and Virtual Private Servers (VPS) services. Servers can also be categorized as distributed system servers or servers incorporating blockchain technology.
[0158] The technical solution according to the embodiments of this disclosure effectively improves the generalization performance and recognition accuracy of the model.
[0159] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.
[0160] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for training a generative model, comprising: determining a category label of a sample sign image based on attribute information and quality information of the sample sign image, the category label being one of one or more non-extraction category labels in a plurality of extraction category labels; training a generative model based on the sample sign image and the category label.
2. The method of claim 1, wherein, The attribute information comprises at least one of the following: whether the sample sign image has a point of interest attribute, whether the sample sign image is associated with a real store, and whether the sample sign image includes a sign name; and the quality information comprises at least one of the following: whether the sign name is complete, whether the sign name is blocked, whether the sign name is incomplete, and whether the sample sign image has an image quality problem.
3. The method of claim 2, wherein, The determination of the category label of the sample sign image based on the attribute information and the quality information of the sample sign image comprises: in response to determining that the attribute information and the quality information of the sample sign image meet extraction conditions, determining the category label of the sample sign image as one of the plurality of extraction category labels, the extraction conditions comprising: having a point of interest attribute, being associated with a real store, including a sign name, the sign name being complete, the sign name not being blocked, the sign being complete, and the sample sign image not having an image quality problem.
4. The method of claim 3, wherein, The plurality of extraction category labels comprises a multi-sign label, a single-sign label, and a logo label.
5. The method of claim 4, wherein, The determination of the category label of the sample sign image as one of the plurality of extraction category labels comprises: in response to determining that the sample sign image includes a plurality of signs and at least one of the plurality of signs has a special name and / or a general name, determining the category label of the sample sign image as the multi-sign label; in response to determining that the sample sign image includes one sign and the sign has a special name and / or a general name, determining the category label of the sample sign image as the single-sign label; in response to determining that the sample sign image does not include a sign and includes a logo, determining the category label of the sample sign image as the logo label.
6. The method of claim 3, wherein, The determination of the category label of the sample sign image based on the attribute information and the quality information of the sample sign image further comprises: in response to determining that the attribute information and the quality information of the sample sign image do not meet at least one of the extraction conditions, determining the category label of the sample sign image as one of the plurality of non-extraction category labels.
7. The method of claim 6, wherein, The plurality of non-extraction category labels comprises: a non-point of interest attribute label, a non-real store association label, a non-sign name inclusion label, a non-complete sign name label, a blocked sign name label, and an image quality problem label.
8. The method of claim 1, wherein, The training of the generative model based on the sample sign image and the category label comprises: calculating a ratio of a first reference size to a longest side size of a sign region in the sample sign image, the first reference size being determined based on a field of view range of the generative model for data processing; extending the sign region based on the ratio; cropping the sample sign image according to the extended sign region to obtain a target sample image including the sign region; training the generative model based on the target sample image and the category label.
9. The method of claim 8, wherein, The sample sign image is cropped according to the expanded sign area to obtain a target sample image including a sign area, including: The sample sign image is cropped according to the expanded sign area to obtain an intermediate sign image; In response to determining that the size of the intermediate sign image is greater than a second reference size, the intermediate sign image is reduced to the second reference size to obtain a target sample image, and the second reference size is determined based on resource limitations of the generation model deployment.
10. The method of any one of claims 1-9, wherein, The generation model is trained based on the sample sign image and the category label, including: The category label is replaced with a corresponding digital identifier to obtain a replaced category label; The generation model is trained based on the sample sign image and the replaced category label.
11. An image processing method, comprising: inputting a target sign image to be processed into a generation model to generate a target category of the target sign image, the generation model being the model of any one of claims 1-10; in response to determining that the target category is an extraction category, performing sign extraction processing on the target sign image.
12. A generation model training apparatus, comprising: a construction module configured to determine a category label of a sample sign image based on attribute information and quality information of the sample sign image, the category label being one of a plurality of extraction category labels or one of one or more non-extraction category labels; a training module configured to train a generation model based on the sample sign image and the category label.
13. An image processing apparatus, comprising: a generation module configured to input a target sign image to be processed into a generation model to generate a target category of the target sign image; a processing module configured to, in response to determining that the target category is an extraction category, perform sign extraction processing on the target sign image.
14. An electronic device, comprising: including: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.
15. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-11.
16. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-11.
17. A computer program product, comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-11.