Method and equipment for extracting address information in image

By acquiring the local images in the image and calling the preset visual model, combining the information of the initial image and the local image, the problem of inaccuracy in traditional OCR methods when extracting address information is solved, achieving higher extraction accuracy and processing efficiency.

CN119785332APending Publication Date: 2025-04-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411826560.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Traditional OCR methods are inaccurate when extracting address information in images and it is difficult to distinguish non-address information.

Method used

By acquiring the local image in the initial image, calling the preset visual model, combining the information of the initial image and the local image, the address information is extracted.

Benefits of technology

It improves the accuracy of address information extraction, reduces the impact of impurity data, improves processing efficiency, and ensures the integrity of address information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785332A_ABST
    Figure CN119785332A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and equipment for extracting address information in an image, and the method comprises the steps: obtaining an initial image of to-be-extracted address information, and obtaining a local image containing the address information from the initial image; and calling a preset visual model according to the initial image and the local image, and extracting address information in the initial image through the preset visual model. According to the embodiment of the invention, the local image containing the address information in the initial image is acquired, so that the preset visual model can focus on the area of the local image in the process of extracting the address information, and the initial image provides complete information and background information, thereby reducing the influence caused by impurity data in the area outside the local image, and improving the image quality. The data volume needing to be processed is also reduced, the processing efficiency is improved, the integrity of the address information is also ensured, and the accuracy of extracting the address information can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of computer and network communication technology, and more particularly to a method and device for extracting address information in an image. Background Art

[0002] Some images may contain address information. In order to utilize the address information in these images, it is necessary to extract the address information from the images.

[0003] In the related art, a traditional OCR (Optical Character Recognition) method is usually used to extract address information from an image containing address information, but the extraction result of the traditional OCR method is inaccurate. Summary of the invention

[0004] The embodiments of the present disclosure provide a method and device for extracting address information from an image, so as to improve the accuracy of extracting address information from an image.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for extracting address information in an image, comprising:

[0006] Acquire an initial image from which address information is to be extracted, and acquire a partial image containing the address information from the initial image;

[0007] Performing text recognition on the partial image to obtain a text recognition result;

[0008] A preset visual model is called according to the initial image and the partial image, and address information in the initial image is extracted through the preset visual model.

[0009] In a second aspect, an embodiment of the present disclosure provides a device for extracting address information in an image, comprising:

[0010] An image acquisition unit, used to acquire an initial image from which address information is to be extracted, and to acquire a partial image containing the address information from the initial image;

[0011] The extraction unit is used to call a preset visual model according to the initial image and the partial image, and extract the address information in the initial image through the preset visual model.

[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0013] The memory stores computer-executable instructions;

[0014] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for extracting address information within the image as described in the first aspect and various possible designs of the first aspect.

[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the method for extracting address information within an image as described in the first aspect and various possible designs of the first aspect is implemented.

[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method for extracting address information within an image as described in the first aspect and various possible designs of the first aspect.

[0017] The method and device for extracting address information in an image provided by the embodiments of the present disclosure obtain an initial image of the address information to be extracted, and obtain a partial image containing the address information from the initial image; call a preset visual model based on the initial image and the partial image, and extract the address information in the initial image through the preset visual model. In the embodiments of the present disclosure, by obtaining a partial image containing the address information in the initial image, the preset visual model can focus on the area of ​​the partial image during the process of extracting the address information, and the initial image provides complete information and background information, thereby reducing the impact of impurity data in areas outside the partial image, reducing the amount of data that needs to be processed, improving processing efficiency, and ensuring the integrity of the address information, which can improve the accuracy of extracting the address information. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1a A schematic diagram of the architecture of a method for extracting address information within an image provided by an embodiment of the present disclosure;

[0020] Figure 1b A schematic diagram of the architecture of a method for extracting address information within an image provided by another embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram of a method for extracting address information from an image according to an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of the architecture of a method for extracting address information within an image provided by another embodiment of the present disclosure;

[0023] Figure 4 A structural block diagram of a device for extracting address information in an image provided by an embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of the hardware structure of a device for extracting address information within an image provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0026] In the related art, traditional OCR methods are usually used to extract address information from images containing address information. However, traditional OCR methods are easily affected by impurities such as other texts next to the address information, resulting in low recognition accuracy and inability to effectively distinguish non-address information, resulting in inaccurate extraction results.

[0027] In order to solve the above technical problems, the disclosed embodiment provides a method for extracting address information in an image, by obtaining an initial image of the address information to be extracted, and obtaining a partial image containing the address information from the initial image; calling a preset visual model according to the initial image and the partial image, and extracting the address information in the initial image through the preset visual model. In this embodiment, by obtaining a partial image containing the address information in the initial image, the preset visual model can focus on the area of ​​the partial image during the process of extracting the address information, and the initial image provides complete information and background information, thereby reducing the impact of impurity data in areas outside the partial image, reducing the amount of data that needs to be processed, improving processing efficiency, and ensuring the integrity of the address information, which can improve the accuracy of extracting the address information.

[0028] The application scenario of the method for extracting address information in an image according to the embodiment of the present disclosure is as follows: Figure 1a As shown, the method is applied in electronic devices such as terminal devices or servers to obtain an initial image of address information to be extracted, obtain a partial image containing the address information from the initial image through target detection, call a preset visual model based on the initial image and the partial image, and extract the address information in the initial image through the preset visual model.

[0029] Another method for extracting address information in an image according to the present disclosure is applicable to the following scenarios: Figure 1b As shown, it can be applied in electronic devices such as terminal devices or servers to obtain an initial image of address information to be extracted, obtain a local image containing the address information from the initial image through target detection, and perform text recognition on the local image to obtain a text recognition result; call a preset visual model based on the initial image, the local image and the text recognition result, and extract the address information in the initial image through the preset visual model.

[0030] It should be noted that the information and data involved in this disclosure (including but not limited to data used for analysis, stored data, displayed data, etc.) must be fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0031] The method for extracting address information in an image disclosed in the present invention will be described in detail below in conjunction with specific embodiments.

