WO2021046801A1 - Image recognition method, apparatus and device, and storage medium - Google Patents

Image recognition method, apparatus and device, and storage medium Download PDF

Info

Publication number
WO2021046801A1
WO2021046801A1 PCT/CN2019/105693 CN2019105693W WO2021046801A1 WO 2021046801 A1 WO2021046801 A1 WO 2021046801A1 CN 2019105693 W CN2019105693 W CN 2019105693W WO 2021046801 A1 WO2021046801 A1 WO 2021046801A1
Authority
WO
WIPO (PCT)
Prior art keywords
identified
name
image
preset
associated information
Prior art date
Application number
PCT/CN2019/105693
Other languages
French (fr)
Chinese (zh)
Inventor
赵利伟
Original Assignee
鸿合科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 鸿合科技股份有限公司 filed Critical 鸿合科技股份有限公司
Priority to PCT/CN2019/105693 priority Critical patent/WO2021046801A1/en
Publication of WO2021046801A1 publication Critical patent/WO2021046801A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web

Definitions

  • This application relates to the field of image processing technology, in particular to an image recognition method, device, equipment, and storage medium.
  • Image recognition refers to the use of computers to process, analyze, and understand images to identify targets and objects in various patterns. With the continuous advancement of science and technology, image recognition is increasingly used in people’s daily work. For example, in a traffic scene, after a capture machine captures an image of a vehicle, it can recognize the license plate of the image to obtain the license plate number of the vehicle. . However, in the prior art, the information that the user can obtain from the image recognition result is limited, which is not conducive to the user's information acquisition.
  • this application proposes an image recognition method, device, equipment, and storage medium, with the purpose of obtaining more information about the object to be recognized.
  • the first aspect of the present application provides an image recognition method, which includes:
  • a preset library is used to obtain the associated information of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information.
  • the obtaining the associated information of the object to be identified by using a preset library based on the name of the object to be identified includes: transmitting the name of the object to be identified to a server storing the preset library , So that the server determines the associated information of the object to be identified through the preset library; and receives the associated information of the object to be identified fed back by the server.
  • the obtaining the name of the object to be recognized in the image includes: obtaining the object to be recognized from the image; matching the object to be recognized with a preset object in a database; If the preset object matches the object to be identified, the name of the object to be identified is determined based on the matching result.
  • the method further includes: if there is no preset object matching the object to be recognized in the database, outputting prompt information; and obtaining a new preset object that can be matched with the object to be recognized And its name; storing the new preset object and its name in the database.
  • the method further includes: displaying the image, the name of the object to be identified, and the associated information.
  • the displaying the image, the name of the object to be identified, and the associated information includes: generating a label of the object to be identified, the label including the name of the object to be identified and the associated information Information; display the image, and display the label in a preset area of the image.
  • the displaying the image, the name of the object to be identified, and the associated information before further includes: matching the object to be identified with a pre-obtained sensitive object; if the object to be identified is If the sensitive object is not matched successfully, the display of the image, the name of the object to be identified, and the associated information is executed.
  • an image recognition device which includes:
  • the name determination module is used to obtain the name of the object to be identified in the image
  • the associated information acquisition module is configured to use a preset library to obtain the associated information of the object to be identified based on the name of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information .
  • the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor.
  • the processor executes the program as follows Any one of the image recognition methods provided in the first aspect of the present application.
  • the fourth aspect of the present application provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute Any one of the image recognition methods provided in the first aspect of the present application.
  • the image recognition method, device, equipment and storage medium provided by this application first obtain the name of the object to be recognized in the image, and then use the name of the object to be recognized and its corresponding associated information to be stored
  • the user uploads the image to the electronic device, and the electronic device obtains the name of the object to be identified in the image, and then obtains the name of the object to be identified in the preset library according to the name of the object to be identified.
  • the associated information of the object, and the associated information of the object to be identified is displayed to the user, so that the user can obtain more associated information of the object to be identified.
  • FIG. 1 is a schematic flowchart of an image recognition method provided by an embodiment of the application
  • Figure 2 is a display effect diagram provided by an embodiment of the application.
  • FIG. 3 is an explanation of step S1 in Figure 1;
  • FIG. 4 is a hardware architecture diagram shown in an exemplary embodiment of this application.
  • FIG. 5 is a schematic structural diagram of an image recognition device provided by an embodiment of the application.
  • the user when the user sees a singer’s poster, he takes a picture of the singer, and then uses the existing image recognition technology to identify the singer’s picture. Only the name of the singer can be obtained. If the user wants to get the singer’s birthday, height and weight, For more information such as education experience, performing arts experience, and recent concerts, the user also needs to enter the singer's name into the search engine for a second search to obtain more related information of the singer, which is cumbersome to operate and inefficient in obtaining information.
  • the embodiments of the present application provide an image recognition method, device, equipment, and storage medium. After obtaining the name of the object to be recognized in the image, use a preset library to continue to obtain the associated information of the object to be recognized, which can The associated information corresponding to the object to be identified is directly provided to the user, and the user can obtain more information about the object to be identified in the picture, which is convenient for the user to obtain information.
  • FIG. 1 is a schematic flowchart of an image recognition method provided by an embodiment of the application. The method includes:
  • the image uploaded by the user is received, and then the object to be recognized in the image is obtained.
  • the object to be recognized is the object that is expected to be recognized in the image.
  • the object to be recognized can be a vehicle, and when the image is a natural scenery, the object to be recognized can be trees, flowers, animals, etc. The specifics are not limited.
  • the user In a possible situation, according to the conventional shooting operation, the user generally places the desired recognition object in the central area of the captured image when shooting the object that the user desires to recognize.
  • the central area of the image can be intercepted as The object to be recognized, for example, the area of one-half of the center of the intercepted image, the area of one-third, the area of two-thirds, etc. are taken as the object to be recognized, which is not specifically limited.
  • the user can also specify the object to be recognized in the image.
  • the user can select Determine the object to be identified to be identified, and then determine the name of the object to be identified based on the user's selection.
  • manual settings can be made in advance.
  • set the same type of objects in the received image to be acquired as the object to be recognized, and then determine the same type of object to be acquired. Names of multiple objects to be identified in the image; for example, all trees, all vehicles, all animals, or all flowers in the image can be set to obtain, and the specifics are not limited.
  • the name of the object to be identified needs to be further determined.
  • the object to be identified can be directly received, the name of the object to be identified can be determined, and the name of the object to be identified can also be directly obtained, which is not limited here.
  • the name can be a Chinese name, or it can include both a Chinese name and a foreign name, such as English name, Russian name, Japanese name, Korean name, etc., and the specific name is not limited.
  • any image recognition technology can be used to obtain the name of the object to be identified, and the name of the object to be identified can be used to provide users with more relevant information about the object to be identified.
  • a specific example will be combined below. For explanation, I won't repeat it here.
  • the preset library is a pre-established library that stores the name of the object to be identified and the corresponding associated information.
  • the preset library can be searched to obtain the associated information of the object to be identified; the associated information of the object to be identified, Including but not limited to: the attributes of the object to be identified, the appearance characteristics of the object to be identified, the distribution area of the object to be identified, the classification of the object to be identified, etc., which are not specifically limited.
  • the preset library is pre-established locally. After the user uploads the image, the user determines the name of the object to be identified, and then retrieves the associated information corresponding to the object to be identified in the preset library.
  • the preset library is stored in a server, and the server may be a third-party server or a cloud server, which is not specifically limited.
  • the name of the object to be identified is transmitted to the server.
  • the name can be a Chinese name, or it can include both a Chinese name and a foreign name, and the specific is not limited; the server is based on the received name of the object to be identified Retrieve the associated information corresponding to the object to be identified in the preset library, and give feedback.
  • the name of the object to be identified is transmitted to the server storing the preset library, so that the server determines the associated information of the object to be identified through the preset library; and the associated information of the object to be identified fed back by the server is received.
  • the name of the object to be identified is transmitted to the server.
  • a preset library is stored in the server. The server retrieves the associated information of the object to be identified in the preset library and gives feedback.
  • a preset library is pre-stored in a third-party server, and after determining the name of the object to be identified in the image uploaded by the user, the name of the object to be identified is transmitted to the third-party server, and the third-party server receives the object to be identified After the name of the object, the related information corresponding to the object to be identified is retrieved in the preset library and feedback is given. In this embodiment, it also includes receiving the associated information of the object to be identified fed back by the server.
  • the name of the object to be identified is transmitted to the server storing the preset library, so that the server can determine the associated information of the object to be identified through the preset library, including:
  • the external source interface of the third-party server is called, and the name of the object to be identified is transmitted to the third-party server, so that the third-party server can determine the associated information of the object to be identified through the preset library.
  • the external source interface of the third-party server can be called through an HTTP request.
  • the third-party server has a preset library and a preset library.
  • the related information of the object to be identified is stored inside.
  • the default library can be Baidu Library, CNKI, Douding Library, Daoke Baba, 360doc Personal Library, etc., which are not specifically limited here; obtain third-party servers
  • the name of the object to be identified is transmitted to the third-party server through the external interface, and the third-party server retrieves the associated information of the object to be identified in the preset library after receiving the name of the object to be identified.
  • the third-party server retrieves the associated information of the object to be identified in the preset library, without the need to install the preset library locally, so that users can obtain more associated information of the object to be identified, rather than limited to the basic information carried by the image. .
  • the external source of the Baidu server is called through an HTTP request Interface, and then transmit the Chinese name poplar of the tree in the picture to the Baidu server through the external interface of the Baidu server.
  • the Baidu server After receiving the Chinese name poplar of the tree in the picture, the Baidu server searches for the association of poplars stored in the Baidu library Information; For example, the related information of poplars is: Populus classification system is divided into five schools: Tacamahaca, Leuce, Aigeiros, Turanga , Leucoides, the trunk is usually straight; the bark is smooth or longitudinally split, often grayish white, mainly distributed in central China, north China, northwest, northeast and other broad areas.
  • the Baidu server searches the poplar related information stored in the Baidu Library and feeds back the searched poplar related information; receives the related information fed back by the Baidu server, and displays the poplar name and its related information in the image, and then The image, the name of the poplar and the related information of the poplar are displayed to the user, and the display effect diagram can be as shown in Fig. 2 to facilitate the user's browsing.
  • a preset library is pre-stored in the cloud server, and after determining the name of the object to be identified in the image uploaded by the user, the name of the object to be identified is transmitted to the cloud server, and the cloud server receives the object to be identified After the name, search the associated information corresponding to the object to be identified in the preset library, and give feedback. In this embodiment, it also includes receiving the associated information of the object to be identified fed back by the server.
  • any method can be used to transmit the name of the object to be identified to the cloud server storing the preset library, for example, the name of the object to be identified can be directly transmitted to the cloud server, which is not specifically limited. Then, in some possible implementation manners, the name of the object to be identified is transmitted to the server storing the preset library, so that the server can determine the associated information of the object to be identified through the preset library, including:
  • the communication interface of the cloud server is called, and the name of the object to be identified is transmitted to the cloud server, so that the cloud server can determine the associated information of the object to be identified through the cloud library.
  • the cloud server In order to transmit the name of the object to be identified to the cloud server, after determining the name of the object to be identified in the image, you can transfer the name of the object to be identified to the cloud server by calling the communication interface of the cloud server, and the cloud server receives the object to be identified After the name, the associated information of the object to be identified is retrieved in the cloud library, and the associated information of the object to be identified is fed back.
  • the retrieval of the associated information of the object to be identified through the cloud server in the cloud library facilitates the user to obtain more associated information of the object to be identified, rather than limited to the basic information carried by the image.
  • the associated information can be directly provided to the user to facilitate the user's information acquisition.
  • the associated information can be provided to the user in any manner, for example, directly displayed to the user, which is not limited here.
  • the method may also include:
  • displaying the image, the name of the object to be identified, and the associated information to the user together can facilitate the user to obtain all the information of the object to be identified at one time and improve the user experience.
  • any method can be used to display the image, the name and associated information of the object to be identified, for example, the name and associated information of the object to be identified are directly displayed in the image, which is not specifically limited here.
  • the display image, the name and associated information of the object to be recognized may include:
  • a label of the object to be identified is generated, the label includes the name of the object to be identified and associated information; the image is displayed, and the label is displayed in a preset area of the image.
  • the name and associated information of the object to be identified are generated into tags.
  • the label in order to display the name and associated information of the object to be identified in the image more clearly and clearly, the label can be divided into the label body and the label content.
  • the label body is located in the image at the position pointing to the object to be identified, so as to achieve The role of pointing and prompting; in practical applications, the label body can be any shape, for example, the label body can be a virtual tail arrow, a dovetail arrow, an arc arrow, etc., which are not specifically limited here.
  • the label content includes the name and associated information of the object to be identified.
  • the label content can be displayed in the image in any shape, for example, it can be in the form of a rectangle label, a rounded rectangle label, a cloud label, an oval label, etc.
  • the label content is displayed in the preset area of the image, which is not specifically limited here.
  • the label After generating the label with the name and associated information of the object to be identified, the label is displayed in a preset area in the image.
  • the preset area is an area in the image that does not obscure the object to be identified, for example, the left side of the object to be identified in the image. Or the right side of the object to be identified in the image, etc., which are not specifically limited.
  • the label content can be placed in the lower right corner of the image or the lower left corner of the image, which is not specifically limited.
  • a label is generated from the name of the poplar and the associated information of the poplar, and then the label is displayed in the lower left corner of the image to prevent the poplar in the image from being blocked.
  • the name and associated information of the object to be identified are displayed in the image in the form of tags, which is convenient for the user to browse the associated information of the object to be identified in a simple and clear manner.
  • the received image may be a sensitive image that will spread bad social ethos; then, in some possible implementations, the image, the name of the object to be identified, and related information may also include:
  • the object to be identified is first matched with the sensitive object, and based on the matching result, it is determined whether to perform the steps of displaying the image, the name of the object to be identified and the associated information.
  • the sensitive object is a pre-established object used to verify whether the object to be identified will spread bad social atmosphere.
  • sensitive objects can be pre-stored in the database, and before matching the object to be identified with the preset object, before matching the object to be identified with the preset object After that or while matching the object to be recognized with the preset object, the object to be recognized in the image is matched with the sensitive object in the database.
  • the specifics are not limited; if the matching is successful, it means that the object to be recognized in the image involves sensitive objects.
  • Content In this case, the image is not displayed to the user or the image is covered. For example, the image can be covered with a white interface, or the image can be mosaicked.
  • the object to be recognized in the image is If the sensitive object in the database is not matched successfully, it means that the object to be identified in the image does not involve sensitive content. In this case, the image, the name and associated information of the object to be identified can be displayed to the user.
  • processing the image can effectively prevent the spread of undesirable content and purify the social atmosphere.
  • the image uploaded by the user is received, and then the name of the object to be identified in the image is obtained, the associated information of the object to be identified is obtained in the preset library according to the name of the object to be identified, and the association of the object to be identified is displayed to the user Information to facilitate users to obtain the associated information of the object to be identified.
  • Fig. 3 is an explanation of step S1 in Fig. 1.
  • obtaining the name of the object to be identified in the image may specifically include:
  • the object to be recognized is first obtained from the image; in order to obtain the object to be recognized in the image, a target detection algorithm can be used to detect the object to be recognized in the image.
  • the object to be recognized is the object that is expected to be recognized in the image. In practical applications, when the image is a street view, the object to be recognized can be a vehicle, and when the image is a natural scenery, the object to be recognized can be trees, flowers, animals, etc. The specifics are not limited.
  • a database may be established in advance.
  • the database includes preset objects.
  • the preset objects may be models obtained through three-dimensional modeling. In practical applications, the preset objects may be Vehicle models, tree models, flower models, animal models, etc., are not specifically limited.
  • the object to be identified can be matched with the preset object, and then the name of the object to be identified can be determined according to the name of the matched preset object.
  • the name of the object to be identified is determined based on the matching result.
  • the name of the preset object that successfully matches the object to be identified can be obtained as the name of the preset object according to the matching result.
  • the name of the identification object; the name can be a Chinese name, or it can include both a Chinese name and a foreign name, such as an English name, a Russian name, a Japanese name, a Korean name, etc., and the specific name is not limited.
  • the database may store the correspondence between the preset object and its name. Then, in some possible implementations, the name of the object to be identified is determined based on the matching result, including : Use the name corresponding to the preset object successfully matched with the object to be identified as the name of the object to be identified.
  • the name of the object to be identified can be quickly determined, so that the user can obtain the association of the object to be identified as soon as possible information.
  • the database can include a category library, a name library, and a model library.
  • the category library can be the ImageAI library of Python3, and the name library can be the PIP3 library of Python3; the category library is used to filter the types of objects to be identified in the image, for example,
  • the ImageAI library contains the basic outline of the object.
  • the ImageAI library can be used to filter whether the object to be recognized is a vehicle or a tree; the model library includes preset objects.
  • the model library is used to determine the type of the object to be recognized after filtering out the type of the object to be recognized For example, after screening the object to be identified is a tree, it is determined that the object to be identified is a poplar, willow or locust tree, etc.; the name database is used to determine the name of the object to be identified after determining the species of the object to be identified, for example, Determine the Chinese name and foreign name of the object to be identified.
  • the type library determines the name of the object to be identified; for example, the ImageAI library is used to filter out the type of object to be identified, and then the mathy version of the object to be identified in the form of a matrix in the model library is called, and the model.compile function is run to predict the object to be identified. Identify the specific species of the object, and then call the PIP3 library to obtain the Chinese name and foreign name of the object to be identified.
  • the electronic device (executive body, hereinafter referred to as the electronic device) that implements the solution can display an interactive interface with the user.
  • the electronic device stores a PIP3 library, an ImageAI library, and a model library.
  • the user takes a photo of the tree he sees, and inputs the captured image to the electronic device through the interactive interface.
  • the electronic device receives the picture uploaded by the user, it is first filtered through the ImageAI library and the object to be identified in the output picture is a tree. Then, the object to be recognized is matched with the preset object in the model library to confirm that the type of tree in the picture is poplar, and finally the Chinese name and English name poplar of the poplar are output through the PIP3 library.
  • the object to be recognized is first obtained from the image, and then the object to be recognized is matched with the preset object in the database, and finally the name of the object to be recognized is determined based on the matching result of the object to be recognized and the preset object, so as to update Quickly feedback the associated information of the object to be identified to the user.
  • the method further includes:
  • the new preset object and its name are stored in the database.
  • a prompt message is output to remind the user that the object to be recognized in the image cannot be recognized; and a new preset object that matches the object to be recognized is obtained, and
  • the name corresponding to the new preset object can be a Chinese name, or a Chinese name and a foreign name, such as English name, Russian name, Japanese name, Korean name, etc., and the specific name is not limited.
  • the operation and maintenance personnel can manually search for the unmatched object to be recognized, and obtain the new preset object and the Chinese name and foreign name of the object to be recognized; the new preset object to be obtained And the Chinese name and foreign name corresponding to the new preset object are stored in the database, so that when another user uploads the same object to be identified, the user can be fed back so that the user can obtain more related information of the object to be identified.
  • the object to be recognized in the picture cannot be successfully matched with the preset object in the model library, then the picture is saved in the ImageAI2 library, and a prompt message is output, indicating that the object in the picture cannot be recognized Objects to be identified; operation and maintenance personnel perform regular maintenance on the pictures in the ImageAI2 library, manually retrieve the new preset objects of the objects to be identified and the corresponding Chinese and foreign names, and save the new preset objects of the objects to be identified in the model library Inside, save the Chinese name and foreign name of the new preset object in the ImageAI library, so that when another user uploads the same object to be identified, it can provide feedback to the user.
  • the image recognition method first obtains the name of the object to be recognized in the image, and then uses a preset library that stores the name of the object to be recognized and its corresponding associated information to obtain the associated information of the object to be identified; Upload to the electronic device, the electronic device obtains the name of the object to be identified in the image, and then obtains the associated information of the object to be identified in the preset library according to the name of the object to be identified, and displays the associated information of the object to be identified to the user to facilitate the user to obtain More related information about the object to be identified.
  • the image recognition method in the foregoing embodiment can be implemented in the hardware architecture as shown in FIG. 4.
  • the hardware architecture may include an electronic device 101, a server 102.
  • the electronic device 101 can receive an image uploaded by a user.
  • the user can also upload images to the electronic device 101 through other user terminals, and the electronic device 101 and the user terminal can be connected via a network, which can specifically include various connection types, such as wired and wireless communication. Link or fiber optic cable, etc.
  • the electronic device 101 may specifically be a mobile phone, a tablet computer, etc., which is not specifically limited.
  • the electronic device 101 can store a name library, a category library, and a model library.
  • the category library determines the type of the object to be recognized in the image, and then determines the type of the object to be recognized based on the type of the object to be recognized through the model library, and finally based on the object to be recognized
  • the name of the object to be identified is determined through the name database.
  • the server 102 can be a third-party server or a cloud server; if the server 102 is a third-party server, the electronic device 101 can transfer information to the server 102 by calling an external source interface; if the server 102 is a cloud server, the electronic device 101 can call The communication interface transmits information to the server 102.
  • a preset library is stored in the server 102, and the server 102 can search the associated information of the object to be identified in its preset library and feed it back to the electronic device 101; the electronic device 101 provides the user with the associated information after receiving the associated information.
  • the server 102 may be hardware or software.
  • the server 102 can be implemented as a distributed server cluster composed of multiple servers, or as a single server.
  • the server 102 is software, it can be implemented as multiple software or software modules (for example, used to provide distributed services), or can be implemented as a single software or software module, which is not specifically limited herein.
  • the functions of the electronic device 101 and the server 102 may also be concentrated on one execution body.
  • the electronic device 101 and the server 102 may be two modules in the same execution body.
  • the numbers of the electronic device 101 and the server 102 in FIG. 4 are only illustrative. According to implementation needs, the system architecture can have any number of electronic devices and servers.
  • Fig. 5 is a schematic structural diagram of an image recognition device provided by an embodiment of the application, including:
  • the name determining module 301 is used to obtain the name of the object to be identified in the image
  • the associated information acquisition module 302 is configured to use a preset library to obtain associated information of the object to be identified based on the name of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information.
  • the associated information acquisition module 302 includes:
  • the transmission unit is configured to transmit the name of the object to be identified to the server storing the preset library, so that the server can determine the associated information of the object to be identified through the preset library;
  • the receiving unit is configured to receive the association information of the object to be identified fed back by the server.
  • the name determining module 301 includes:
  • the to-be-identified object acquiring unit is used to acquire the to-be-identified object from the image
  • the matching unit is used to match the object to be identified with the preset object in the database
  • the name determining unit is configured to determine the name of the object to be identified based on the matching result if there is a preset object matching the object to be identified in the database.
  • the device further includes a prompt information output module, a new preset object acquisition module, and a storage module (not shown in the figure), wherein:
  • the prompt information output module is used to output prompt information if there is no preset object matching the object to be identified in the database;
  • a new preset object acquisition module for acquiring a new preset object and its name that can be matched with the object to be identified
  • the storage module is used to store the new preset object and its name in the database.
  • the device further includes a display module (not shown in the figure) for displaying the image, the name of the object to be identified, and associated information.
  • a display module (not shown in the figure) for displaying the image, the name of the object to be identified, and associated information.
  • the display module includes:
  • the label generating unit is used to generate a label of the object to be identified, the label including the name of the object to be identified and associated information;
  • the label display unit is used to display the image and display the label in the preset area of the image.
  • the device further includes a sensitive object matching module (not shown in the figure), which is used to compare the object to be identified with the pre-obtained sensitive object before the image, the name of the object to be identified and the associated information are displayed on the display module.
  • a sensitive object matching module (not shown in the figure), which is used to compare the object to be identified with the pre-obtained sensitive object before the image, the name of the object to be identified and the associated information are displayed on the display module. Object matching If the object to be identified and the sensitive object are not successfully matched, the image, the name and associated information of the object to be identified will be displayed.
  • the device in the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
  • an electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor implements any of the above-mentioned image recognition methods when the program is executed. .
  • a non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute any of the above-mentioned image recognition methods.
  • the provided drawings may show the device in the form of a block diagram in order to avoid making the application difficult to understand, and this also takes into account the following facts, That is, the details of the implementation of these block diagram devices are highly dependent on the platform on which the application will be implemented (that is, these details should be fully within the understanding of those skilled in the art).
  • specific details for example, a circuit
  • DRAM dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An image recognition method, apparatus and device, and a storage medium, belonging to the field of image processing. The method comprises: acquiring the name of an object to be recognized in an image (S1); and on the basis of the name of the object to be recognized, using a preset library to obtain association information of the object to be recognized, wherein the preset library stores the name of the object to be recognized and association information corresponding thereto (S2). A user uploads an image to an electronic device, and the electronic device obtains the name of an object to be recognized in the image, and then obtains association information of the object to be recognized in the preset library according to the name of the object to be recognized, and displays the association information of the object to be recognized to the user; therefore, it is convenient for users to obtain more association information of the object to be recognized.

