An image recognition method, apparatus, device and medium
By identifying and splitting the real estate information images, and extracting target description information in combination with position indication information, the problem of maintaining real estate information images is solved, and efficient and accurate information extraction and matching is achieved.
Patent Information
- Application Number
- CN202411732098.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-01
AI Technical Summary
Due to the large amount of information, different sizes and different layouts of real estate information images, data maintenance is difficult. The existing technologies such as OCR and AI recognition have problems such as information loss.
By obtaining the image to be identified, including the target object and the target description information, obtaining the position image for identification, obtaining the position indication information, splitting the image and identifying it based on the position indication information, and extracting the target description information of each target object.
It effectively solves the problem of information loss caused by image recognition, improves the accuracy and completeness of recognition results, reduces the difficulty and cost of data maintenance, and improves user experience.
Smart Images

Figure CN119741721A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image recognition method, device, equipment and medium. Background Art
[0002] In the real estate industry, real estate information images such as "one room, one price" are one of the intuitive means for users to understand the basic information and price information of the house. However, real estate information images usually have the characteristics of large amount of information, different sizes, and different layouts; the same image may contain a large number of rooms and price information, which brings huge workload and challenges to data maintenance.
[0003] In the related technology, the recognition effect of images through OCR (Optical Character Recognition) technology is relatively poor. With the development of artificial intelligence (AI) recognition technology, there are still technical problems such as information loss when recognizing images through AI models. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image recognition method, device, equipment and medium.
[0005] The present disclosure provides an image recognition method, the method comprising:
[0006] Acquire an image to be identified; wherein the image to be identified includes at least one target object and target description information corresponding to each target object;
[0007] Acquire a position image corresponding to the image to be identified, and identify the position image to obtain position indication information;
[0008] Obtaining a split image corresponding to the image to be identified;
[0009] The split image is identified based on the position indication information to obtain target description information corresponding to each target object in the image to be identified.
[0010] The present disclosure also provides an image recognition device, the device comprising:
[0011] A first acquisition module is used to acquire an image to be identified; wherein the image to be identified includes at least one target object and target description information corresponding to each target object;
[0012] A second acquisition module is used to acquire a position image corresponding to the image to be identified;
[0013] A first recognition module, used to recognize the position image and obtain position indication information;
[0014] A third acquisition module is used to acquire the split image corresponding to the image to be identified;
[0015] The second recognition module is used to recognize the split image based on the position indication information to obtain target description information corresponding to each target object in the image to be recognized.
[0016] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the image recognition method provided by the embodiment of the present disclosure.
[0017] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the image recognition method provided by the embodiment of the present disclosure.
[0018] The technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: the image recognition solution provided by the embodiment of the present disclosure obtains an image to be recognized, wherein the image to be recognized includes at least one target object and target description information corresponding to each target object, obtains a position image corresponding to the image to be recognized, recognizes the position image, obtains position indication information, obtains a split image corresponding to the image to be recognized, recognizes the split image based on the position indication information, and obtains target description information corresponding to each target object in the image to be recognized. Thus, the technical problem of information loss caused by image recognition is solved, the image to be recognized can be effectively split, and the split image can be recognized in combination with the position indication information, so that the target description information of each target object can be accurately extracted and matched, which not only greatly reduces the difficulty and cost of data maintenance, but also improves the accuracy and completeness of the recognition results, and ultimately improves the overall user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 A flowchart of an image recognition method provided by an embodiment of the present disclosure;
[0021] Figure 2A flowchart of another image recognition method provided by an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of an image to be recognized provided in an embodiment of the present disclosure;
[0023] Figure 4 A schematic diagram of a location image provided by an embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of splitting an image provided by an embodiment of the present disclosure;
[0025] Figure 6 A schematic diagram of another image splitting method provided by an embodiment of the present disclosure;
[0026] Figure 7 An example diagram of image recognition provided by an embodiment of the present disclosure;
[0027] Figure 8 A schematic diagram of the structure of an image recognition device provided by an embodiment of the present disclosure;
[0028] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] At present, real estate information images such as "one house, one price" are one of the intuitive means for users to understand the basic information and price information of a house. As a real estate information service provider, it is crucial to maintain the accuracy and timeliness of such information. However, in actual operations, maintaining real estate information fields faces many challenges.
[0036] Specifically, real estate information is mostly in the form of images. The existing method is to manually input data in a standardized manner, which is not only time-consuming and labor-intensive, but also prone to errors. In order to ensure the accuracy of the data, it is necessary to match the acquired real estate information with the real estate information in the recording system, which is complex and prone to errors. Among them, information images usually have the characteristics of large amount of information, different sizes, and different layouts. The same image may contain a large amount of room and price information, which brings huge workload and challenges to data maintenance. In the existing technology, real estate information images are recognized through OCR technology or AI models, which have problems such as inaccurate recognition results, misreading, and phantom reading.
[0037] In view of the above problems, the present disclosure proposes an image recognition method, which obtains an image to be recognized, wherein the image to be recognized includes at least one target object and target description information corresponding to each target object, obtains a position image corresponding to the image to be recognized, recognizes the position image, obtains position indication information, obtains a split image corresponding to the image to be recognized, recognizes the split image based on the position indication information, and obtains target description information corresponding to each target object in the image to be recognized. Thus, the technical problem of information loss caused by image recognition is solved, the image to be recognized can be effectively split, and the split image can be recognized in combination with the position indication information, so that the target description information of each target object can be accurately extracted and matched, which not only greatly reduces the difficulty and cost of data maintenance, but also improves the accuracy and completeness of the recognition results, and ultimately improves the overall user experience.
[0038] Figure 1The following is a flow chart of an image recognition method provided by an embodiment of the present disclosure. The method can be executed by an image recognition device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:
[0039] Step 101: Acquire an image to be identified; wherein the image to be identified includes at least one target object and target description information corresponding to each target object.
[0040] Among them, the target object refers to the object to be identified in the image, and the object can be a building, a building or a house related to real estate, and can be one or more. In the embodiment of the present disclosure, the image to be identified usually includes multiple target objects, such as dozens, hundreds or hundreds of target objects; the target description information refers to the data information used to describe the target object. In the embodiment of the present disclosure, the target description information may include at least one of the target object location, target object price, target object area, etc.
[0041] In the embodiments of the present disclosure, the target object may be a building, a building, a house, etc. Accordingly, when the target object is a building, the corresponding target description information may be the building address, the building area, the building name, etc.; when the target object is a house, the corresponding target description information may be the building information to which the house belongs, the unit to which the house belongs, the floor information, the house area, the house price, etc., that is, different target objects correspond to different target description information, and the specific setting is selected according to the application scenario.
[0042] In the embodiments of the present disclosure, there are many ways to obtain the image to be identified. The image to be identified can be purchased based on a preset channel, or the image to be identified can be received by an authorized device uploaded. The specific settings can be selected according to the application scenario.
[0043] Specifically, during the image recognition process, the image to be recognized may be acquired in response to an image acquisition request.
[0044] Step 102: Obtain a position image corresponding to the image to be identified, identify the position image, and obtain position indication information.
[0045] Among them, the position image refers to an image used to indicate the position relationship of the target object. In the embodiment of the present disclosure, the position image is a partial image of the image to be identified, for example, an image including the position information portion of the image to be identified is captured as the position image.
[0046] In the embodiments of the present disclosure, there are many ways to obtain the position image corresponding to the image to be identified. As an example, the position information display area of the image to be identified is obtained, and the image capture target area is determined according to the position information display area in the image to be identified, and the image capture target area is captured to obtain the position image; as another example, the position identifier of the image to be identified is obtained, and the capture information of the image to be identified is determined according to the position identifier, and the image to be identified is captured according to the preset image capture ratio and capture information to obtain the position image. The above two methods are only examples, and the embodiments of the present disclosure do not specifically limit the methods of obtaining the position image corresponding to the image to be identified.
[0047] Furthermore, after obtaining the location image corresponding to the image to be identified, the location image is identified to obtain location indication information. Specifically, image text recognition can be performed on the location image to obtain text information corresponding to the location image, and the corresponding location indication information is obtained from the text information according to the location key field of the target object. For example, if the target object is a house, the corresponding location key fields are the building name, building name and building unit name. Therefore, the specific field information corresponding to the above-mentioned location key fields is obtained from the text information as the location indication information.
[0048] Among them, the location indication information refers to the information used to indicate the specific location of the target object. Different target objects have different location indication information. For example, when the target object is a house, the location indication information includes the name of the building, the name of the building, the name of the building unit, etc.
[0049] In the embodiment of the present disclosure, after the image to be identified is acquired, a position image corresponding to the image to be identified may be acquired, and the position image may be identified to acquire position indication information.
[0050] After step 101, step 102 and / or step 103 may be executed. The execution order of step 102-step 103 may be determined according to actual conditions. Figure 1 These are examples only.
[0051] Step 103: Obtain the split image corresponding to the image to be recognized.
[0052] Among them, the split image refers to a partially intercepted image of the image to be identified. In the embodiments of the present disclosure, there are many ways to obtain the split image corresponding to the image to be identified. As an example, the target direction image pixel value of the image to be identified (such as image height pixels or image length pixels, etc.) is obtained, and the split pixels are determined according to the target direction image pixel value and a preset split ratio. The image to be identified is split based on the split pixels to obtain a split image; as another example, the number of target objects in the split image is determined according to the target number of target objects and a preset split ratio, and the split pixels are determined according to the number of target objects in the split image to split the image to obtain a split image. The above two methods are only examples, and the embodiments of the present disclosure do not specifically limit the methods for obtaining the split image corresponding to the image to be identified.
[0053] Specifically, after obtaining the image to be identified, the splitting ratio can be set according to actual application needs, and the final splitting pixels are determined based on the set splitting ratio combined with the target direction image pixel value of the image to be identified and / or the target number of target objects in the image to be identified to split the image to be identified, so as to obtain multiple split images.
[0054] Step 104: Identify the split image based on the position indication information to obtain target description information corresponding to each target object in the image to be identified.
[0055] Specifically, in the process of identifying the split image, the position indication information obtained according to the position image can be used to assist in determining the target description information corresponding to each target object. It can be understood that the split image includes one or more target objects, and the purpose of identifying the split image is to obtain the target description information corresponding to the target object in the split image. Since the split image is a partial screenshot image of the image to be identified, in order to ensure that the target description information corresponding to each target object is obtained, in the process of identifying the split image, the position relationship of each target object can be obtained according to the position indication information, so that when the identification field corresponding to the target object is identified, it is determined based on the position relationship of each target object, so that the target description information of each target object can be obtained.
[0056] The image recognition solution provided by the embodiment of the present disclosure obtains an image to be recognized, wherein the image to be recognized includes at least one target object and target description information corresponding to each target object, obtains a position image corresponding to the image to be recognized, recognizes the position image, obtains position indication information, obtains a split image corresponding to the image to be recognized, recognizes the split image based on the position indication information, and obtains target description information corresponding to each target object in the image to be recognized. Thus, the technical problem of information loss caused by image recognition is solved, the image to be recognized can be effectively split, and the split image can be recognized in combination with the position indication information, so that the target description information of each target object can be accurately extracted and matched, which not only greatly reduces the difficulty and cost of data maintenance, but also improves the accuracy and completeness of the recognition results, and ultimately improves the overall user experience.
[0057] In some embodiments, obtaining the position image corresponding to the image to be identified includes: obtaining a position identifier of the image to be identified; determining the interception information of the image to be identified based on the position identifier; and intercepting the image to be identified according to a preset image screenshot ratio and interception information to obtain a position image.
[0058] In the embodiments of the present disclosure, the position identifier refers to the position information used to identify the image elements in the image to be identified, such as the image elements are arranged from top to bottom or the image elements are arranged from left to right, so that the interception information of the image to be identified can be determined according to the position identifier. For example, if the image elements are arranged from top to bottom, the interception information of the image to be identified is determined as intercepted from top to bottom; for another example, if the image elements are arranged from left to right, the interception information of the image to be identified is determined as intercepted from left to right.
[0059] Among them, the image screenshot ratio is preset, such as one third, one fifth, etc., and further, the image to be identified is intercepted according to the preset image screenshot ratio and interception information to obtain a position image, for example, one third of the image to be identified is intercepted from top to bottom to obtain a position image.
[0060] It is understandable that if only the image to be identified is split and identified, it will lead to information loss. Therefore, it is necessary to obtain a position image to extract position prompt information to assist in splitting the image for identification to improve the accuracy of the identification result. Therefore, the image corresponding to the position information in the image to be identified can be captured to obtain the position image, and the position image can be identified to obtain the position indication information, that is, the corresponding position relationship of the target object.
[0061] In the above scheme, a position image can be quickly and accurately obtained from the image to be identified, so as to obtain position indication information for assisting subsequent split image recognition, thereby further improving the accuracy of image recognition.
[0062] In some embodiments, obtaining a split image corresponding to the image to be identified includes: obtaining target direction image pixel values of the image to be identified; determining split pixels based on the target direction image pixel values and / or the target number of target objects and a preset split ratio; and splitting the image to be identified based on the split pixels to obtain a split image.
[0063] In the embodiment of the present disclosure, the target direction image pixel value can be an image height pixel value or an image length pixel value, which is specifically determined according to the arrangement of the image elements; it can be understood that the higher the height of the image to be identified or the longer the image length is, the more target objects and corresponding target description information are included in the image to be identified, and thus the number of splitting operations required is correspondingly greater.
[0064] In the embodiments of the present disclosure, the splitting ratio can be set in advance, such as the ratio of the target object included in each split image to the target object included in the image to be identified, or the ratio of the pixel value of each split image to the pixel value of the image to be identified, etc. It can be flexibly set according to the actual application scenario to further meet the flexibility of splitting and usage requirements.
[0065] For example, the splitting pixel is determined to be 500 pixels according to the image height pixel value and the splitting ratio, so that the image to be identified is split every 500 pixels to obtain a split image; for another example, the number of target objects in each split image is determined according to the target number of target objects and the splitting ratio, and the splitting pixel is determined to be 600 pixels according to the number of target objects in each split image, so that the image to be identified is split every 600 pixels to obtain a split image.
[0066] In some embodiments, a preset splitting repetition ratio is obtained; the splitting pixels are adjusted according to the splitting repetition ratio to obtain target splitting pixels; and the image to be identified is split based on the splitting pixels to obtain a split image, including: the image to be identified is split based on the target splitting pixels to obtain a split image.
[0067] It is understandable that if the image to be identified is directly split only according to the split pixels, if the same content is not contained in multiple split images, it is easy to cause information loss. Therefore, the split repetition ratio can be set to make multiple split images contain the same content; wherein the split repetition ratio refers to the ratio between the pixel value of the repeated image between two split images and the pixel value of each split image, and the setting can be selected according to the actual application scenario.
[0068] Specifically, a preset splitting repetition ratio is obtained, and the splitting pixels are adjusted according to the splitting repetition ratio to obtain the target splitting pixels. The image to be identified is split based on the target splitting pixels to obtain split images. For example, the image to be identified is split in turn according to the value of each splitting pixel, such as 500 pixels. After obtaining the splitting repetition ratio, such as 20%, the image to be identified is split in turn according to the value of each target splitting pixel, 400 pixels, so as to obtain multiple split images, and there are common contents between every two split images split at adjacent times, so as to further improve the subsequent recognition accuracy. Thus, it is possible to dynamically adjust and optimize according to the actual image scene, and use it as needed, which significantly reduces labor costs, improves the flexibility and adaptability of the system, and ensures that information can be extracted efficiently and accurately in different scenes. This dynamic adjustment capability makes the image recognition method of the disclosed embodiment highly adaptable and extensible.
[0069] In some embodiments, the method further includes: obtaining the number of splits; determining the number of target splits based on the target direction image pixel values and the target split pixels; and verifying the number of splits based on the target split number.
[0070] Among them, the number of splits refers to the total number of splits counted after the splitting of the image to be recognized. In order to ensure the correctness of the splitting, the target direction image pixel value and the target splitting pixel can be calculated to obtain the target splitting number that should be split theoretically, and the number of splits completed can be verified based on the target splitting number. That is, if the target splitting number and the number of splits completed are the same, it means that the split image obtained by splitting is correct. If the target splitting number and the number of splits completed are different, the splitting process must be performed again to ensure the accuracy of the split image, that is, to ensure that the split image includes all the contents of the image to be recognized to ensure the integrity and accuracy of subsequent recognition.
[0071] Therefore, by segmenting and extracting a large amount of data in the image to be identified through screenshots of a certain proportion, it is possible to effectively process images with complex layouts and large amounts of data and improve the accuracy of recognition.
[0072] In the above scheme, by splitting the image to be identified according to certain split pixels, multiple split images can be obtained for subsequent identification. In order to ensure that the split images have common content, the split pixels are adjusted by setting the split repetition ratio to further improve the accuracy of subsequent identification, and the splitting times are checked to ensure the completeness of the splitting, thereby ensuring that the split images include all the content of the image to be identified to ensure the integrity and accuracy of subsequent identification.
[0073] In some embodiments, the split image is identified based on the position indication information to obtain target description information corresponding to each target object in the image to be identified, including: obtaining the position relationship of each target object based on the position indication information; identifying the split image to obtain multiple identification fields for each target object; processing the multiple identification fields based on the position relationship of each target object to obtain target description information for each of the target objects.
[0074] Specifically, the location indication information can be obtained by identifying the location image. Taking the target object as a house as an example, the location indication information includes the name of the building, the building information and the building unit information as the location indication information. Therefore, in the process of identifying the split image, multiple identification fields such as the room number field, the house area and the house price are obtained. The multiple identification fields can be mapped according to the location indication information such as the building name, the building information and the building unit information to determine the complete target description information of the house. For example, the complete target description information of the house is "Building A, Building 1, Unit 101, Area X, Price Y".
[0075] In some embodiments, when target description information of the same target object is obtained based on different split images, the method also includes: obtaining split identifiers of different split images, determining a target split image from different split images based on the split identifiers, retaining the target description information of the same target object identified by the target split image, and deleting the target description information of the same target object that is not identified by the target split image.
[0076] It is understandable that for the sake of information integrity, different split images have some common content, so when different split images obtain target description information of the same target object, screening is required to avoid information duplication and improve data processing efficiency. Specifically, the split identifier refers to the order used to identify the split images, and the target split image can be determined from different split images according to the split identifier, that is, the split image obtained from the two split images is used as the target image, and the target description information of the same target object identified by the target split image is retained, and the target description information of the same target object not identified by the target split image is deleted.
[0077] It should be noted that the target description information of the target object obtained may not be complete target description information. Therefore, in order to ensure the accuracy of the data, it is also possible to make a judgment on the target description information of each target object, such as obtaining the standard description information of each target object, that is, multiple standard fields of each target object, and comparing the target description information with the standard description information. If the target description information cannot cover all the standard description information, the target description information of the target object can be deleted, that is, when outputting the recognition result, the target description information of the target object is not output.
[0078] It can also be understood that multiple split images can obtain target description information corresponding to each target object of each split image, and the target description information corresponding to all target objects can be merged and output in a certain form, that is, the recognition results of each split image are merged and output.
[0079] Therefore, in order to ensure the accuracy of the recognition results, a result coverage verification method is adopted. For data that does not appear repeatedly or only appears in a small amount in the image, a multi-image joint analysis mode is adopted to ensure the complete retention of valid information.
[0080] In the above scheme, the positional relationship of each target object is obtained through the position indication information, and the multiple recognition fields obtained by the split image recognition are mapped according to the positional relationship of each target object, so as to obtain the target description information of each target object, that is, the position indication information assists the analysis to ensure the complete retention of valid information.
[0081] In some embodiments, the method further includes: obtaining current description information of each target object in a preset database, comparing the target description information of each target object with the current description information, determining the target field, and adjusting the current description information based on the target field.
[0082] In the embodiments of the present disclosure, after obtaining the target description information of each target object, data storage is required. It can be understood that in the real estate information management scenario, the current description information of the target object exists in the database. In order to ensure the real-time nature of the target object information, the current description information needs to be updated based on the target description information of the identified target object. Specifically, the target description information of each target object can be compared with the current description information to determine the target field, and the current description information can be adjusted based on the target field.
[0083] Among them, the target field can be understood as a field that is not included in the current description information of the target object or the field value corresponding to the field is different from the target description information. Therefore, the target field in the target description information and the field value corresponding to the target field can be updated to the current description information to further enrich the data information of the database.
[0084] In the above scheme, the data information in the database can be updated in real time according to the image recognition results, further ensuring the effectiveness and accuracy of data information management, meeting user needs, and improving user experience.
[0085] Based on the description of the aforementioned embodiments, different amounts of data contained in the images to be identified will result in differences in the size or dimensions of the images to be identified. Existing image recognition methods, especially for images to be identified that have large amounts of information and are of different sizes, have problems such as inaccurate recognition results, misreading, and phantom reading. Therefore, in order to improve recognition accuracy, reduce information loss, and enhance user experience, the image recognition method of the disclosed embodiment can split the image by a certain ratio so as to effectively segment and process the information in the image, so that the target description information of each target object can be accurately extracted and matched, which not only greatly reduces the difficulty and cost of data maintenance, but also improves the accuracy and completeness of information, and ultimately enhances the overall user experience. The following is combined with Figure 2 The article also provides a detailed description with examples of specific scenarios.
[0086] Figure 2 This is a flow chart of another image recognition method provided in an embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above image recognition method.
[0087] like Figure 2 As shown, the method includes:
[0088] Step 201: Acquire an image to be identified; wherein the image to be identified includes at least one target object and target description information corresponding to each target object.
[0089] For example, Figure 3 A schematic diagram of an image to be identified provided by an embodiment of the present disclosure is shown in the figure. The target object in the image to be identified is a house 11. The house 11 includes a house logo 12, a house area 13, a total house price 14, a unit house price 15, and a floor name 16. In addition, Figure 3 The target description message also includes a plurality of houses 11, each of which has a corresponding target description message.
[0090] in addition, Figure 3 The positional relationship between the houses is also displayed, and the positional relationship between the houses includes position indication information such as the name of the building to which the house belongs 21, the name of the building to which the house belongs 22, and the building unit to which the house belongs 23.
[0091] Step 202: obtain the position identifier of the image to be identified, determine the interception information of the image to be identified based on the position identifier, intercept the image to be identified according to the preset image screenshot ratio and interception information to obtain the position image, identify the position image, and obtain the position indication information.
[0092] Among them, the position identifier refers to the position information used to identify the image elements in the image to be identified, such as the image elements are arranged from top to bottom or the image elements are arranged from left to right, so that the interception information of the image to be identified can be determined according to the position identifier. For example, if the image elements are arranged from top to bottom, the interception information of the image to be identified is determined as intercepted from top to bottom; for another example, if the image elements are arranged from left to right, the interception information of the image to be identified is determined as intercepted from left to right.
[0093] For example, Figure 3 For example, the position mark of the image to be identified is that the image elements are arranged from top to bottom, so the image to be identified can be intercepted in order from top to bottom as the interception information. Therefore, the image to be identified can be intercepted in order from top to bottom according to a preset image screenshot ratio to obtain a position image, such as intercepting the image from top to bottom in order according to an image screenshot ratio such as one third. Figure 3 The obtained position image is as follows: Figure 4 shown.
[0094] Further, Figure 4 The text information can be obtained by performing text recognition on the location image shown in the figure, and then matching is performed in the text information according to the key fields required by the target object, so that the field value corresponding to the key field can be obtained as the location indication information. Figure 4 For example, the name of the building to which the house belongs 21, the name of the building to which the house belongs 22, and the building unit to which the house belongs 23 can be obtained as the location indication information.
[0095] After step 201, step 202, step 203 and step 204 may be executed. The execution order of step 202 to step 204 may be determined according to actual conditions. Figure 2 These are examples only.
[0096] Step 203: Obtain the target direction image pixel value of the image to be identified, and determine the splitting pixel based on the target direction image pixel value and a preset splitting ratio.
[0097] Step 204: obtain a preset splitting repetition ratio to adjust the splitting pixels to obtain target splitting pixels, and split the image to be recognized based on the target splitting pixels to obtain a split image.
[0098] Among them, different images to be identified have different numbers of target objects and different image sizes. For example, they are split according to the pixel height of the image to be identified. For example, there are 4-10 target objects in each row of the image to be identified, so it can be intercepted once every 3 rows, and an average of 500 to 600 pixels are intercepted once, so the number of splits can be obtained. Therefore, in some embodiments, the number of splits is obtained, and the target number of splits is determined based on the target direction image pixel value and the target splitting pixel. The number of splits is verified to further ensure the accuracy of the splitting; wherein, the splitting pixels can be flexibly set according to the actual application to further improve the flexibility and accuracy of the splitting.
[0099] It is understandable that if the same content is not contained in multiple split images, information loss may easily occur. Therefore, in the embodiment of the present disclosure, every two split images captured contain a certain proportion of repeated parts, such as 20%. Therefore, the recognition result of the split image is used to cover the same part of the previous split image with the recognition result of the latest split image to ensure correctness.
[0100] For example, continue with Figure 3 Take the image as an example, and split it according to a certain ratio of repeated content. The split image is as follows: Figure 5 and Figure 6 As shown, part of the same content is retained in the two split images, thereby further improving the accuracy of subsequent image recognition.
[0101] Step 205: obtain the positional relationship of each target object based on the position indication information, identify the split image to obtain multiple identification fields for each target object, process the multiple identification fields based on the positional relationship of each target object, and obtain target description information for each target object.
[0102] In an embodiment of the present disclosure, split identifiers of different split images are obtained, a target split image is determined from the different split images based on the split identifiers, target description information of the same target objects identified by the target split image is retained, and target description information of the same target objects not identified by the target split image is deleted.
[0103] It is understandable that the position indication information may be included in only some split images, but not in some split images. Therefore, only performing recognition on each split image may result in errors or omissions in the results of some split images, such as Figure 3 The subsequent split images may not lose information such as building number, building unit number, etc.
[0104] Therefore, in the process of identifying the split image, a dual-image mode is adopted. The position image is a partial screenshot of the image to be identified. The position indication information (such as the position relationship of the target object, etc.) is obtained as prior knowledge, and the split image is used as the image that actually needs to be analyzed. According to the position relationship of the position image, the split image recognition fields are correctly mapped to obtain the target description information of each target object.
[0105] As an example scenario, Figure 7 As shown, a position image and five split images are obtained for the image to be identified, and each split image is identified based on the position image in turn, and the five recognition results are merged to obtain the image recognition result corresponding to the image to be identified. Thus, the split images obtained by equal-proportion cutting are used to identify the special information of the room, and the position images obtained by a single cutting are used to extract public information, which are then integrated and output, further improving the efficiency and effect of image recognition, enhancing the user experience, and reducing the risk of information data loss.
[0106] Step 206: Obtain current description information of each target object in a preset database, compare the target description information of each target object with the current description information, determine the target field, and adjust the current description information based on the target field.
[0107] It is understandable that in the real estate information management scenario, the current description information of the target object exists in the database. In order to ensure the real-time nature of the target object information, the current description information needs to be updated according to the target description information of the identified target object.
[0108] Specifically, the target description information and current description information of each target object can be compared to determine the target field, and the current description information can be adjusted based on the target field, that is, the target field in the target description information and the field value corresponding to the target field are updated to the current description information, thereby further enriching the data information of the database.
[0109] Therefore, after obtaining the current description information of each target object, the data mapping integration can be flexibly deployed to efficiently match the image information to the database data, unify the data caliber, ensure the data closed loop, and further improve the effectiveness of data management.
[0110] The image recognition scheme provided by the embodiment of the present disclosure obtains an image to be recognized, wherein the image to be recognized includes at least one target object and target description information corresponding to each target object, obtains a position identifier of the image to be recognized, determines the interception information of the image to be recognized based on the position identifier, intercepts the image to be recognized according to a preset image screenshot ratio and the interception information to obtain a position image, and recognizes the position image, obtains position indication information, obtains target direction image pixel values of the image to be recognized, determines splitting pixels based on the target direction image pixel values and a preset splitting ratio, obtains a preset splitting repetition ratio to adjust the splitting pixels, obtains target splitting pixels, splits the image to be recognized based on the target splitting pixels to obtain a split image, obtains a position relationship of each target object based on the position indication information, recognizes the split images, obtains multiple recognition fields of each target object, processes the multiple recognition fields based on the position relationship of each target object, obtains target description information of each target object, obtains current description information of each target object in a preset database, compares the target description information of each target object with the current description information, determines the target field, and adjusts the current description information based on the target field. The above technical solution effectively solves the problem of incomplete and inaccurate information recognition in real estate information images through flexible screenshot recognition, special splitting strategies and common information extraction methods. By adding information matching nodes, the complete information recognition and matching process can be completed to achieve flexible application in complex real estate information scenarios, significantly improve the efficiency and accuracy of information extraction, reduce manual operation costs, and improve overall business processing efficiency.
[0111] Figure 8 This is a schematic diagram of the structure of an image recognition device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 8 As shown, the device comprises:
[0112] The first acquisition module 301 is used to acquire an image to be identified; wherein the image to be identified includes at least one target object and target description information corresponding to each target object;
[0113] The second acquisition module 302 is used to acquire a position image corresponding to the image to be recognized;
[0114] A first recognition module 303 is used to recognize the position image and obtain position indication information;
[0115] The third acquisition module 304 is used to acquire the split image corresponding to the image to be recognized;
[0116] The second recognition module 305 is used to recognize the split image based on the position indication information to obtain target description information corresponding to each target object in the image to be recognized.
[0117] Optionally, the second acquisition module 302 is specifically configured to:
[0118] Obtaining a location identifier of the image to be identified;
[0119] Determining the interception information of the image to be identified based on the position identifier;
[0120] The image to be identified is captured according to a preset image capture ratio and the capture information to obtain the position image.
[0121] Optionally, the third acquisition module 304 includes:
[0122] A first acquisition unit, used to acquire the target direction image pixel value of the image to be identified;
[0123] A first determining unit, configured to determine split pixels based on the target direction image pixel value and / or the target number of the target object and a preset split ratio;
[0124] The splitting unit is used to split the image to be identified based on the split pixels to obtain the split image.
[0125] Optionally, the third acquisition module 304 further includes:
[0126] A second acquisition unit is used to acquire a preset splitting and repetition ratio;
[0127] An adjusting unit, configured to adjust the split pixels according to the split repetition ratio to obtain target split pixels;
[0128] The splitting unit is specifically used for:
[0129] The image to be identified is split based on the target split pixels to obtain the split image.
[0130] Optionally, the third acquisition module 304 further includes:
[0131] A third acquisition unit is used to acquire the number of splits;
[0132] A second determining unit, configured to determine the number of target splitting times based on the target direction image pixel value and the target splitting pixel;
[0133] A verification unit is used to verify the number of splits based on the target number of splits.
[0134] Optionally, the second identification module 305 is specifically configured to:
[0135] Acquire the position relationship of each of the target objects based on the position indication information;
[0136] Recognize the split image to obtain multiple recognition fields of each target object;
[0137] The plurality of identification fields are processed based on the positional relationship of each of the target objects to obtain target description information of each of the target objects.
[0138] Optionally, when acquiring target description information of the same target object based on different split images, the device further includes:
[0139] A fourth acquisition module, used to acquire splitting marks of different split images;
[0140] A first determining module, configured to determine a target split image from different split images based on the split identifier;
[0141] The processing module is used to retain the target description information of the same target object identified by the target split image, and delete the target description information of the same target object not identified by the target split image.
[0142] Optionally, the device further comprises:
[0143] A fifth acquisition module, used to acquire current description information of each target object in a preset database;
[0144] A second determination module, configured to determine a target field based on a comparison between the target description information of each target object and the current description information;
[0145] An adjustment module is used to adjust the current description information based on the target field.
[0146] The image recognition device provided in the embodiments of the present disclosure can execute the image recognition method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0147] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which implements the image recognition method provided by any embodiment of the present disclosure when executed by a processor.
[0148] Fig. 9 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig. 9, which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 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.
[0149] like Fig. 9 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0150] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 400 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.
[0151] 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 carried on a non-transitory computer-readable medium, the computer program comprising a 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 via a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the image recognition method of the embodiment of the present disclosure are executed.
[0152] 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.
[0153] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0154] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0155] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains an image to be identified; wherein the image to be identified includes at least one target object and target description information corresponding to each target object, obtains a position image corresponding to the image to be identified, and identifies the position image, obtains position indication information, obtains a split image corresponding to the image to be identified, identifies the split image based on the position indication information, and obtains the target description information corresponding to each target object in the image to be identified.
[0156] 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, but not limited to, 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 a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through 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., through the Internet using an Internet service provider).
[0157] 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.
[0158] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0159] 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.
[0160] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0161] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0162] processor;
[0163] a memory for storing instructions executable by the processor;
[0164] The processor is used to read the executable instructions from the memory and execute the instructions to implement any image recognition method provided in the present disclosure.
[0165] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any image recognition method as provided by the present disclosure.
[0166] 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.
[0167] 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.
[0168] 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. An image recognition method, characterized in that: include: Acquire an image to be identified; wherein the image to be identified includes at least one target object and target description information corresponding to each target object; Acquire a position image corresponding to the image to be identified, and identify the position image to obtain position indication information; Obtaining a split image corresponding to the image to be identified; The split image is identified based on the position indication information to obtain target description information corresponding to each target object in the image to be identified.
2. The method according to claim 1, characterized in that The step of obtaining a position image corresponding to the image to be identified includes: Obtaining a location identifier of the image to be identified; Determining the interception information of the image to be identified based on the position identifier; The image to be identified is captured according to a preset image capture ratio and the capture information to obtain the position image.
3. The method according to claim 1, characterized in that The step of obtaining a split image corresponding to the image to be identified includes: Obtaining target direction image pixel values of the image to be identified; Determining split pixels based on the target direction image pixel value and / or the target number of the target object and a preset split ratio; The image to be identified is split based on the split pixels to obtain the split image.
4. The method according to claim 3, characterized in that The method further comprises: Get the preset split repetition ratio; Adjust the split pixels according to the split repetition ratio to obtain target split pixels; The step of splitting the image to be identified based on the split pixels to obtain the split image includes: The image to be identified is split based on the target split pixels to obtain the split image.
5. The method according to claim 4, characterized in that The method further comprises: Get the number of splits; Determine the number of target splitting times based on the target direction image pixel value and the target splitting pixel; The number of splits is verified based on the target number of splits.
6. The method according to claim 1, characterized in that The step of identifying the split image based on the position indication information to obtain target description information corresponding to each target object in the image to be identified includes: Acquire the position relationship of each of the target objects based on the position indication information; Recognize the split image to obtain multiple recognition fields of each target object; The plurality of identification fields are processed based on the positional relationship of each of the target objects to obtain target description information of each of the target objects.
7. The method according to claim 6, characterized in that When acquiring target description information of the same target object based on different split images, the method further includes: Obtaining splitting identifiers of different split images; Determining a target split image from different split images based on the split identifier; The target description information of the same target object identified by the target split image is retained, and the target description information of the same target object not identified by the target split image is deleted.
8. The method according to claim 1, characterized in that: The method further comprises: Obtain current description information of each target object in a preset database; Determine the target field based on comparing the target description information of each target object with the current description information; The current description information is adjusted based on the target field.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the image recognition method described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the image recognition method described in any one of claims 1 to 8.
11. A computer program product, characterized in that The invention comprises a computer program, wherein the computer program is executed by a processor to perform the image recognition method described in any one of claims 1 to 8.