[0032] refer to Figure 2 , Figure 2 A flowchart of a method for extracting address information from an image provided by an embodiment of the present disclosure. The method of this embodiment can be applied to electronic devices such as terminal devices or servers. The method for extracting address information from an image includes:

[0033] S201, obtaining an initial image from which address information is to be extracted, and obtaining a partial image containing the address information from the initial image.

[0034] In this embodiment, there may be one or more signs, road signs and other information in the initial image. The signs, road signs and other information are also the address information that needs to be extracted. In this embodiment, a partial image containing address information such as signs and road signs can be obtained from the initial image for the following text recognition to preliminarily extract the address information.

[0035] In specific implementation, the target area containing the address information can be first identified from the initial image, and then the image of the target area can be cropped from the initial image to obtain a partial image containing the address information. Any identification method can be used to identify the target area containing the address information from the initial image, which is not limited in this embodiment.

[0036] Optionally, in this embodiment, a preset target detection model can be pre-trained to enable it to recognize address information such as signs and road signs included in the image. Specifically, images including address information such as signs and road signs can be obtained, and the address information therein can be annotated as training data for model training. The preset target detection model can be any machine learning model, which is not limited in this embodiment. Furthermore, the preset target detection model can be called according to the initial image, and the target area containing the address information can be identified by the preset target detection model, and an image of the target area can be obtained from the initial image as the local image.

[0037] S202: Call a preset visual model according to the initial image and the partial image, and extract address information in the initial image through the preset visual model.

[0038] In this embodiment, a preset visual model is used to extract address information based on an initial image and a partial image, wherein the partial image can indicate a target area for address information extraction by the preset visual model, and the initial image can provide complete information and background information.

[0039] The preset visual model may adopt any known visual model, which is not limited in this embodiment. Optionally, the preset visual model may be a large vision model (LVM). The LVM model is an advanced artificial intelligence model designed for processing and interpreting visual data (usually images or videos). It can operate according to the principles of deep learning and use a neural network with a large number of parameters to analyze and understand visual content.

[0040] In this embodiment, the preset visual model can be trained so that the preset visual model has the ability to extract address information based on the initial image and the local image. For example, the LVM model is trained by supervised fine-tuning (SFT), wherein each set of training data may include a global image and a local image, and are pre-labeled to give the real address information, so as to provide accurate labeling information for model training.

[0041] When applied, a preset visual model can be called according to the initial image and the partial image, and accurate address information can be extracted based on the partial image and the initial image through the preset visual model.

[0042] Optionally, in this embodiment, a prompt word (Prompt) can be constructed based on the initial image and the text recognition results of the local image, where the prompt word is a text or question that guides or stimulates the artificial intelligence model to generate a specific type of response. In this embodiment, a prompt word can be constructed to instruct the preset visual model to extract address information based on the initial image and the local image, and then the initial image, the local image and the prompt word can be input into the preset target detection model, so that the preset visual model can extract the address information based on the guidance of the prompt word, and use the local image as the target area for recognition, thereby reducing the output of impurity data such as non-address information other than the local image by the preset visual model, and can enable the preset visual model to quickly converge on tasks and generalize between multiple tasks, and reduce the amount of data that the preset visual model needs to process, thereby improving processing efficiency.