Description

一种图像识别方法、装置、设备及存储介质Image recognition method, device, equipment and storage medium 技术领域Technical field
本申请涉及图像处理技术领域,特别是指一种图像识别方法、装置、设备及存储介质。This application relates to the field of image processing technology, in particular to an image recognition method, device, equipment, and storage medium.
背景技术Background technique
图像识别是指利用计算机对图像进行处理、分析和理解,以识别各种不同模式的目标和对象的技术。随着科技地不断进步,图像识别越来越多的应用于人们的日常生活工作中,例如,交通场景中,抓拍机拍摄到车辆图像后,可以对该图像进行车牌识别,得到车辆的车牌号。但是,现有技术中用户从图像识别结果中得到的信息有限,不利于用户的信息获取。Image recognition refers to the use of computers to process, analyze, and understand images to identify targets and objects in various patterns. With the continuous advancement of science and technology, image recognition is increasingly used in people’s daily work. For example, in a traffic scene, after a capture machine captures an image of a vehicle, it can recognize the license plate of the image to obtain the license plate number of the vehicle. . However, in the prior art, the information that the user can obtain from the image recognition result is limited, which is not conducive to the user's information acquisition.
发明内容Summary of the invention
有鉴于此,本申请提出一种图像识别方法、装置、设备及存储介质,目的在于获得待识别对象相关的更多信息。In view of this, this application proposes an image recognition method, device, equipment, and storage medium, with the purpose of obtaining more information about the object to be recognized.
基于上述目的,本申请第一方面提供了一种图像识别方法,所述方法包括:Based on the foregoing objectives, the first aspect of the present application provides an image recognition method, which includes:
获取图像中待识别对象的名称;Obtain the name of the object to be identified in the image;
基于所述待识别对象的名称,利用预设文库获得所述待识别对象的关联信息;所述预设文库存储有所述待识别对象的名称及其对应的关联信息。Based on the name of the object to be identified, a preset library is used to obtain the associated information of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information.
可选的,所述基于所述待识别对象的名称,利用预设文库获得所述待识别对象的关联信息,包括:将所述待识别对象的名称传输给存储有所述预设文库的服务器,以使所述服务器通过所述预设文库确定所述待识别对象的关联信息;接收所述服务器反馈的所述待识别对象的关联信息。Optionally, the obtaining the associated information of the object to be identified by using a preset library based on the name of the object to be identified includes: transmitting the name of the object to be identified to a server storing the preset library , So that the server determines the associated information of the object to be identified through the preset library; and receives the associated information of the object to be identified fed back by the server.
可选的,所述获取图像中待识别对象的名称,包括:从图像中获取所述待识别对象;将所述待识别对象与数据库中的预设对象进行匹配;若所述数据库中存在与所述待识别对象相匹配的预设对象,则基于匹配结果确定所述待识别对象的名称。Optionally, the obtaining the name of the object to be recognized in the image includes: obtaining the object to be recognized from the image; matching the object to be recognized with a preset object in a database; If the preset object matches the object to be identified, the name of the object to be identified is determined based on the matching result.
可选的,所述方法还包括:若所述数据库中不存在与所述待识别对象相匹配的预设对象,则输出提示信息;获取能够与所述待识别对象相匹配的新预设对象及其名称;将所述新预设对象及其名称存储至所述数据库中。Optionally, the method further includes: if there is no preset object matching the object to be recognized in the database, outputting prompt information; and obtaining a new preset object that can be matched with the object to be recognized And its name; storing the new preset object and its name in the database.
可选的,所述方法还包括:显示所述图像、所述待识别对象的名称和所述关联信息。Optionally, the method further includes: displaying the image, the name of the object to be identified, and the associated information.
可选的,所述显示所述图像、所述待识别对象的名称和所述关联信息,包括:生成所述待识别对象的标签,所述标签包括所述待识别对象的名称以及所述关联信息;显示所述图像,并在所述图像的预设区域显示所述标签。Optionally, the displaying the image, the name of the object to be identified, and the associated information includes: generating a label of the object to be identified, the label including the name of the object to be identified and the associated information Information; display the image, and display the label in a preset area of the image.
可选的,所述显示所述图像、所述待识别对象的名称和所述关联信息,之前还包括:将所述待识别对象与预先得到的敏感对象进行匹配;若所述待识别对象与所述敏感对象未匹配成功,则执行所述显示所述图像、所述待识别对象的名称和所述关联信息。Optionally, the displaying the image, the name of the object to be identified, and the associated information before further includes: matching the object to be identified with a pre-obtained sensitive object; if the object to be identified is If the sensitive object is not matched successfully, the display of the image, the name of the object to be identified, and the associated information is executed.
基于相同的发明构思,本申请第二方面提供了一种图像识别装置,所述装置包括:Based on the same inventive concept, the second aspect of the present application provides an image recognition device, which includes:
名称确定模块,用于获取图像中待识别对象的名称;The name determination module is used to obtain the name of the object to be identified in the image;
关联信息获取模块,用于基于所述待识别对象的名称,利用预设文库获得所述待识别对象的关联信息;所述预设文库存储有所述待识别对象的名称及其对应的关联信息。The associated information acquisition module is configured to use a preset library to obtain the associated information of the object to be identified based on the name of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information .
基于相同的发明构思,本申请第三方面提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如本申请第一方面提供的图像识别方法中的任意一种。Based on the same inventive concept, the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor. The processor executes the program as follows Any one of the image recognition methods provided in the first aspect of the present application.
基于相同的发明构思,本申请第四方面提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行如本申请第一方面提供的图像识别方法中的任意一种。Based on the same inventive concept, the fourth aspect of the present application provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute Any one of the image recognition methods provided in the first aspect of the present application.
从上面所述可以看出,本申请提供的一种图像识别的方法、装置、设备及存储介质,首先获取图像中待识别对象的名称,然后利用存储有待识别对象的名称及其对应的关联信息的预设文库获得待识别对象的关联信息;本方 案中,用户将图像上传至电子设备,电子设备获得图像中待识别对象的名称,然后根据待识别对象的名称在预设文库中获取待识别对象的关联信息,并向用户显示待识别对象的关联信息,方便用户获得待识别对象的更多关联信息。It can be seen from the above that the image recognition method, device, equipment and storage medium provided by this application first obtain the name of the object to be recognized in the image, and then use the name of the object to be recognized and its corresponding associated information to be stored In this solution, the user uploads the image to the electronic device, and the electronic device obtains the name of the object to be identified in the image, and then obtains the name of the object to be identified in the preset library according to the name of the object to be identified. The associated information of the object, and the associated information of the object to be identified is displayed to the user, so that the user can obtain more associated information of the object to be identified.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本申请实施例提供的图像识别方法的流程示意图;FIG. 1 is a schematic flowchart of an image recognition method provided by an embodiment of the application;
图2为本申请实施例提供的显示效果图;Figure 2 is a display effect diagram provided by an embodiment of the application;
图3为对图1中步骤S1的解释说明;Figure 3 is an explanation of step S1 in Figure 1;
图4为本申请一示例性实施例示出的硬件架构图;FIG. 4 is a hardware architecture diagram shown in an exemplary embodiment of this application;
图5为本申请实施例提供的图像识别装置的结构示意图。FIG. 5 is a schematic structural diagram of an image recognition device provided by an embodiment of the application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请进一步详细说明。In order to make the objectives, technical solutions, and advantages of the present application clearer, the following further describes the present application in detail in conjunction with specific embodiments and with reference to the accompanying drawings.
需要说明的是,本申请实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本申请实施例的限定,后续实施例对此不再一一说明。It should be noted that all the expressions "first" and "second" used in the examples of this application are used to distinguish two entities with the same name but not the same or parameters that are not the same, as shown in "first" and "second" Only for the convenience of presentation, it should not be construed as a limitation to the embodiments of the present application, and subsequent embodiments will not describe this one by one.
一些现有方案中,在进行图像识别时,只能识别得到图像中待识别对象的基本信息(如名称),用户还需要另行检索才能够得到待识别对象的其他相关信息。In some existing solutions, when performing image recognition, only the basic information (such as the name) of the object to be recognized in the image can be recognized, and the user needs to search separately to obtain other related information of the object to be recognized.
例如,当用户在看到喜欢的新款汽车时,对汽车进行拍照,然后采用现有图像识别技术对汽车图片进行识别时,仅仅能获得该汽车的品牌、型号等信息,如果用户想要获得该汽车的性能参数、4S店报价等信息时,还需要通过输入汽车品牌、型号等信息在搜索引擎中进行二次搜索,而不能仅通过现有图像识别技术获得该汽车的关联信息,增加了操作繁琐性,降低了信息获得的效率。For example, when a user sees a new car he likes, he takes a picture of the car, and then uses the existing image recognition technology to recognize the car picture, only the brand, model and other information of the car can be obtained. If the user wants to obtain this When car performance parameters, 4S shop quotation and other information, you also need to enter the car brand, model and other information in the search engine to perform a second search, but can not only obtain the relevant information of the car through the existing image recognition technology, increase the operation The cumbersomeness reduces the efficiency of information acquisition.
或者,当用户看到某歌手海报时,对该歌手进行拍照,然后利用现有图像识别技术对歌手图片进行识别,仅能获得该歌手姓名,如果用户想要得到该歌手的生日、身高体重、教育经历、演艺经历、以及近期演唱会等更多信息时,用户还需要将歌手姓名输入搜索引擎中进行二次搜索,以获得该歌手更多的关联信息,操作繁琐,信息获取效率低下。Or, when the user sees a singer’s poster, he takes a picture of the singer, and then uses the existing image recognition technology to identify the singer’s picture. Only the name of the singer can be obtained. If the user wants to get the singer’s birthday, height and weight, For more information such as education experience, performing arts experience, and recent concerts, the user also needs to enter the singer's name into the search engine for a second search to obtain more related information of the singer, which is cumbersome to operate and inefficient in obtaining information.
为了解决上述技术问题,本申请实施例提供了一种图像识别方法、装置、设备及存储介质,在获取图像中待识别对象的名称后,利用预设文库继续得到待识别对象的关联信息,能够直接将待识别对象对应的关联信息提供给用户,用户能够获得图片中待识别对象的更多信息,便于用户的信息获取。In order to solve the above technical problems, the embodiments of the present application provide an image recognition method, device, equipment, and storage medium. After obtaining the name of the object to be recognized in the image, use a preset library to continue to obtain the associated information of the object to be recognized, which can The associated information corresponding to the object to be identified is directly provided to the user, and the user can obtain more information about the object to be identified in the picture, which is convenient for the user to obtain information.
为了便于理解,下面结合附图对该图像识别方法进行详细说明。For ease of understanding, the image recognition method will be described in detail below in conjunction with the accompanying drawings.
图1为本申请实施例提供的图像识别方法的流程示意图。该方法包括:FIG. 1 is a schematic flowchart of an image recognition method provided by an embodiment of the application. The method includes:
S1、获取图像中待识别对象的名称。S1. Obtain the name of the object to be identified in the image.
本申请实施例中,接收用户上传的图像,然后获取图像中的待识别对象。待识别对象为图像中期望被识别的对象,在实际应用中,当图像为街景时,待识别对象可以为车辆,当图像为自然风景时,待识别对象可以为树木、鲜花、动物等等,具体不做限定。In the embodiment of the present application, the image uploaded by the user is received, and then the object to be recognized in the image is obtained. The object to be recognized is the object that is expected to be recognized in the image. In practical applications, when the image is a street view, the object to be recognized can be a vehicle, and when the image is a natural scenery, the object to be recognized can be trees, flowers, animals, etc. The specifics are not limited.
一种可能的情况下,根据常规拍摄操作,用户在拍摄期望识别的对象时一般会将期望识别的对象放置在拍摄图像的中央区域,在接收用户上传的图像后,可以截取图像的中央区域作为待识别对象,比如,截取图像中央二分之一的区域、三分之一的区域、三分之二的区域等等作为待识别对象,具体不做限定。在另一种情况下,还可以由用户指定图像中的待识别对象。In a possible situation, according to the conventional shooting operation, the user generally places the desired recognition object in the central area of the captured image when shooting the object that the user desires to recognize. After receiving the image uploaded by the user, the central area of the image can be intercepted as The object to be recognized, for example, the area of one-half of the center of the intercepted image, the area of one-third, the area of two-thirds, etc. are taken as the object to be recognized, which is not specifically limited. In another case, the user can also specify the object to be recognized in the image.
在实际应用中,用户上传的图像中可能存在有多个对象,为了确定出图像中的待识别对象,一种可能的情况下,接收的图像中有多个对象时,可以通过用户选择的方式确定需要识别的待识别对象,然后基于用户的选择确定待识别对象的名称。另一种可能的情况下,可以预先进行人工设定,接收的图像中有多个对象时,设定对接收的图像中的同一种类对象均获取作为待识别对象,然后分别确定获取的同一种类中多个待识别对象的名称;例如,可以设定获取图像中的所有树木、所有车辆、所有动物或所有鲜花等等,具体不做限定。In actual applications, there may be multiple objects in the image uploaded by the user. In order to determine the object to be recognized in the image, in a possible situation, when there are multiple objects in the received image, the user can select Determine the object to be identified to be identified, and then determine the name of the object to be identified based on the user's selection. In another possible case, manual settings can be made in advance. When there are multiple objects in the received image, set the same type of objects in the received image to be acquired as the object to be recognized, and then determine the same type of object to be acquired. Names of multiple objects to be identified in the image; for example, all trees, all vehicles, all animals, or all flowers in the image can be set to obtain, and the specifics are not limited.
为了获取待识别对象更多的关联信息,需要进一步确定待识别对象的名称,可以直接接收到待识别对象,确定待识别对象的名称,还可以直接获取 待识别对象的名称,这里不进行限定。名称可以为中文名称,也可以既包括中文名称又包括外文名称,比如,英文名称、俄文名称、日文名称、韩文名称等等,具体不做限定。在获取到待识别对象的名称后,可以利用任意一种图像识别技术得到待识别对象的名称,利用待识别对象的名称为用户提供待识别对象更多的相关信息,下面将结合一个具体的例子进行说明,这里先不赘述。In order to obtain more related information of the object to be identified, the name of the object to be identified needs to be further determined. The object to be identified can be directly received, the name of the object to be identified can be determined, and the name of the object to be identified can also be directly obtained, which is not limited here. The name can be a Chinese name, or it can include both a Chinese name and a foreign name, such as English name, Russian name, Japanese name, Korean name, etc., and the specific name is not limited. After obtaining the name of the object to be identified, any image recognition technology can be used to obtain the name of the object to be identified, and the name of the object to be identified can be used to provide users with more relevant information about the object to be identified. A specific example will be combined below. For explanation, I won't repeat it here.
S2、基于所述待识别对象的名称,利用预设文库获得所述待识别对象的关联信息。S2. Based on the name of the object to be identified, use a preset library to obtain the associated information of the object to be identified.
在本申请实施例中,预设文库为预先建立的存储有待识别对象的名称及其对应的关联信息的文库。为了得到待识别对象的关联信息,在确定出待识别对象的名称后,基于待识别对象的名称,可以在预设文库中搜索,从而得到待识别对象的关联信息;待识别对象的关联信息,包括但不限于:待识别对象的属性、待识别对象的外形特征、待识别对象的分布区域、待识别对象的分类等等,具体不做限定。In the embodiment of the present application, the preset library is a pre-established library that stores the name of the object to be identified and the corresponding associated information. In order to obtain the associated information of the object to be identified, after the name of the object to be identified is determined, based on the name of the object to be identified, the preset library can be searched to obtain the associated information of the object to be identified; the associated information of the object to be identified, Including but not limited to: the attributes of the object to be identified, the appearance characteristics of the object to be identified, the distribution area of the object to be identified, the classification of the object to be identified, etc., which are not specifically limited.
在一些可能的实施方式中,预设文库为在本地预先建立的,用户上传图像后,确定待识别对象的名称,然后在预设文库内检索与待识别对象对应的关联信息。In some possible implementation manners, the preset library is pre-established locally. After the user uploads the image, the user determines the name of the object to be identified, and then retrieves the associated information corresponding to the object to be identified in the preset library.
在另一些可能的实施方式中,预设文库存储在服务器中,服务器可以为第三方服务器,也可以为云端服务器,具体不作限定。在确定待识别对象的名称后,将待识别对象的名称传输给服务器,名称可以为中文名称,也可以既包括中文名称又包括外文名称,具体不做限定;服务器基于接收的待识别对象的名称在预设文库内检索待识别对象对应的关联信息,并进行反馈。In other possible implementation manners, the preset library is stored in a server, and the server may be a third-party server or a cloud server, which is not specifically limited. After determining the name of the object to be identified, the name of the object to be identified is transmitted to the server. The name can be a Chinese name, or it can include both a Chinese name and a foreign name, and the specific is not limited; the server is based on the received name of the object to be identified Retrieve the associated information corresponding to the object to be identified in the preset library, and give feedback.
则,基于待识别对象的名称,利用预设文库获得待识别对象的关联信息,包括:Then, based on the name of the object to be identified, using the preset library to obtain the associated information of the object to be identified includes:
将待识别对象的名称传输给存储有预设文库的服务器,以使服务器通过预设文库确定待识别对象的关联信息;接收服务器反馈的待识别对象的关联信息。The name of the object to be identified is transmitted to the server storing the preset library, so that the server determines the associated information of the object to be identified through the preset library; and the associated information of the object to be identified fed back by the server is received.
为了获得待识别对象的关联信息,将待识别对象的名称传输给服务器,服务器中存储有预设文库,服务器在预设文库内检索待识别对象的关联信息,并进行反馈。In order to obtain the associated information of the object to be identified, the name of the object to be identified is transmitted to the server. A preset library is stored in the server. The server retrieves the associated information of the object to be identified in the preset library and gives feedback.
在一种情况下,在第三方服务器内预先存储预设文库,确定用户上传的 图像中的待识别对象的名称后,将待识别对象的名称传输给第三方服务器,第三方服务器接收到待识别对象的名称后,在预设文库中检索待识别对象对应的关联信息并进行反馈。在本实施方式中,还包括接收服务器反馈的待识别对象的关联信息。In one case, a preset library is pre-stored in a third-party server, and after determining the name of the object to be identified in the image uploaded by the user, the name of the object to be identified is transmitted to the third-party server, and the third-party server receives the object to be identified After the name of the object, the related information corresponding to the object to be identified is retrieved in the preset library and feedback is given. In this embodiment, it also includes receiving the associated information of the object to be identified fed back by the server.
在实际应用中,可以有多种方式将待识别对象的名称传输给存储有预设文库的第三方服务器,例如,直接将待识别对象的名称传输给第三方服务器,具体不做限定。则,在一些可能的实施方式中,将待识别对象的名称传输给存储有预设文库的服务器,以使服务器通过预设文库确定待识别对象的关联信息,包括:In practical applications, there may be multiple ways to transmit the name of the object to be identified to a third-party server that stores a preset library, for example, directly transmitting the name of the object to be identified to the third-party server, which is not specifically limited. Then, in some possible implementation manners, the name of the object to be identified is transmitted to the server storing the preset library, so that the server can determine the associated information of the object to be identified through the preset library, including:
调用第三方服务器的外源接口,将待识别对象的名称传输给第三方服务器,以使第三方服务器通过预设文库确定待识别对象的关联信息。The external source interface of the third-party server is called, and the name of the object to be identified is transmitted to the third-party server, so that the third-party server can determine the associated information of the object to be identified through the preset library.
为了将待识别对象的名称传输给第三方服务器,在确定图像中待识别对象的名称后,可以通过HTTP请求调用第三方服务器的外源接口,第三方服务器上存储有预设文库,预设文库内存储有待识别对象的关联信息,比如,预设文库可以是百度文库、中国知网、豆丁文库、道客巴巴、360doc个人图书馆等等,在此不做具体限定;获取第三方服务器的外源接口后,将待识别对象的名称通过外源接口传输给第三方服务器,第三方服务器在接收到待识别对象的名称后,在预设文库内检索待识别对象的关联信息。In order to transmit the name of the object to be identified to the third-party server, after determining the name of the object to be identified in the image, the external source interface of the third-party server can be called through an HTTP request. The third-party server has a preset library and a preset library. The related information of the object to be identified is stored inside. For example, the default library can be Baidu Library, CNKI, Douding Library, Daoke Baba, 360doc Personal Library, etc., which are not specifically limited here; obtain third-party servers After the external source interface, the name of the object to be identified is transmitted to the third-party server through the external interface, and the third-party server retrieves the associated information of the object to be identified in the preset library after receiving the name of the object to be identified.
可以理解的是,通过第三方服务器在预设文库内检索待识别对象的关联信息,无需本地安装预设文库,便于用户获得待识别对象更多的关联信息,而不是仅限于图像携带的基本信息。It is understandable that the third-party server retrieves the associated information of the object to be identified in the preset library, without the need to install the preset library locally, so that users can obtain more associated information of the object to be identified, rather than limited to the basic information carried by the image. .
例如,接收到用户上传的图片,并且确定图片中的树木为待识别对象后,通过对图片中的树木进行识别,确定图片中树木的中文名称杨树后,通过HTTP请求调用百度服务器的外源接口,然后将图片中树木的中文名称杨树通过百度服务器的外源接口传输给百度服务器,百度服务器在接收到图片中树木的中文名称杨树后,搜索百度文库内存储的有关杨树的关联信息;比如,杨树的关联信息为:杨属(Populus)分类系统又共分为五大派:青杨派(Tacamahaca)、白杨派(Leuce)、黑杨派(Aigeiros)、胡杨派(Turanga)、大叶杨派(Leucoides),树干通常端直;树皮光滑或纵裂,常为灰白色,主要分布于华中、华北、西北、东北等广阔地区。百度服务器搜索百度文库内存储的杨树的关联信息后并将搜索到的杨树的关联信息进行反馈;接收百度 服务器反馈的关联信息,并将杨树名称及其关联信息显示在图像内,然后向用户显示图像、杨树名称及杨树的关联信息,显示效果图可以如图2所示,以便于用户浏览。For example, after receiving a picture uploaded by a user and determining that the tree in the picture is the object to be identified, by identifying the tree in the picture, after determining the Chinese name of the tree in the picture, poplar, the external source of the Baidu server is called through an HTTP request Interface, and then transmit the Chinese name poplar of the tree in the picture to the Baidu server through the external interface of the Baidu server. After receiving the Chinese name poplar of the tree in the picture, the Baidu server searches for the association of poplars stored in the Baidu library Information; For example, the related information of poplars is: Populus classification system is divided into five schools: Tacamahaca, Leuce, Aigeiros, Turanga , Leucoides, the trunk is usually straight; the bark is smooth or longitudinally split, often grayish white, mainly distributed in central China, north China, northwest, northeast and other broad areas. The Baidu server searches the poplar related information stored in the Baidu Library and feeds back the searched poplar related information; receives the related information fed back by the Baidu server, and displays the poplar name and its related information in the image, and then The image, the name of the poplar and the related information of the poplar are displayed to the user, and the display effect diagram can be as shown in Fig. 2 to facilitate the user's browsing.
在另一种情况下,在云端服务器内预先存储预设文库,确定用户上传的图像中的待识别对象的名称后,将待识别对象的名称传输给云端服务器,云端服务器在接收到待识别对象的名称后,在预设文库中检索待识别对象对应的关联信息,并进行反馈。在本实施方式中,还包括接收服务器反馈的待识别对象的关联信息。In another case, a preset library is pre-stored in the cloud server, and after determining the name of the object to be identified in the image uploaded by the user, the name of the object to be identified is transmitted to the cloud server, and the cloud server receives the object to be identified After the name, search the associated information corresponding to the object to be identified in the preset library, and give feedback. In this embodiment, it also includes receiving the associated information of the object to be identified fed back by the server.
在实际应用中,可以采用任一方式将待识别对象的名称传输给存储有预设文库的云端服务器,例如,直接将待识别对象的名称传输给云端服务器,具体不做限定。则,在一些可能的实施方式中,将待识别对象的名称传输给存储有预设文库的服务器,以使服务器通过预设文库确定待识别对象的关联信息,包括:In practical applications, any method can be used to transmit the name of the object to be identified to the cloud server storing the preset library, for example, the name of the object to be identified can be directly transmitted to the cloud server, which is not specifically limited. Then, in some possible implementation manners, the name of the object to be identified is transmitted to the server storing the preset library, so that the server can determine the associated information of the object to be identified through the preset library, including:
调用云端服务器的通信接口,将待识别对象的名称传输给云端服务器,以使云端服务器通过云端文库确定待识别对象的关联信息。The communication interface of the cloud server is called, and the name of the object to be identified is transmitted to the cloud server, so that the cloud server can determine the associated information of the object to be identified through the cloud library.
为了将待识别对象的名称传输给云端服务器,在确定图像中待识别对象的名称后,可以通过调用云端服务器的通信接口,将待识别对象的名称传输给云端服务器,云端服务器上接收待识别对象的名称后,在云端文库内检索待识别对象的关联信息,并将待识别对象的关联信息进行反馈。In order to transmit the name of the object to be identified to the cloud server, after determining the name of the object to be identified in the image, you can transfer the name of the object to be identified to the cloud server by calling the communication interface of the cloud server, and the cloud server receives the object to be identified After the name, the associated information of the object to be identified is retrieved in the cloud library, and the associated information of the object to be identified is fed back.
可以理解的是,通过云端服务器在云端文库内检索待识别对象的关联信息,便于用户获得待识别对象更多的关联信息,而不是仅限于图像携带的基本信息。It is understandable that the retrieval of the associated information of the object to be identified through the cloud server in the cloud library facilitates the user to obtain more associated information of the object to be identified, rather than limited to the basic information carried by the image.
在基于待识别对象的名称得到其关联信息后,可以直接将关联信息提供给用户,便于用户的信息获取。在实际应用中,可以利用任意一种方式将关联信息提供给用户,例如直接显示给用户,这里不进行限定。则,在一些可能的实现方式中,该方法还可以包括:After obtaining the associated information based on the name of the object to be identified, the associated information can be directly provided to the user to facilitate the user's information acquisition. In actual applications, the associated information can be provided to the user in any manner, for example, directly displayed to the user, which is not limited here. Then, in some possible implementation manners, the method may also include:
显示图像、待识别对象的名称和关联信息。Display the image, the name of the object to be identified and the associated information.
可以理解的是,将图像、待识别对象的名称和关联信息一并显示给用户,可以方便用户一次性的获取到待识别对象的全部信息,提高了用户体验。It is understandable that displaying the image, the name of the object to be identified, and the associated information to the user together can facilitate the user to obtain all the information of the object to be identified at one time and improve the user experience.
在实际应用中,可以利用任意一种方式显示图像、待识别对象的名称和关联信息,例如在图像中直接显示待识别对象的名称和关联信息,这里不做 具体限定。则,在一些可能的实施方式中,显示图像、待识别对象的名称和关联信息,可以包括:In practical applications, any method can be used to display the image, the name and associated information of the object to be identified, for example, the name and associated information of the object to be identified are directly displayed in the image, which is not specifically limited here. Then, in some possible implementation manners, the display image, the name and associated information of the object to be recognized may include:
生成待识别对象的标签,标签包括待识别对象的名称以及关联信息;显示图像,并在图像的预设区域显示标签。A label of the object to be identified is generated, the label includes the name of the object to be identified and associated information; the image is displayed, and the label is displayed in a preset area of the image.
基于方便用户快速明了的浏览待识别对象的关联信息的目的,将待识别对象的名称、关联信息生成标签。For the purpose of facilitating the user to quickly and clearly browse the associated information of the object to be identified, the name and associated information of the object to be identified are generated into tags.
举例来说,为使待识别对象的名称及关联信息在图像中更加清晰明了地显示,可以将标签分为标签本体和标签内容,标签本体位于图像中指向待识别对象的位置处,以起到指向和提示的作用;在实际应用中,标签本体可以是任意形状,例如标签本体可以是虚尾箭头、燕尾形箭头、弧形箭头等等,在此不做具体限定。标签内容包括待识别对象的名称以及关联信息,在实际应用中,标签内容可以以任意形状显示在图像中,例如可以以矩形标注、圆角矩形标注、云形标注、椭圆形标注等等的形式在图像的预设区域内显示标签内容,在此不做具体限定。For example, in order to display the name and associated information of the object to be identified in the image more clearly and clearly, the label can be divided into the label body and the label content. The label body is located in the image at the position pointing to the object to be identified, so as to achieve The role of pointing and prompting; in practical applications, the label body can be any shape, for example, the label body can be a virtual tail arrow, a dovetail arrow, an arc arrow, etc., which are not specifically limited here. The label content includes the name and associated information of the object to be identified. In actual applications, the label content can be displayed in the image in any shape, for example, it can be in the form of a rectangle label, a rounded rectangle label, a cloud label, an oval label, etc. The label content is displayed in the preset area of the image, which is not specifically limited here.
在将待识别对象的名称、关联信息生成标签后,将标签显示在图像中的预设区域,预设区域为图像中不遮挡待识别对象的区域,比如,图像中待识别对象的左侧,或者图像中待识别对象的右侧等等,具体不做限定。After generating the label with the name and associated information of the object to be identified, the label is displayed in a preset area in the image. The preset area is an area in the image that does not obscure the object to be identified, for example, the left side of the object to be identified in the image. Or the right side of the object to be identified in the image, etc., which are not specifically limited.
举例来说,为了减少遮挡图像内待识别对象的情况,可以将标签内容放置于图像右下角或者图像左下角,具体不做限定。例如,附图2中,将杨树名称及杨树的关联信息生成标签,然后将标签显示在图像的左下角,以防止遮挡图像中的杨树。For example, in order to reduce the occlusion of the object to be recognized in the image, the label content can be placed in the lower right corner of the image or the lower left corner of the image, which is not specifically limited. For example, in Fig. 2, a label is generated from the name of the poplar and the associated information of the poplar, and then the label is displayed in the lower left corner of the image to prevent the poplar in the image from being blocked.
可以理解的是,将待识别对象的名称和关联信息以标签的形式显示在图像中,方便用户简单明了的浏览待识别对象的关联信息。在实际应用中,接收的图像可能是将会传播不良社会风气的敏感图片;则,在一些可能的实施方式中,显示图像、待识别对象的名称和关联信息,之前还包括:It is understandable that the name and associated information of the object to be identified are displayed in the image in the form of tags, which is convenient for the user to browse the associated information of the object to be identified in a simple and clear manner. In practical applications, the received image may be a sensitive image that will spread bad social ethos; then, in some possible implementations, the image, the name of the object to be identified, and related information may also include:
将待识别对象与预先得到的敏感对象进行匹配;若待识别对象与敏感对象未匹配成功,则执行显示图像、待识别对象的名称和关联信息。Match the to-be-identified object with the pre-obtained sensitive object; if the to-be-identified object is not successfully matched with the sensitive object, execute the display of the image, the name of the to-be-identified object and the associated information.
为了防止不良内容的传播,首先将待识别对象与敏感对象进行匹配,基于匹配结果,确定是否执行显示图像、待识别对象的名称和关联信息的步骤。在实际应用中,敏感对象为预先建立的用来验证待识别对象是否将会传播不良社会风气的对象。In order to prevent the spread of undesirable content, the object to be identified is first matched with the sensitive object, and based on the matching result, it is determined whether to perform the steps of displaying the image, the name of the object to be identified and the associated information. In practical applications, the sensitive object is a pre-established object used to verify whether the object to be identified will spread bad social atmosphere.
举例来说,为了检验待识别对象是否将会传播不良社会风气,可以在数据库中预先存储敏感对象,在将待识别对象与预设对象进行匹配之前、在将待识别对象与预设对象进行匹配之后或在将待识别对象与预设对象进行匹配的同时,将图像中的待识别对象与数据库中的敏感对象进行匹配,具体不作限定;如果匹配成功,则表示图像中的待识别对象涉及敏感内容,这种情况下,不向用户显示图像或将图像进行遮盖,例如可以用白色界面将图像遮盖,或将图像打上马赛克等等,在此不做具体限定;如果图像中的待识别对象与数据库中敏感对象未匹配成功,则表示图像中的待识别对象不涉及敏感内容,这种情况下可以向用户显示图像、待识别对象的名称和关联信息。For example, in order to check whether the object to be identified will spread bad social ethos, sensitive objects can be pre-stored in the database, and before matching the object to be identified with the preset object, before matching the object to be identified with the preset object After that or while matching the object to be recognized with the preset object, the object to be recognized in the image is matched with the sensitive object in the database. The specifics are not limited; if the matching is successful, it means that the object to be recognized in the image involves sensitive objects. Content. In this case, the image is not displayed to the user or the image is covered. For example, the image can be covered with a white interface, or the image can be mosaicked. There is no specific limitation here; if the object to be recognized in the image is If the sensitive object in the database is not matched successfully, it means that the object to be identified in the image does not involve sensitive content. In this case, the image, the name and associated information of the object to be identified can be displayed to the user.
基于敏感对象对待识别对象进行检验后,如果待识别对象涉及敏感内容,则对图像进行处理,能够有效防止不良内容的传播,净化社会风气。After inspecting the object to be identified based on the sensitive object, if the object to be identified involves sensitive content, processing the image can effectively prevent the spread of undesirable content and purify the social atmosphere.
本申请实施例中,接收用户上传的图像,然后获取图像中待识别对象的名称,根据待识别对象的名称在预设文库中获取待识别对象的关联信息,并向用户显示待识别对象的关联信息,方便用户获得待识别对象的关联信息。In the embodiment of this application, the image uploaded by the user is received, and then the name of the object to be identified in the image is obtained, the associated information of the object to be identified is obtained in the preset library according to the name of the object to be identified, and the association of the object to be identified is displayed to the user Information to facilitate users to obtain the associated information of the object to be identified.
下面将结合一个例子说明,具体如何获取待识别对象的名称。The following will combine an example to illustrate how to obtain the name of the object to be identified.
参见图3,该图为对图1中步骤S1的解释说明。Refer to Fig. 3, which is an explanation of step S1 in Fig. 1.
在一种实施方式中,获取图像中待识别对象的名称,具体可以包括:In an implementation manner, obtaining the name of the object to be identified in the image may specifically include:
S11、从图像中获取待识别对象;S11. Obtain the object to be identified from the image;
本申请实施例中,基于获取图像中待识别对象的名称的目的,首先从图像中获取待识别对象;为了获取图像中的待识别对象,可以利用目标检测算法,检测图像中的待识别对象。待识别对象为图像中期望被识别的对象,在实际应用中,当图像为街景时,待识别对象可以为车辆,当图像为自然风景时,待识别对象可以为树木、鲜花、动物等等,具体不做限定。In this embodiment of the application, based on the purpose of obtaining the name of the object to be recognized in the image, the object to be recognized is first obtained from the image; in order to obtain the object to be recognized in the image, a target detection algorithm can be used to detect the object to be recognized in the image. The object to be recognized is the object that is expected to be recognized in the image. In practical applications, when the image is a street view, the object to be recognized can be a vehicle, and when the image is a natural scenery, the object to be recognized can be trees, flowers, animals, etc. The specifics are not limited.
S12、将待识别对象与数据库中的预设对象进行匹配;S12. Match the object to be identified with the preset object in the database;
本申请实施例中,基于对待识别对象进行识别的目的,可以预先建立数据库,数据库中包括预设对象,预设对象可以为通过三维建模得到的模型,在实际应用中,预设对象可以为车辆模型、树木模型、鲜花模型、动物模型等等,具体不做限定。为了获得待识别对象的名称,获取到待识别对象后,可以将待识别对象与预设对象进行匹配,进而根据匹配到的预设对象的名称可以确定出待识别对象的名称。In the embodiments of the present application, based on the purpose of recognizing the object to be identified, a database may be established in advance. The database includes preset objects. The preset objects may be models obtained through three-dimensional modeling. In practical applications, the preset objects may be Vehicle models, tree models, flower models, animal models, etc., are not specifically limited. In order to obtain the name of the object to be identified, after the object to be identified is obtained, the object to be identified can be matched with the preset object, and then the name of the object to be identified can be determined according to the name of the matched preset object.
S13、若数据库中存在与待识别对象相匹配的预设对象,则基于匹配结果确定待识别对象的名称。S13. If there is a preset object matching the object to be identified in the database, the name of the object to be identified is determined based on the matching result.
本申请实施例中,为了尽快获得待识别对象的名称,如果待识别对象与数据库中的预设对象匹配成功,则可以根据匹配结果,获取与待识别对象匹配成功的预设对象的名称作为待识别对象的名称;名称可以为中文名称,也可以既包括中文名称又包括外文名称,比如,英文名称、俄文名称、日文名称、韩文名称等等,具体不做限定。In this embodiment of the application, in order to obtain the name of the object to be identified as quickly as possible, if the object to be identified is successfully matched with the preset object in the database, the name of the preset object that successfully matches the object to be identified can be obtained as the name of the preset object according to the matching result. The name of the identification object; the name can be a Chinese name, or it can include both a Chinese name and a foreign name, such as an English name, a Russian name, a Japanese name, a Korean name, etc., and the specific name is not limited.
在实际应用中,为了便于尽快确定待识别对象的名称,数据库中可以存储有预设对象与其名称的对应关系,则,在一些可能的实施方式中,基于匹配结果确定待识别对象的名称,包括:将与待识别对象匹配成功的预设对象对应的名称,作为待识别对象的名称。In practical applications, in order to determine the name of the object to be identified as quickly as possible, the database may store the correspondence between the preset object and its name. Then, in some possible implementations, the name of the object to be identified is determined based on the matching result, including : Use the name corresponding to the preset object successfully matched with the object to be identified as the name of the object to be identified.
可以理解的是,基于数据库中预设对象与其名称的对应关系,在确定与待识别对象相匹配的预设对象后,可以快速确定待识别对象的名称,进而便于用户尽快获得待识别对象的关联信息。It is understandable that based on the corresponding relationship between the preset object and its name in the database, after determining the preset object matching the object to be identified, the name of the object to be identified can be quickly determined, so that the user can obtain the association of the object to be identified as soon as possible information.
举例来说,数据库可以包括种类库、名称库和模型库,种类库可以是Python3的ImageAI库,名称库可以是Python3的PIP3库;种类库用于筛选图像中的待识别对象的种类,比如,ImageAI库中含有物体的基本轮廓,通过ImageAI库可以筛选待识别对象是车辆还是树木;模型库中包括预设对象,模型库用于在筛选出待识别对象的种类后,确定待识别对象的品种,比如,经过筛选待识别对象是树木后,确定待识别对象具体是杨树、柳树或槐树等等;名称库用于在确定待识别对象的品种后,确定待识别对象的名称,比如,确定待识别对象的中文名称和外文名称。For example, the database can include a category library, a name library, and a model library. The category library can be the ImageAI library of Python3, and the name library can be the PIP3 library of Python3; the category library is used to filter the types of objects to be identified in the image, for example, The ImageAI library contains the basic outline of the object. The ImageAI library can be used to filter whether the object to be recognized is a vehicle or a tree; the model library includes preset objects. The model library is used to determine the type of the object to be recognized after filtering out the type of the object to be recognized For example, after screening the object to be identified is a tree, it is determined that the object to be identified is a poplar, willow or locust tree, etc.; the name database is used to determine the name of the object to be identified after determining the species of the object to be identified, for example, Determine the Chinese name and foreign name of the object to be identified.
在实际应用中,获取待识别对象后,可以首先通过种类库确定待识别对象的种类,然后基于待识别对象的种类,通过模型库确定待识别对象的品种,最后基于待识别对象的品种,通过名称库确定待识别对象的名称;比如,通过ImageAI库筛选出待识别对象的种类,然后调取模型库中的一个矩阵形式表示的待识别对象的mathy版本,运行model.compile函数,预测出待识别对象的具体品种,进而调取PIP3库获得待识别对象的中文名称和外文名称。In practical applications, after obtaining the object to be recognized, you can first determine the type of the object to be recognized through the type library, then determine the type of the object to be recognized through the model library based on the type of the object to be recognized, and finally, pass The name library determines the name of the object to be identified; for example, the ImageAI library is used to filter out the type of object to be identified, and then the mathy version of the object to be identified in the form of a matrix in the model library is called, and the model.compile function is run to predict the object to be identified. Identify the specific species of the object, and then call the PIP3 library to obtain the Chinese name and foreign name of the object to be identified.
例如,执行本方案的电子设备(执行主体,以下简称本电子设备)中可以展示与用户的交互界面,另外,本电子设备中存储有PIP3库、ImageAI库和模型库。用户将看到的树木进行拍照,通过该交互界面,将拍摄到的图像 输入至本电子设备,本电子设备接收用户上传的图片后,首先经过ImageAI库筛选输出图片中的待识别对象是树木,然后将待识别对象经过与模型库中的预设对象进行匹配,确认图片中树木的种类为杨树,最后经过PIP3库输出杨树的中文名称和英文名称poplar。For example, the electronic device (executive body, hereinafter referred to as the electronic device) that implements the solution can display an interactive interface with the user. In addition, the electronic device stores a PIP3 library, an ImageAI library, and a model library. The user takes a photo of the tree he sees, and inputs the captured image to the electronic device through the interactive interface. After the electronic device receives the picture uploaded by the user, it is first filtered through the ImageAI library and the object to be identified in the output picture is a tree. Then, the object to be recognized is matched with the preset object in the model library to confirm that the type of tree in the picture is poplar, and finally the Chinese name and English name poplar of the poplar are output through the PIP3 library.
可以理解的是,首先由图像中获取待识别对象,然后将待识别对象与数据库中的预设对象进行匹配,最后基于待识别对象与预设对象的匹配结果确定待识别对象的名称,以便更快向用户反馈待识别对象的关联信息。It is understandable that the object to be recognized is first obtained from the image, and then the object to be recognized is matched with the preset object in the database, and finally the name of the object to be recognized is determined based on the matching result of the object to be recognized and the preset object, so as to update Quickly feedback the associated information of the object to be identified to the user.
在实际应用中,可能会接收不计其数的待识别对象,数据库中很难包括与所有待识别对象相匹配的预设对象;则,在一些可能的实施方式中,该方法还包括:In practical applications, countless objects to be identified may be received, and it is difficult to include preset objects matching all the objects to be identified in the database; then, in some possible implementation manners, the method further includes:
若所述数据库中不存在与所述待识别对象相匹配的预设对象,则输出提示信息;If there is no preset object matching the object to be identified in the database, output prompt information;
获取能够与所述待识别对象相匹配的新预设对象及其名称;Acquiring a new preset object and its name that can match the object to be identified;
将所述新预设对象及其名称存储至所述数据库中。The new preset object and its name are stored in the database.
举例来说,如果数据库中不存在与待识别对象相匹配的预设对象,则输出提示信息,提示用户无法识别图像中的待识别对象;并且获取与待识别对象相匹配的新预设对象以及新预设对象对应的名称,名称可以为中文名称,也可以为中文名称和外文名称,比如,英文名称、俄文名称、日文名称、韩文名称等等,具体不做限定。For example, if there is no preset object matching the object to be recognized in the database, a prompt message is output to remind the user that the object to be recognized in the image cannot be recognized; and a new preset object that matches the object to be recognized is obtained, and The name corresponding to the new preset object can be a Chinese name, or a Chinese name and a foreign name, such as English name, Russian name, Japanese name, Korean name, etc., and the specific name is not limited.
在实际应用中,可以在输出提示信息时,运维人员对未匹配成功的待识别对象进行人工检索,获取待识别对象的新预设对象以及中文名称和外文名称;将获取的新预设对象及与新预设对象对应的中文名称和外文名称存储至数据库中,以便再有用户上传相同的待识别对象时,能够对用户进行反馈,以使用户获取更多待识别对象的关联信息。In practical applications, when the prompt information is output, the operation and maintenance personnel can manually search for the unmatched object to be recognized, and obtain the new preset object and the Chinese name and foreign name of the object to be recognized; the new preset object to be obtained And the Chinese name and foreign name corresponding to the new preset object are stored in the database, so that when another user uploads the same object to be identified, the user can be fed back so that the user can obtain more related information of the object to be identified.
延续上述例子,在接收到用户上传的图片时,图片中的待识别对象不能在模型库中匹配成功预设对象,则将图片保存在ImageAI2库内,并输出提示信息,提示无法识别图片中的待识别对象;运维人员对ImageAI2库内的图片进行定期维护,人工检索获得待识别对象的新预设对象以及对应的中文名称和外文名称,将待识别对象的新预设对象保存在模型库内,将新预设对象对应的中文名称和外文名称保存在ImageAI库内,以便再有用户上传相同的待识别对象时,能够对用户进行反馈。Continuing the above example, when receiving the picture uploaded by the user, the object to be recognized in the picture cannot be successfully matched with the preset object in the model library, then the picture is saved in the ImageAI2 library, and a prompt message is output, indicating that the object in the picture cannot be recognized Objects to be identified; operation and maintenance personnel perform regular maintenance on the pictures in the ImageAI2 library, manually retrieve the new preset objects of the objects to be identified and the corresponding Chinese and foreign names, and save the new preset objects of the objects to be identified in the model library Inside, save the Chinese name and foreign name of the new preset object in the ImageAI library, so that when another user uploads the same object to be identified, it can provide feedback to the user.
可以理解的是,通过构建与未匹配成功的待识别对象对应的新预设对象,并查询新预设对象对应的中文名称和外文名称,然后将新预设对象及其对应的中文名称和外文名称存储至数据库中,一方面方便后续用户上传相同的待识别对象时,能快速获得待识别对象的关联信息;一方面能够进一步完善本电子设备的数据库。It is understandable that by constructing a new preset object corresponding to the unmatched object to be identified, and querying the Chinese name and foreign name corresponding to the new preset object, and then combining the new preset object and its corresponding Chinese name and foreign language name The name is stored in the database, on the one hand, it is convenient for subsequent users to upload the same object to be identified, and the associated information of the object to be identified can be quickly obtained; on the other hand, the database of the electronic device can be further improved.
由上述所述可见,该图像识别方法,首先获取图像中待识别对象的名称,然后利用存储有待识别对象的名称及其对应的关联信息的预设文库获得待识别对象的关联信息;用户将图像上传至电子设备,电子设备获得图像中待识别对象的名称,然后根据待识别对象的名称在预设文库中获取待识别对象的关联信息,并向用户显示待识别对象的关联信息,方便用户获得待识别对象的更多关联信息。It can be seen from the above that the image recognition method first obtains the name of the object to be recognized in the image, and then uses a preset library that stores the name of the object to be recognized and its corresponding associated information to obtain the associated information of the object to be identified; Upload to the electronic device, the electronic device obtains the name of the object to be identified in the image, and then obtains the associated information of the object to be identified in the preset library according to the name of the object to be identified, and displays the associated information of the object to be identified to the user to facilitate the user to obtain More related information about the object to be identified.
上述实施例中的图像识别方法可以在如图4所示的硬件架构中实现。The image recognition method in the foregoing embodiment can be implemented in the hardware architecture as shown in FIG. 4.
如图4所示,硬件架构可以包括电子设备101、服务器102.As shown in Figure 4, the hardware architecture may include an electronic device 101, a server 102.
电子设备101可以接收用户上传的图像。在一种可选的实施方式中,用户也可以通过其他用户终端上传图像至电子设备101,电子设备101和用户终端之间可以通过网络连接,具体可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。在具体实施时,电子设备101具体可以是手机、平板电脑等,具体不做限定。The electronic device 101 can receive an image uploaded by a user. In an optional implementation manner, the user can also upload images to the electronic device 101 through other user terminals, and the electronic device 101 and the user terminal can be connected via a network, which can specifically include various connection types, such as wired and wireless communication. Link or fiber optic cable, etc. In specific implementation, the electronic device 101 may specifically be a mobile phone, a tablet computer, etc., which is not specifically limited.
电子设备101内可以存储有名称库、种类库、模型库,通过种类库确定图像中待识别对象的种类,然后基于待识别对象的种类通过模型库确定待识别对象的品种,最后基于待识别对象的品种通过名称库确定待识别对象的名称。The electronic device 101 can store a name library, a category library, and a model library. The category library determines the type of the object to be recognized in the image, and then determines the type of the object to be recognized based on the type of the object to be recognized through the model library, and finally based on the object to be recognized The name of the object to be identified is determined through the name database.
服务器102可以为第三方服务器,也可以为云端服务器;若服务器102为第三方服务器,电子设备101可以通过调用外源接口向服务器102传输信息;若服务器102为云端服务器,电子设备101可以通过调用通信接口向服务器102传输信息。服务器102中存储有预设文库,服务器102可以在其预设文库中搜索待识别对象的关联信息,并反馈给电子设备101;电子设备101接收关联信息后提供给用户。The server 102 can be a third-party server or a cloud server; if the server 102 is a third-party server, the electronic device 101 can transfer information to the server 102 by calling an external source interface; if the server 102 is a cloud server, the electronic device 101 can call The communication interface transmits information to the server 102. A preset library is stored in the server 102, and the server 102 can search the associated information of the object to be identified in its preset library and feed it back to the electronic device 101; the electronic device 101 provides the user with the associated information after receiving the associated information.
需要说明的是,服务器102可以是硬件,也可以是软件。当服务器102为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成 单个服务器。当服务器102为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块,在此不做具体限定。It should be noted that the server 102 may be hardware or software. When the server 102 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server 102 is software, it can be implemented as multiple software or software modules (for example, used to provide distributed services), or can be implemented as a single software or software module, which is not specifically limited herein.
在一种可选的实施方式中,电子设备101、服务器102的功能还可以集中在一个执行主体上,此时,电子设备101、服务器102可以是一个执行主体中的两个模块。In an optional implementation manner, the functions of the electronic device 101 and the server 102 may also be concentrated on one execution body. In this case, the electronic device 101 and the server 102 may be two modules in the same execution body.
应该理解,图4中的电子设备101和服务器102的数目仅仅是示意性的。根据实现需要,该系统架构中可以具有任意数目的电子设备和服务器。It should be understood that the numbers of the electronic device 101 and the server 102 in FIG. 4 are only illustrative. According to implementation needs, the system architecture can have any number of electronic devices and servers.
图5为本申请实施例提供的图像识别装置的结构示意图,包括:Fig. 5 is a schematic structural diagram of an image recognition device provided by an embodiment of the application, including:
名称确定模块301,用于获取图像中待识别对象的名称;The name determining module 301 is used to obtain the name of the object to be identified in the image;
关联信息获取模块302,用于基于待识别对象的名称,利用预设文库获得待识别对象的关联信息;预设文库存储有待识别对象的名称及其对应的关联信息。The associated information acquisition module 302 is configured to use a preset library to obtain associated information of the object to be identified based on the name of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information.
作为一种实施方式,关联信息获取模块302,包括:As an implementation manner, the associated information acquisition module 302 includes:
传输单元,用于将待识别对象的名称传输给存储有预设文库的服务器,以使服务器通过预设文库确定待识别对象的关联信息;The transmission unit is configured to transmit the name of the object to be identified to the server storing the preset library, so that the server can determine the associated information of the object to be identified through the preset library;
接收单元,用于接收服务器反馈的待识别对象的关联信息。The receiving unit is configured to receive the association information of the object to be identified fed back by the server.
在一种实施方式中,名称确定模块301,包括:In one embodiment, the name determining module 301 includes:
待识别对象获取单元,用于从图像中获取待识别对象;The to-be-identified object acquiring unit is used to acquire the to-be-identified object from the image;
匹配单元,用于将待识别对象与数据库中的预设对象进行匹配;The matching unit is used to match the object to be identified with the preset object in the database;
名称确定单元,用于若所述数据库中存在与待识别对象相匹配的预设对象,则基于匹配结果确定待识别对象的名称。The name determining unit is configured to determine the name of the object to be identified based on the matching result if there is a preset object matching the object to be identified in the database.
作为一种实施方式,该装置还包括提示信息输出模块、新预设对象获取模块和存储模块(图中未示出),其中,As an implementation manner, the device further includes a prompt information output module, a new preset object acquisition module, and a storage module (not shown in the figure), wherein:
提示信息输出模块,用于若数据库中不存在与待识别对象相匹配的预设对象,则输出提示信息;The prompt information output module is used to output prompt information if there is no preset object matching the object to be identified in the database;
新预设对象获取模块,用于获取能够与待识别对象相匹配的新预设对象及其名称;A new preset object acquisition module for acquiring a new preset object and its name that can be matched with the object to be identified;
存储模块,用于将新预设对象及其名称存储至数据库中。The storage module is used to store the new preset object and its name in the database.
在一种实施方式中,该装置还包括显示模块(图中未示出),用于显示图 像、待识别对象的名称和关联信息。In one embodiment, the device further includes a display module (not shown in the figure) for displaying the image, the name of the object to be identified, and associated information.
作为一种实施方式,显示模块包括:As an implementation manner, the display module includes:
标签生成单元,用于生成待识别对象的标签,标签包括待识别对象的名称以及关联信息;The label generating unit is used to generate a label of the object to be identified, the label including the name of the object to be identified and associated information;
标签显示单元,用于显示图像,并在图像的预设区域显示标签。The label display unit is used to display the image and display the label in the preset area of the image.
在一种实施方式中,该装置还包括敏感对象匹配模块(图中未示出),用于在显示模块显示图像、待识别对象的名称和关联信息之前,将待识别对象与预先得到的敏感对象进行匹配若待识别对象与敏感对象未匹配成功,则执行显示图像、待识别对象的名称和关联信息。In one embodiment, the device further includes a sensitive object matching module (not shown in the figure), which is used to compare the object to be identified with the pre-obtained sensitive object before the image, the name of the object to be identified and the associated information are displayed on the display module. Object matching If the object to be identified and the sensitive object are not successfully matched, the image, the name and associated information of the object to be identified will be displayed.
上述实施例的装置用于实现前述实施例中相应的方法,并且具有相应的方法实施例的有益效果,在此不再赘述。The device in the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
在本申请的一个实施例中,还提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现上述任一图像识别方法。In an embodiment of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. The processor implements any of the above-mentioned image recognition methods when the program is executed. .
在本申请的一个实施例中,还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质存储计算机指令,计算机指令用于使计算机执行上述任一图像识别方法。In an embodiment of the present application, a non-transitory computer-readable storage medium is also provided, and the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute any of the above-mentioned image recognition methods.
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本公开的范围(包括权利要求)被限于这些例子;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本申请的不同方面的许多其它变化,为了简明它们没有在细节中提供。Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary, and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; under the idea of this application, the above embodiments or The technical features in different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in the details for the sake of brevity.
另外,为简化说明和讨论,并且为了不会使本申请难以理解,在所提供的附图中可以以框图的形式示出装置,以便避免使本申请难以理解,并且这也考虑了以下事实,即关于这些框图装置的实施方式的细节是高度取决于将要实施本申请的平台的(即,这些细节应当完全处于本领域技术人员的理解范围内)。在阐述了具体细节(例如,电路)以描述本申请的示例性实施例的情况下,对本领域技术人员来说显而易见的是,可以在没有这些具体细节的情况下或者这些具体细节有变化的情况下实施本申请。因此,这些描述应被 认为是说明性的而不是限制性的。In addition, in order to simplify the description and discussion, and in order not to make the application difficult to understand, the provided drawings may show the device in the form of a block diagram in order to avoid making the application difficult to understand, and this also takes into account the following facts, That is, the details of the implementation of these block diagram devices are highly dependent on the platform on which the application will be implemented (that is, these details should be fully within the understanding of those skilled in the art). In the case where specific details (for example, a circuit) are described to describe the exemplary embodiments of the present application, it is obvious to those skilled in the art that it may be possible without these specific details or when these specific details are changed. Implement this application under. Therefore, these descriptions should be considered illustrative rather than restrictive.
尽管已经结合了本申请的具体实施例对本申请进行了描述,但是根据前面的描述,这些实施例的很多替换、修改和变型对本领域普通技术人员来说将是显而易见的。例如,其它存储器架构(例如,动态RAM(DRAM))可以使用所讨论的实施例。Although the present application has been described in conjunction with the specific embodiments of the present application, many substitutions, modifications and variations of these embodiments will be obvious to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.
本申请的实施例旨在涵盖落入所附权利要求的宽泛范围之内的所有这样的替换、修改和变型。因此,凡在本申请的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请的保护范围之内。The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application shall be included in the protection scope of this application.

Claims (10)

  1. 一种图像识别方法,其特征在于,所述方法包括:An image recognition method, characterized in that the method includes:
    获取图像中待识别对象的名称;Obtain the name of the object to be identified in the image;
    基于所述待识别对象的名称,利用预设文库获得所述待识别对象的关联信息;所述预设文库存储有所述待识别对象的名称及其对应的关联信息。Based on the name of the object to be identified, a preset library is used to obtain the associated information of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information.
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述待识别对象的名称,利用预设文库获得所述待识别对象的关联信息,包括:The method according to claim 1, wherein the obtaining the associated information of the object to be identified by using a preset library based on the name of the object to be identified comprises:
    将所述待识别对象的名称传输给存储有所述预设文库的服务器,以使所述服务器通过所述预设文库确定所述待识别对象的关联信息;Transmitting the name of the object to be identified to the server storing the preset library, so that the server can determine the associated information of the object to be identified through the preset library;
    接收所述服务器反馈的所述待识别对象的关联信息。Receiving the associated information of the object to be identified fed back by the server.
  3. 根据权利要求1所述的图像识别方法,其特征在于,所述获取图像中待识别对象的名称,包括:The image recognition method according to claim 1, wherein said obtaining the name of the object to be recognized in the image comprises:
    从图像中获取所述待识别对象;Acquiring the object to be identified from the image;
    将所述待识别对象与数据库中的预设对象进行匹配;Matching the object to be identified with a preset object in the database;
    若所述数据库中存在与所述待识别对象相匹配的预设对象,则基于匹配结果确定所述待识别对象的名称。If there is a preset object matching the object to be identified in the database, the name of the object to be identified is determined based on the matching result.
  4. 根据权利要求3所述的图像识别方法,其特征在于,所述方法还包括:The image recognition method according to claim 3, wherein the method further comprises:
    若所述数据库中不存在与所述待识别对象相匹配的预设对象,则输出提示信息;If there is no preset object matching the object to be identified in the database, output prompt information;
    获取能够与所述待识别对象相匹配的新预设对象及其名称;Acquiring a new preset object and its name that can match the object to be identified;
    将所述新预设对象及其名称存储至所述数据库中。The new preset object and its name are stored in the database.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    显示所述图像、所述待识别对象的名称和所述关联信息。The image, the name of the object to be recognized, and the associated information are displayed.
  6. 根据权利要求5所述的图像识别方法,其特征在于,所述显示所述图像、所述待识别对象的名称和所述关联信息,包括:The image recognition method according to claim 5, wherein the displaying the image, the name of the object to be recognized, and the associated information comprises:
    生成所述待识别对象的标签,所述标签包括所述待识别对象的名称以及所述关联信息;Generating a label of the object to be identified, the label including the name of the object to be identified and the associated information;
    显示所述图像,并在所述图像的预设区域显示所述标签。The image is displayed, and the label is displayed in a preset area of the image.
  7. 根据权利要求5所述的图像识别方法,其特征在于,所述显示所述图 像、所述待识别对象的名称和所述关联信息,之前还包括:The image recognition method according to claim 5, wherein the displaying of the image, the name of the object to be recognized, and the associated information beforehand further comprises:
    将所述待识别对象与预先得到的敏感对象进行匹配;Matching the object to be identified with a pre-obtained sensitive object;
    若所述待识别对象与所述敏感对象未匹配成功,则执行所述显示所述图像、所述待识别对象的名称和所述关联信息。If the object to be identified does not match the sensitive object successfully, then performing the display of the image, the name of the object to be identified, and the associated information.
  8. 一种图像识别装置,其特征在于,所述装置包括:An image recognition device, characterized in that the device includes:
    名称确定模块,用于获取图像中待识别对象的名称;The name determination module is used to obtain the name of the object to be identified in the image;
    关联信息获取模块,用于基于所述待识别对象的名称,利用预设文库获得所述待识别对象的关联信息;所述预设文库存储有所述待识别对象的名称及其对应的关联信息。The associated information acquisition module is configured to use a preset library to obtain the associated information of the object to be identified based on the name of the object to be identified; the preset library stores the name of the object to be identified and its corresponding associated information .
  9. 一种电子设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如权利要求1至7任意一项所述的方法。An electronic device, characterized by comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor. The processor executes the program as described in any one of claims 1 to 7 The method described.
  10. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使计算机执行权利要求1至7任一所述的方法。A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 7.