[0043] It should be noted that there may be multiple address information in the initial image, that is, multiple local images can be obtained from one initial image. Therefore, the preset visual model can be called according to the initial image, one of the local images and the text recognition result corresponding to the local image, and the address information corresponding to the local image is extracted through the preset visual model, that is, the address information is extracted one by one for multiple local images; or the address information can be extracted for multiple local images in batches, that is, the preset visual model is called according to the initial image and multiple local images, and the address information corresponding to each local image is extracted through the preset visual model.

[0044] The method for extracting address information in an image provided by the present embodiment obtains an initial image of the address information to be extracted, and obtains a partial image containing the address information from the initial image; calls a preset visual model according to the initial image, the partial image, and the text recognition result, and extracts the address information in the initial image through the preset visual model. In the present embodiment, by obtaining a partial image containing the address information in the initial image, the preset visual model can focus on the area of ​​the partial image during the process of extracting the address information, and the initial image provides complete information and background information, thereby reducing the impact of impurity data in areas outside the partial image, reducing the amount of data that needs to be processed, improving processing efficiency, and ensuring the integrity of the address information, which can improve the accuracy of extracting the address information.

[0045] Based on any of the above embodiments, this embodiment provides a method for extracting address information in an image, including:

[0046] S301: Acquire an initial image from which address information is to be extracted, and acquire a partial image containing the address information from the initial image.

[0047] In this embodiment, S301 is the same as the above-mentioned S201 and will not be described in detail here.

[0048] S302: Perform text recognition on the partial image to obtain a text recognition result.

[0049] In this embodiment, preliminary address information can be extracted from the partial image, and by performing text recognition on the partial image, the text such as the signboard and road sign in the partial image can be extracted. In this embodiment, any text recognition method can be used, and this is not limited in this embodiment. Optionally, in this embodiment, a text recognition model such as an OCR model can be used to perform text recognition on the partial image to obtain a text recognition result.

[0050] S303: calling a preset visual model according to the initial image, the partial image and the text recognition result, and extracting address information in the initial image through the preset visual model.

[0051] In this embodiment, if text recognition is performed only on a partial image, the text recognition result is less affected by impurities such as text in areas outside the partial image. However, since traditional text recognition models such as OCR models can only perform text recognition and cannot effectively distinguish non-address information, it is inaccurate to extract address information using text recognition alone. Therefore, in this embodiment, the initial image, the partial image, and the text recognition results can be combined to use a preset visual model to further extract the address information. Compared with the above-mentioned embodiment in which the preset visual model is called based only on the initial image and the partial image to extract the address information, the preset visual model in this embodiment refers to the text recognition results of text recognition models such as OCR models, which can improve the recognition accuracy, and at the same time reduce the task difficulty of the preset visual model and simplify the preset visual model.

[0052] In this embodiment, the preset visual model can be trained so that the preset visual model has the ability to extract address information from images by using text recognition results. For example, the LVM model is trained by supervised fine-tuning, wherein each set of training data may include a global image, a local image, and text recognition results in the local image, and is pre-labeled to give the real address information, so as to provide accurate labeling information for model training.

[0053] When applied, the preset visual model can be called according to the initial image, the partial image and the text recognition result, and the accurate address information can be extracted from the partial image and the initial image by referring to the text recognition result through the preset visual model.

[0054] Optionally, in this embodiment, a prompt word (Prompt) can be constructed based on the initial image, the partial image and the text recognition results, wherein the prompt word is a text or question that guides or stimulates the artificial intelligence model to generate a specific type of response. In this embodiment, a prompt word can be constructed to instruct the preset visual model to use the text recognition results as a reference and extract address information based on the initial image and the partial image. Then, the initial image, the partial image and the prompt word can be input into the preset target detection model, so that the preset visual model can extract the address information based on the guidance of the prompt word, use the text recognition results as a reference, and use the partial image as the target area for identification, thereby reducing the output of impurity data such as non-address information by the preset visual model, and enabling the preset visual model to quickly perform task convergence and generalize between multiple tasks, and reduce the amount of data that the preset visual model needs to process, thereby improving processing efficiency.

[0055] It should be noted that there may be multiple address information in the initial image, that is, multiple local images can be obtained from one initial image. Therefore, the preset visual model can be called according to the initial image, one of the local images and the text recognition result corresponding to the local image, and the address information corresponding to the local image is extracted through the preset visual model, that is, the address information is extracted one by one for multiple local images; or the address information can be extracted for multiple local images in batches, that is, the preset visual model is called according to the initial image, multiple local images and the text recognition results corresponding to the multiple local images, and the address information corresponding to each local image is extracted through the preset visual model.

[0056] Based on any of the above embodiments, when constructing prompt words according to the initial image, partial image and text recognition results, the address information extraction task that needs to be performed by the preset visual model can be accurately expressed, among which the most important thing is to instruct the preset visual model to extract address information based on the initial image and partial image with the text recognition results as a reference.