PCT/CN2019/105693 2019-09-12 2019-09-12 Image recognition method, apparatus and device, and storage medium WO2021046801A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/105693 WO2021046801A1 (en) 2019-09-12 2019-09-12 Image recognition method, apparatus and device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/105693 WO2021046801A1 (en) 2019-09-12 2019-09-12 Image recognition method, apparatus and device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021046801A1 true WO2021046801A1 (en) 2021-03-18

Family

ID=74866826

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/105693 WO2021046801A1 (en) 2019-09-12 2019-09-12 Image recognition method, apparatus and device, and storage medium

Country Status (1)

Country Link
WO (1) WO2021046801A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216841A (en) * 2008-01-14 2008-07-09 南京搜拍信息技术有限公司 Interactive type image search system and method
US20100260426A1 (en) * 2009-04-14 2010-10-14 Huang Joseph Jyh-Huei Systems and methods for image recognition using mobile devices
US20130124551A1 (en) * 2010-07-26 2013-05-16 Koninklijke Philips Electronics N.V. Obtaining keywords for searching
CN107358233A (en) * 2017-06-30 2017-11-17 北京小米移动软件有限公司 Information acquisition method and device
CN108320264A (en) * 2018-01-19 2018-07-24 上海爱优威软件开发有限公司 A kind of method and terminal device of simulation makeup
CN109784180A (en) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 Drawing practice, device, computer equipment and storage medium based on augmented reality
CN110070016A (en) * 2019-04-12 2019-07-30 北京猎户星空科技有限公司 A kind of robot control method, device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216841A (en) * 2008-01-14 2008-07-09 南京搜拍信息技术有限公司 Interactive type image search system and method
US20100260426A1 (en) * 2009-04-14 2010-10-14 Huang Joseph Jyh-Huei Systems and methods for image recognition using mobile devices
US20130124551A1 (en) * 2010-07-26 2013-05-16 Koninklijke Philips Electronics N.V. Obtaining keywords for searching
CN107358233A (en) * 2017-06-30 2017-11-17 北京小米移动软件有限公司 Information acquisition method and device
CN108320264A (en) * 2018-01-19 2018-07-24 上海爱优威软件开发有限公司 A kind of method and terminal device of simulation makeup
CN109784180A (en) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 Drawing practice, device, computer equipment and storage medium based on augmented reality
CN110070016A (en) * 2019-04-12 2019-07-30 北京猎户星空科技有限公司 A kind of robot control method, device and storage medium