[0057] Furthermore, the prompt words also include one or more of the following:

[0058] The relationship between the initial image and the partial image is used to indicate that the partial image is a part of the initial image, and the partial image is a target area for address information recognition, while the initial image can provide complete information and background information;

[0059] The area from which the address information is not extracted in the initial image and / or the partial image is used to avoid interference from the area from which the address information is not extracted when the address information is extracted;

[0060] The extraction rule of the address information is used to instruct the preset visual model to extract the address information according to the extraction rule.

[0061] The address information extraction rules include one or more of the following:

[0062] At least one character in the extracted address information appears in the partial image or the character recognition result, so as to ensure the accuracy of the address information and reduce errors;

[0063] The extracted address information is complete to ensure the integrity of the address information. Since the partial image may be incomplete, the address information extracted based on the partial image may be incomplete, which can be judged by the preset visual model. For some incomplete address information, the preset visual model can be used to supplement it based on the initial image text and / or recognition results;

[0064] Unrecognizable text is replaced with preset characters, such as "?", to prevent the preset visual model from obtaining incorrect address information through reasoning.

[0065] More specifically, the prompt words also include but are not limited to one or more of the following instructions:

[0066] An instruction for determining whether the partial image contains address information. For example, in some cases, although the partial image is a partial image containing address information obtained from the initial image, there may be a certain amount of misjudgment, whereby a region without address information is mistakenly regarded as a region with address information and a partial image without address information is obtained. Therefore, a preset visual model may be allowed to make further judgment;

[0067] An instruction to determine whether there is an inference process. If the address information can only be extracted based on the partial image without combining the initial image, there is no inference process. If the address information cannot be extracted based on the partial image and the initial image needs to be combined for inference to obtain the address information, there is an inference process.

[0068] An instruction for determining whether the address information corresponding to the output partial image is complete, so as to determine whether the address information finally outputted is complete through a preset visual model;

[0069] The instruction to determine whether the initial image was taken indoors or outdoors can be combined with the initial image to determine the shooting address, which can be used to determine whether it is necessary to enter the building when the target address is the address;

[0070] Accordingly, after the initial image, the partial image and the prompt word are input into the preset target detection model, one or more of the following may be output by the preset target detection model:

[0071] The judgment result of whether the partial image contains address information, the judgment result of whether there is an inference process, the judgment result of whether the address information corresponding to the output partial image is complete, and the judgment result of whether the initial image is taken indoors or outdoors.

[0072] In addition, the format of the output data can also be set in the prompt word.

[0073] Based on the above embodiment, as an example, the prompt words may be as follows:

[0074] query="""Determine whether the image contains address information, and output the address information (including signs, road signs, etc.). The first image is the initial image (some area of ​​the first image is not included in the part to be extracted), and the second image is a local image in the initial image, which contains the address information to be recognized. The OCR model result for the second image is "{XXX}" as a reference;

[0075] Make the following judgments:

[0076] Determine whether the second image is address related information;

[0077] Determine whether the final address information is complete, give the complete address information, and output whether the inference is performed in combination with the first image; completeness requires that the entire address information can be recognized without obvious missing characters;

[0078] Determine whether the first image was taken indoors or outdoors;

[0079] Recognition judgment (except indoor and outdoor judgment) is still based on the second image, that is, at least one character in the recognized address name must appear in the second image.

[0080] Reply format, {{

[0081] Address Name:

[0082] Whether to include address information:

[0083] Answer whether the result is complete:

[0084] Is there any reasoning:

[0085] Whether shooting indoors:

[0086] }}"″"

[0087] Based on any of the above embodiments, before calling the preset visual model according to the initial image and the partial image in S203, as Figure 3 As shown, it may also include:

[0088] Determining the clarity of the partial image, and if the clarity of the partial image does not meet a preset clarity condition, filtering out the partial image; and / or

[0089] The definition of the initial image is determined, and if the definition of the initial image does not meet a preset definition condition, the initial image is filtered out.

[0090] In this embodiment, in order to improve the quality of address information extraction and avoid wasting time and computing resources, the clarity of the local image can be determined. For the local image whose clarity does not meet the preset clarity condition, even if the preset visual model is used for processing later, it is difficult to accurately extract the address information. Therefore, the local image whose clarity does not meet the preset clarity condition can be filtered out so that it is no longer processed by the preset visual model. Any feasible method can be used for the clarity filtering of the local image, which is not limited in this embodiment.

[0091] The clarity of the initial image can also be determined, and the initial image whose clarity does not meet the preset clarity condition can be filtered out without subsequent processing, thus avoiding waste of resources.

[0092] Optionally, in this embodiment, an image clarity filtering model can be pre-trained so that it can determine the image clarity index and filter out the image when the clarity index does not meet the preset clarity index threshold. The image clarity filtering model can be any feasible machine learning model and can be trained through training data. The training data can include local images of different clarity and mark whether they need to be filtered out. The image clarity filtering model can then be trained to have the above-mentioned capabilities.

[0093] Furthermore, a preset image clarity filtering model can be called according to the local image to be filtered to obtain the clarity index of the local image. If the clarity index of the local image does not meet the preset clarity index threshold, the local image is filtered out. Similarly, a preset image clarity filtering model can be called to obtain the clarity information of the initial image. If the clarity information of the initial image does not meet the preset clarity threshold, the initial image is filtered out.

[0094] Optionally, the clarity index of the unfiltered partial image can also be output and associated with the address information finally extracted, so as to be used as a factor in evaluating the accuracy of the address information.

[0095] Based on any of the above embodiments, after the address information in the initial image is extracted in S203, at least one of the following applications is further performed:

[0096] 1) If the address information is not included in the database, the address information is added to the database for query and use in various application scenarios;

[0097] 2) If the database includes address information, the address information in the database is verified and / or updated to determine whether the address information in the database is accurate. If it is inaccurate, it can be updated to improve accuracy;

[0098] 3) Obtaining the shooting address of the initial image, and binding the address information in the initial image with the shooting address of the initial image; the shooting address of the initial image, such as longitude and latitude, may be automatically added by a shooting device, such as a mobile phone or a driving recorder, and then binding the address information in the initial image with the shooting address of the initial image, so as to determine the specific address of the signboard, road sign, etc., such as longitude and latitude;

[0099] 4) Obtaining target address information, where the target address information is the shooting address information of the initial image desired by the user, or the address information included in the initial image desired by the user, and determining whether the address information in the initial image is consistent with the target address information.

[0100] Of course, there may be other application scenarios, which will not be described in detail in this embodiment.

[0101] Corresponding to the method for extracting address information in an image in the above embodiment, Figure 4 The structure block diagram of the device for extracting address information in an image provided by the embodiment of the present disclosure. For the convenience of explanation, only the part related to the embodiment of the present disclosure is shown. Figure 4 The device 400 for extracting address information in an image includes: an image acquisition unit 401 and an extraction unit 402.

[0102] The image acquisition unit 401 is used to acquire an initial image from which address information is to be extracted, and to acquire a partial image containing the address information from the initial image;

[0103] The extraction unit 402 is configured to call a preset visual model according to the initial image and the partial image, and extract address information in the initial image through the preset visual model.

[0104] In one or more embodiments of the present disclosure, the device further includes: a text recognition unit 403, configured to perform text recognition on the partial image to obtain a text recognition result;

[0105] Accordingly, when the extraction unit 402 calls the preset visual model according to the initial image and the partial image and extracts the address information in the initial image through the preset visual model, it is used to:

[0106] A preset visual model is called according to the initial image, the partial image and the text recognition result, and the address information in the initial image is extracted through the preset visual model.

[0107] In one or more embodiments of the present disclosure, when acquiring the partial image including the address name from the initial image, the image acquisition unit 401 is used to:

[0108] A preset target detection model is called according to the initial image, a target area containing address information is identified through the preset target detection model, and an image of the target area is acquired from the initial image as the local image.

[0109] In one or more embodiments of the present disclosure, when the extraction unit 402 calls a preset visual model according to the initial image, the partial image, and the text recognition result, and extracts the address information in the initial image through the preset visual model, it is used to:

[0110] Constructing a prompt word according to the initial image, the partial image and the text recognition result; wherein the prompt word includes an instruction to instruct the preset visual model to extract address information based on the initial image and the partial image with the text recognition result as a reference;

[0111] The initial image, the partial image and the prompt word are input into the preset visual model, and the address information corresponding to the partial image is output through the preset visual model.

[0112] In one or more embodiments of the present disclosure, the prompt word also includes one or more of the following:

[0113] The relationship between the initial image and the partial image;

[0114] An area in the initial image and / or the partial image where address information is not to be extracted;

[0115] The address information extraction rules include one or more of the following: at least one character in the extracted address information appears in the partial image or the character recognition result, the extracted address information is complete, and unrecognizable characters are replaced by preset characters.

[0116] In one or more embodiments of the present disclosure, the prompt word also includes one or more of the following instructions:

[0117] Instructions for determining whether the partial image contains address information, instructions for determining whether there is an inference process, instructions for determining whether the address information corresponding to the output partial image is complete, and instructions for determining whether the initial image is taken indoors or outdoors;

[0118] Correspondingly, after inputting the initial image, the partial image and the prompt word into the preset target detection model, the method further includes:

[0119] Output one or more of the following through the preset visual model:

[0120] The judgment result of whether the partial image contains address information, the judgment result of whether there is an inference process, the judgment result of whether the address information corresponding to the output partial image is complete, and the judgment result of whether the initial image is taken indoors or outdoors.

[0121] In one or more embodiments of the present disclosure, the device further includes a filtering unit 404, which is used to determine the clarity of the local image before calling the preset visual model according to the initial image and the local image, and if the clarity of the local image does not meet the preset clarity condition, filter out the local image; and / or

[0122] The definition of the initial image is determined, and if the definition of the initial image does not meet a preset definition condition, the initial image is filtered out.

[0123] In one or more embodiments of the present disclosure, when the filtering unit 404 determines the clarity of the partial image and filters out the partial image if the clarity of the partial image does not meet a preset clarity condition, it is configured to:

[0124] Calling a preset image clarity filtering model according to the partial image to obtain a clarity index of the partial image;

[0125] If the clarity index of the partial image does not meet a preset clarity index threshold, filtering out the partial image; and / or

[0126] The filtering unit 404, when determining the definition of the initial image and filtering out the initial image if the definition of the initial image does not meet the preset definition condition, is used to:

[0127] A preset image definition filtering model is called to obtain definition information of the initial image; if the definition information of the initial image does not meet a preset definition threshold, the initial image is filtered out.

[0128] In one or more embodiments of the present disclosure, the application unit is further configured to:

[0129] Acquire the shooting address of the initial image, and bind the address information in the initial image with the shooting address of the initial image; or

[0130] Target address information is obtained, and it is determined whether the address information in the initial image is consistent with the target address information.

[0131] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0132] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.

[0133] refer to Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure, and the electronic device 500 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0134] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0135] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0136] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0137] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0138] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0139] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0140] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0142] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0143] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0144] In a first aspect, according to one or more embodiments of the present disclosure, a method for extracting address information in an image is provided, comprising:

[0145] Acquire an initial image from which address information is to be extracted, and acquire a partial image containing the address information from the initial image;

[0146] A preset visual model is called according to the initial image and the partial image, and address information in the initial image is extracted through the preset visual model.

[0147] According to one or more embodiments of the present disclosure, the method further includes:

[0148] Performing text recognition on the partial image to obtain a text recognition result;

[0149] Correspondingly, calling a preset visual model according to the initial image and the partial image, and extracting address information in the initial image through the preset visual model includes:

[0150] A preset visual model is called according to the initial image, the partial image and the text recognition result, and the address information in the initial image is extracted through the preset visual model.

[0151] According to one or more embodiments of the present disclosure, obtaining a partial image containing an address name from the initial image includes:

[0152] A preset target detection model is called according to the initial image, a target area containing address information is identified through the preset target detection model, and an image of the target area is acquired from the initial image as the local image.

[0153] According to one or more embodiments of the present disclosure, calling a preset visual model according to the initial image, the partial image, and the text recognition result, and extracting the address information in the initial image through the preset visual model includes:

[0154] Constructing a prompt word according to the initial image, the partial image and the text recognition result; wherein the prompt word includes an instruction to instruct the preset visual model to extract address information based on the initial image and the partial image with the text recognition result as a reference;

[0155] The initial image, the partial image and the prompt word are input into the preset visual model, and the address information corresponding to the partial image is output through the preset visual model.

[0156] According to one or more embodiments of the present disclosure, the prompt word also includes one or more of the following:

[0157] The relationship between the initial image and the partial image;

[0158] An area in the initial image and / or the partial image where address information is not to be extracted;

[0159] The address information extraction rules include one or more of the following: at least one character in the extracted address information appears in the partial image or the character recognition result, the extracted address information is complete, and unrecognizable characters are replaced by preset characters.

[0160] According to one or more embodiments of the present disclosure, the prompt word also includes one or more of the following instructions:

[0161] Instructions for determining whether the partial image contains address information, instructions for determining whether there is an inference process, instructions for determining whether the address information corresponding to the output partial image is complete, and instructions for determining whether the initial image is taken indoors or outdoors;

[0162] Correspondingly, after inputting the initial image, the partial image and the prompt word into the preset target detection model, the method further includes:

[0163] Output one or more of the following through the preset visual model:

[0164] The judgment result of whether the partial image contains address information, the judgment result of whether there is an inference process, the judgment result of whether the address information corresponding to the output partial image is complete, and the judgment result of whether the initial image is taken indoors or outdoors.

[0165] According to one or more embodiments of the present disclosure, before calling a preset visual model according to the initial image and the partial image, the method further includes:

[0166] Determining the clarity of the partial image, and if the clarity of the partial image does not meet a preset clarity condition, filtering out the partial image; and / or

[0167] The definition of the initial image is determined, and if the definition of the initial image does not meet a preset definition condition, the initial image is filtered out.

[0168] According to one or more embodiments of the present disclosure, the determining the clarity of the partial image, if the clarity of the partial image does not meet a preset clarity condition, filtering out the partial image, includes:

[0169] Calling a preset image clarity filtering model to obtain a clarity index of the partial image; if the clarity index of the partial image does not meet a preset clarity index threshold, filtering out the partial image; and / or

[0170] The determining the definition of the initial image, and filtering out the initial image if the definition of the initial image does not meet a preset definition condition, includes:

[0171] A preset image definition filtering model is called to obtain definition information of the initial image; if the definition information of the initial image does not meet a preset definition threshold, the initial image is filtered out.

[0172] According to one or more embodiments of the present disclosure, after extracting the address information in the initial image by using the preset visual model, the method further includes:

[0173] Acquire the shooting address of the initial image, and bind the address information in the initial image with the shooting address of the initial image; or

[0174] Target address information is obtained, and it is determined whether the address information in the initial image is consistent with the target address information.

[0175] In a second aspect, according to one or more embodiments of the present disclosure, a device for extracting address information in an image is provided, comprising:

[0176] An image acquisition unit, used to acquire an initial image from which address information is to be extracted, and to acquire a partial image containing the address information from the initial image;

[0177] The extraction unit is used to call a preset visual model according to the initial image and the partial image, and extract the address information in the initial image through the preset visual model.

[0178] According to one or more embodiments of the present disclosure, the device further includes: a text recognition unit, configured to perform text recognition on the partial image to obtain a text recognition result;

[0179] Accordingly, when the extraction unit calls the preset visual model according to the initial image and the partial image and extracts the address information in the initial image through the preset visual model, it is used to:

[0180] A preset visual model is called according to the initial image, the partial image and the text recognition result, and the address information in the initial image is extracted through the preset visual model.

[0181] According to one or more embodiments of the present disclosure, when the image acquisition unit acquires the partial image containing the address name from the initial image, it is configured to:

[0182] A preset target detection model is called according to the initial image, a target area containing address information is identified through the preset target detection model, and an image of the target area is acquired from the initial image as the local image.

[0183] According to one or more embodiments of the present disclosure, when the extraction unit calls a preset visual model according to the initial image, the partial image and the text recognition result, and extracts the address information in the initial image through the preset visual model, it is used to:

[0184] Constructing a prompt word according to the initial image, the partial image and the text recognition result; wherein the prompt word includes an instruction to instruct the preset visual model to extract address information based on the initial image and the partial image with the text recognition result as a reference;

[0185] The initial image, the partial image and the prompt word are input into the preset visual model, and the address information corresponding to the partial image is output through the preset visual model.

[0186] According to one or more embodiments of the present disclosure, the prompt word also includes one or more of the following:

[0187] The relationship between the initial image and the partial image;

[0188] An area in the initial image and / or the partial image where address information is not to be extracted;

[0189] The address information extraction rules include one or more of the following: at least one character in the extracted address information appears in the partial image or the character recognition result, the extracted address information is complete, and unrecognizable characters are replaced by preset characters.

[0190] According to one or more embodiments of the present disclosure, the prompt word also includes one or more of the following instructions:

[0191] Instructions for determining whether the partial image contains address information, instructions for determining whether there is an inference process, instructions for determining whether the address information corresponding to the output partial image is complete, and instructions for determining whether the initial image is taken indoors or outdoors;

[0192] Correspondingly, after inputting the initial image, the partial image and the prompt word into the preset target detection model, the method further includes:

[0193] Output one or more of the following through the preset visual model:

[0194] The judgment result of whether the partial image contains address information, the judgment result of whether there is an inference process, the judgment result of whether the address information corresponding to the output partial image is complete, and the judgment result of whether the initial image is taken indoors or outdoors.

[0195] According to one or more embodiments of the present disclosure, the device further includes a filtering unit, which is used to determine the clarity of the local image before calling the preset visual model according to the initial image and the local image, and if the clarity of the local image does not meet the preset clarity condition, filter out the local image; and / or

[0196] The definition of the initial image is determined, and if the definition of the initial image does not meet a preset definition condition, the initial image is filtered out.

[0197] According to one or more embodiments of the present disclosure, when the filtering unit determines the clarity of the partial image and filters out the partial image if the clarity of the partial image does not meet a preset clarity condition, it is configured to:

[0198] Calling a preset image clarity filtering model according to the partial image to obtain a clarity index of the partial image; if the clarity index of the partial image does not meet a preset clarity index threshold, filtering out the partial image; and / or

[0199] The filtering unit, when judging the definition of the initial image and filtering out the initial image if the definition of the initial image does not meet the preset definition condition, is used to:

[0200] A preset image definition filtering model is called to obtain definition information of the initial image; if the definition information of the initial image does not meet a preset definition threshold, the initial image is filtered out.

[0201] According to one or more embodiments of the present disclosure, the application unit is further configured to:

[0202] Acquire the shooting address of the initial image, and bind the address information in the initial image with the shooting address of the initial image; or

[0203] Target address information is obtained, and it is determined whether the address information in the initial image is consistent with the target address information.

[0204] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0205] The memory stores computer-executable instructions;

[0206] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method for extracting address information within the image as described in the first aspect and various possible designs of the first aspect.

[0207] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the method for extracting address information within an image as described in the first aspect and various possible designs of the first aspect is implemented.

[0208] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for extracting address information in an image as described in the first aspect and various possible designs of the first aspect is implemented.

[0209] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0210] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0211] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for extracting address information in an image, characterized in that: include: Acquire an initial image from which address information is to be extracted, and acquire a partial image containing the address information from the initial image; A preset visual model is called according to the initial image and the partial image, and address information in the initial image is extracted through the preset visual model.

2. The method according to claim 1, characterized in that: The method further comprises: Performing text recognition on the partial image to obtain a text recognition result; Correspondingly, calling a preset visual model according to the initial image and the partial image, and extracting address information in the initial image through the preset visual model includes: A preset visual model is called according to the initial image, the partial image and the text recognition result, and the address information in the initial image is extracted through the preset visual model.

3. The method according to claim 1, characterized in that The step of acquiring a partial image including an address name from the initial image comprises: A preset target detection model is called according to the initial image, a target area containing address information is identified through the preset target detection model, and an image of the target area is acquired from the initial image as the local image.

4. The method according to claim 2, characterized in that: The calling of a preset visual model according to the initial image, the partial image and the text recognition result, and extracting the address information in the initial image through the preset visual model, comprises: Constructing a prompt word according to the initial image, the partial image and the text recognition result; wherein the prompt word includes an instruction to instruct the preset visual model to extract address information based on the initial image and the partial image with the text recognition result as a reference; The initial image, the partial image and the prompt word are input into the preset visual model, and the address information corresponding to the partial image is output through the preset visual model.

5. The method according to claim 4, characterized in that The prompt words also include one or more of the following: The relationship between the initial image and the partial image; An area in the initial image and / or the partial image where address information is not to be extracted; The address information extraction rules include one or more of the following: at least one character in the extracted address information appears in the partial image or the character recognition result, the extracted address information is complete, and unrecognizable characters are replaced by preset characters.

6. The method according to claim 4, characterized in that The prompt word also includes one or more of the following instructions: Instructions for determining whether the partial image contains address information, instructions for determining whether there is an inference process, instructions for determining whether the address information corresponding to the output partial image is complete, and instructions for determining whether the initial image is taken indoors or outdoors; Correspondingly, after inputting the initial image, the partial image and the prompt word into the preset target detection model, the method further includes: Output one or more of the following through the preset visual model: The judgment result of whether the partial image contains address information, the judgment result of whether there is an inference process, the judgment result of whether the address information corresponding to the output partial image is complete, and the judgment result of whether the initial image is taken indoors or outdoors.

7. The method according to claim 1, characterized in that Before calling the preset visual model according to the initial image and the partial image, the method further includes: Determining the clarity of the partial image, and if the clarity of the partial image does not meet a preset clarity condition, filtering out the partial image; and / or The definition of the initial image is determined, and if the definition of the initial image does not meet a preset definition condition, the initial image is filtered out.

8. The method according to claim 7, characterized in that The determining the clarity of the partial image, and filtering out the partial image if the clarity of the partial image does not meet a preset clarity condition, includes: Calling a preset image definition filtering model to obtain definition information of the partial image; if the definition information of the partial image does not meet a preset definition threshold, filtering out the partial image; and / or The determining the definition of the initial image, and filtering out the initial image if the definition of the initial image does not meet a preset definition condition, includes: A preset image definition filtering model is called to obtain definition information of the initial image; if the definition information of the initial image does not meet a preset definition threshold, the initial image is filtered out.

9. The method according to claim 1, characterized in that: After extracting the address information in the initial image by using the preset visual model, the method further includes: Acquire the shooting address of the initial image, and bind the address information in the initial image with the shooting address of the initial image; or Target address information is obtained, and it is determined whether the address information in the initial image is consistent with the target address information.

10. A device for extracting address information in an image, characterized in that: include: An image acquisition unit, used to acquire an initial image from which address information is to be extracted, and to acquire a partial image containing the address information from the initial image; The extraction unit is used to call a preset visual model according to the initial image and the partial image, and extract the address information in the initial image through the preset visual model.

11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.