Similar Documents

Publication Publication Date Title
US11875467B2 (en) Processing method for combining a real-world environment with virtual information according to a video frame difference value to provide an augmented reality scene, terminal device, system, and computer storage medium
US10210663B2 (en) Contextual local image recognition dataset
JP6410930B2 (en) Content item retrieval and association scheme with real world objects using augmented reality and object recognition
US9195302B2 (en) Image processing system, image processing apparatus, image processing method, and program
WO2016054989A1 (en) Method and device for establishing photographing template database and providing photographing recommendation information
EP3550479A1 (en) Augmented-reality-based offline interaction method and apparatus
JP2020042834A (en) Account information obtaining method, terminal, server, and system
US20180184038A1 (en) Method and system for creating virtual message onto a moving object and searching the same
CN108595628A (en) Method and apparatus for pushed information
WO2020006964A1 (en) Image detection method and device
CN110619807B (en) Method and device for generating global thermodynamic diagram
KR20120001847A (en) System and method for searching image
CN108334498A (en) Method and apparatus for handling voice request
US20190102938A1 (en) Method and Apparatus for Presenting Information
CN103294803A (en) Method and system for augmenting product information introduction and realizing man-machine interaction
WO2022073516A1 (en) Method and apparatus for generating image, electronic device, and medium
TW201814590A (en) Mobile electronic device and server
WO2017101323A1 (en) Method and device for image capturing and information pushing and mobile phone
CN110705335A (en) Method and device for labeling sample picture
CN110622218A (en) Image display method, device, storage medium and terminal
CN108573054A (en) Method and apparatus for pushed information
CN112561084B (en) Feature extraction method and device, computer equipment and storage medium
WO2021046801A1 (en) Image recognition method, apparatus and device, and storage medium
US20210012042A1 (en) Method and system for space design
CN110765296A (en) Image searching method, terminal device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19945289

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945289

Country of ref document: EP

Kind code of ref document: A1