WO2021196551A1 - Image retrieval method and apparatus, computer device, and storage medium - Google Patents

Image retrieval method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2021196551A1
WO2021196551A1 PCT/CN2020/119714 CN2020119714W WO2021196551A1 WO 2021196551 A1 WO2021196551 A1 WO 2021196551A1 CN 2020119714 W CN2020119714 W CN 2020119714W WO 2021196551 A1 WO2021196551 A1 WO 2021196551A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target
sub
base library
detection
Prior art date
Application number
PCT/CN2020/119714
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 北京旷视科技有限公司
Publication of WO2021196551A1 publication Critical patent/WO2021196551A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying

Definitions

  • This application relates to the technical field of image data processing, in particular to an image retrieval method, device, computer equipment and storage medium.
  • Image retrieval refers to the process of retrieving similar images in the database through a piece of image to be retrieved. Since the emergence of image retrieval technology, three important branches have been formed: text-based image retrieval, content-based image retrieval, and semantic-based image retrieval.
  • the user first needs to manually intercept the sub-images of each target in the image to be retrieved, and then the user inputs the target sub-images into the retrieval system to realize the image retrieval function.
  • the user can only input one target sub-picture at a time, and the retrieval system can only complete retrieval for one target at a time.
  • the retrieval system needs to perform multiple image retrieval tasks, resulting in longer retrieval time and lower retrieval efficiency.
  • An image retrieval method includes:
  • the image to be retrieved includes multiple targets of different detection types;
  • Target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the detected target in the to-be-detected The area in the image;
  • the image base database corresponding to the detection type of the detected target search the base library sub-images that match the sub-images corresponding to the detected targets; in the image base library Storing a base library sub-picture, the base library sub-picture contains the same target as the detection type of the detected target;
  • the target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
  • the user's search instruction is an associated search instruction, and the associated search instruction includes a first detection type and a second detection type; the subgraph corresponding to the detected target of the first detection type matches The base library sub-image of is the first base library sub-image, the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image, and the image base library is stored in association There are the base library sub-picture and the image identifier of the panorama corresponding to the base library sub-picture;
  • the obtaining the target image corresponding to the retrieval instruction according to the base library sub-image matching the sub-image corresponding to each detected target includes:
  • first base library sub-image and the second base library sub-image are associated with a first associated panoramic image with the same image identifier, then the first associated panoramic image is used as the target image corresponding to the retrieval instruction, Or use the first associated panoramic image, the first base library sub-image, and the second base library sub-image as the target image corresponding to the retrieval instruction.
  • the method further includes:
  • the detection type corresponding to each detected target is displayed to the user, so that the user selects the first detection type and the second detection type from the detection types corresponding to each detected target.
  • the method further includes:
  • the sub-image corresponding to the detected target of the second detection type is compared with the second
  • the second degree of similarity of the base library sub-images obtains the degree of similarity of each target image corresponding to the retrieval instruction.
  • the retrieval instruction includes the identification of the detected target used for retrieval; the method further includes:
  • searching the base library sub-images that match the sub-images corresponding to the detected targets includes:
  • search for the third detection target in the image base corresponding to the detection type of the third detection target The third base library sub-image matched by the corresponding sub-image.
  • the retrieval instruction includes at least two identifications of the detected targets used for retrieval; the detected targets of each detection type are displayed on the bottom of the image corresponding to the detection types of the detected targets.
  • retrieving the base library subgraph matching the subgraph corresponding to the detected target further includes:
  • the obtaining the target image corresponding to the retrieval instruction according to the base library sub-image matching the sub-image corresponding to each detected target includes:
  • the second associated panorama is used as the target image corresponding to the retrieval instruction, Or use the second associated panoramic image, the third base library sub-image, and the fourth base library sub-image as the target image corresponding to the retrieval instruction.
  • retrieving the base library sub-image that matches the sub-image corresponding to the detected target includes:
  • search base library subgraphs matching the subgraph corresponding to the detected target.
  • the method before the screening of the set of base library submaps that meet the set time and/or set location input by the user, the method further includes:
  • a time period between the start time of the day and the end time of the day is taken as the set time.
  • An image retrieval device includes:
  • the instruction receiving module is used to receive the user's retrieval instruction
  • An image acquisition module for acquiring an image to be retrieved; the image to be retrieved contains multiple targets of different detection types;
  • the target detection module is used to perform target detection on the image to be retrieved through a target detection algorithm to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target; the distribution area is the detected target The area where the target is located in the image to be detected;
  • the image retrieval module is used to retrieve, in the image base database corresponding to the detection type of the detected target, the base library sub-image that matches the sub-image corresponding to the detected target for the detected targets of each detection type;
  • the image base library stores base library sub-images, and the base library sub-images include targets of the same detection type as the detected targets;
  • the image determination module is used to obtain the target image corresponding to the retrieval instruction according to the base library sub-image matched with the sub-image corresponding to each detected target.
  • a computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when the processor executes the computer program:
  • the image to be retrieved includes multiple targets of different detection types;
  • Target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the detected target in the to-be-detected The area in the image;
  • the image base database corresponding to the detection type of the detected target search the base library sub-images that match the sub-images corresponding to the detected targets; in the image base library Storing a base library sub-picture, the base library sub-picture contains the same target as the detection type of the detected target;
  • the target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
  • a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
  • the image to be retrieved includes multiple targets of different detection types;
  • Target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the detected target in the to-be-detected The area in the image;
  • the image base database corresponding to the detection type of the detected target search the base library sub-images that match the sub-images corresponding to the detected targets; in the image base library Storing a base library sub-picture, the base library sub-picture contains the same target as the detection type of the detected target;
  • the target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
  • the above-mentioned image retrieval method, device, computer equipment and storage medium can realize target detection for multiple targets of different detection types in the image to be retrieved at one time, so as to obtain the detection type corresponding to each detected target and the corresponding distribution of each detected target Region, and for each detection target of each detection type, the target image is retrieved from the image base corresponding to the detection type of the detection target.
  • the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system.
  • the user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time.
  • the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
  • Figure 1 is an application environment diagram of an image retrieval method in an embodiment
  • Figure 2 is a schematic flowchart of an image retrieval method in an embodiment
  • FIG. 3 is an effect diagram showing the sub-picture corresponding to each detected target to the user in an embodiment
  • Fig. 4 is an effect diagram showing the target image to the user in an embodiment
  • Fig. 5 is a schematic flowchart of an image retrieval method in another embodiment
  • FIG. 6 is a schematic flowchart of an image retrieval method in another embodiment
  • FIG. 7 is a schematic flow diagram of screening a collection of base library sub-images that meet the time and location search conditions set by the user in an embodiment
  • Figure 8 is a structural block diagram of an image retrieval device in an embodiment
  • Fig. 9 is an internal structure diagram of a computer device in an embodiment.
  • the image retrieval method involved in the present application is applied to an image retrieval device for illustration.
  • the image retrieval device may be a terminal 102, a server 104, or a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104.
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • an image retrieval method is provided.
  • the image retrieval device is the server in FIG. 1 as an example for description, which can be specifically implemented by the following steps:
  • Step S202 Receive a search instruction from the user.
  • the user's retrieval instruction is generated by the user based on the image retrieval requirement by performing corresponding user operations on the terminal.
  • the image retrieval device may receive a user's retrieval instruction sent by the terminal.
  • Step S204 Obtain the image to be retrieved.
  • the image to be retrieved contains multiple targets of different detection types.
  • the detection type is the target type that can be detected by the target detection algorithm used by the image retrieval device.
  • the target detection algorithm can detect the face type target, the human body type target and the motor vehicle type target, but the cat face, telephone pole type target cannot be detected, and the detection type is the face type, the human body type and the motor vehicle type.
  • Cat faces and telephone poles are not the detection type.
  • the image retrieval device acquires the image to be retrieved.
  • the image to be retrieved may be an image input by the user through the terminal, and the image contains multiple detection types of targets.
  • the image to be retrieved A contains a face, a human body, and a non-motor vehicle, that is, it contains a person. Three types of targets are detected: face, human body, and non-motor vehicle.
  • step S206 target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained.
  • the target detected by the target detection algorithm is called the detected target, and the target detection algorithm can detect multiple detection types of detected targets at one time.
  • the distribution area is the area where the detected target is located in the image to be detected, that is, the position of the target in the image to be detected.
  • the image retrieval device performs target detection on the image to be retrieved through a preset target detection algorithm, and obtains the detection type corresponding to each detected target and the distribution area corresponding to each detected target. For example, target detection is performed on the image A to be retrieved, and a human face, a human body, and a non-motor vehicle can be detected at the same time. If the target detection algorithm cannot detect this type of target due to some reasons (such as occlusion of the target, unclear image quality, etc.), then this type of target does not belong to the aforementioned "detected target".
  • the image retrieval device displays the distribution area corresponding to each detected target on the image to be detected to the user, so that the user knows which targets have been detected .
  • Step S208 Cut out the image in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target.
  • the image retrieval device performs matting in the image to be retrieved for each detected target according to the distribution area corresponding to each detected target, and obtains a sub-image corresponding to each detected target for subsequent retrieval steps.
  • the distribution area is represented by the coordinates of the upper left, lower left, upper right, and lower right four vertices of the detection box (boundingbox) where the detected target is located. picture.
  • the target sub-image needs to be intercepted from the original image (that is, the image to be retrieved).
  • the image retrieval device displays the sub-images corresponding to each detected target to the user, so that the user knows which targets have been detected and will be used for subsequent retrieval.
  • the effect picture can be seen in Figure 3.
  • Step S210 For the detected targets of each detection type, in the image base library corresponding to the detection type of the detected target, search for base library sub-images that match the sub-image corresponding to the detected target.
  • the image base library stores base library sub-images
  • the base library sub-images include targets with the same detection type as the detection type of the detected target.
  • the image retrieval device first searches for a matching image base based on the detection type of the detected target, and then searches the image base matching the detection type of the detected target for the sub-image that matches the detected target.
  • Bottom library submap For example, in the image A to be retrieved, the detected targets include face targets, human targets, and non-motorized vehicle targets, and the detection types corresponding to the detected targets are face type, human body type, and non-motorized vehicle type, respectively.
  • the image detection equipment finds the image database of the motor vehicle type according to the type of motor vehicle, the image database of the non-motor vehicle type according to the type of non-motor vehicle, and the image database of the human body type according to the type of human body.
  • image bases for example, in the image base of the face type, search the base sub-images that match the face sub-images, and in the non-motor vehicle type image bases, search the sub-images that match the non-motor vehicle sub-images
  • Base library sub-image in the image base library of the human body type, search for the base library sub-image matching the human body sub-image.
  • the matching method of the target sub-image and the base library sub-image may be as follows: firstly, extract the image features of the target sub-image and the image features of the base library sub-image respectively, and then determine the image features of the target sub-image and the base library sub-image. For the similarity between the image features of the images, the base library sub-image with the similarity greater than the preset threshold is used as the base library sub-image matching the sub-image corresponding to the detected target. Alternatively, the similarity can be determined by calculating the distance between feature vectors.
  • step S212 the target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
  • the image retrieval device may directly use the base library sub-images matching the sub-images corresponding to each detected target as the target image corresponding to the retrieval instruction, or may directly use the base library sub-images matching the sub-images corresponding to each detected target as the target image. Further screening and processing are performed to obtain the target image corresponding to the retrieval instruction.
  • the panoramic image corresponding to the base library sub-image (the base library sub-image is obtained by target detection and matting in the panoramic image) can be used as the target image.
  • the image retrieval device can retrieve the face target, the human target, and the non-motorized vehicle target at one time, and obtain the face retrieval result, the human body retrieval result, and the non-motorized vehicle target.
  • the set of the three is used as the target image corresponding to the search instruction.
  • the image retrieval device can arrange the multiple matched base library sub-images in descending order according to the similarity between the sub-image corresponding to the detected target and the matched base library sub-image, and select the top N bits as the search command The corresponding target image.
  • the rendering of the target image to the user can be seen in Figure 4.
  • step S202 may follow step S204, S206, or S208.
  • multiple targets of different detection types in the image to be retrieved can be detected at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target, and then for each detection type
  • the target image is retrieved in the image base corresponding to the detection type of the detected target.
  • the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system.
  • the user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time.
  • the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
  • the user's search instruction is an associated search instruction
  • the associated search instruction includes a first detection type and a second detection type.
  • the base library subgraph matching the subgraph corresponding to the detection target of the first detection type is the first base library subgraph
  • the base library subgraph matching the subgraph corresponding to the detection target of the second detection type is the second base Library map.
  • the image base library is associated with the base library sub-image and the image identifier of the panorama corresponding to the base library sub-image.
  • the image A to be retrieved contains the face F, the human body P and the non-motor vehicle V.
  • the target image corresponding to the retrieval instruction contains the face F1 retrieved by the face F, and retrieved by the human body P The human body P1 and the non-motor vehicle V1 retrieved by the non-motor vehicle V.
  • the target image can be a sub-image of the base library where the human face F1, the human body P1 and the non-motorized vehicle V1 are located (see FIG. 4), or it can be a panoramic image where the human face F1, the human body P1 and the non-motorized vehicle V1 are located.
  • the face F1 Since the face F1 is only retrieved from the face F, it is impossible to know whether the human body is photographed in the panoramic image where the face F1 is located, and whether the photographed human body matches the human body P.
  • the user wants to retrieve such a target image, since it contains a human face F2 matching the human face F and a human body P2 matching the human body P in the same image.
  • the user wants to retrieve such a target image, since it contains a human body P2 matching the human body P and a non-motor vehicle V2 matching the non-motor vehicle V in the same image. That is, the user hopes that there are at least two detection types of targets in the same target image, and the targets of each detection type are matched with the corresponding types of targets in the image to be retrieved.
  • the user can give an associated retrieval instruction including the first detection type and the second detection type.
  • an associated retrieval instruction including the face detection type and the human body retrieval type can be given.
  • the image retrieval device obtains F1, F2 matching the human face F and P1, P2 matching the human body P, it will not return F1, F2, P1, P2 directly to the user as the target image, but will It is further judged whether F1, F2 and P1, P2 appear in the same image, that is, whether F1, F2 and P1, P2 correspond to the same panoramic image.
  • step S212 can be specifically implemented through the following steps:
  • Step S212a If the first associated panoramic image with the same image identifier is associated with the first base library sub-image and the second base library sub-image, then the first associated panoramic image is used as the target image corresponding to the retrieval instruction, or the first associated The panoramic image, the first base library sub-image, and the second base library sub-image are used as the target image corresponding to the retrieval instruction.
  • the first base library sub-image and the second base library sub-image are associated with the first associated panorama with the same image identifier, indicating that the first base library sub-image and the second base library sub-image are both from the first associated panorama
  • the image is cut out in the figure, that is, the target of the first detection type in the first base library submap and the target of the second detection type in the second base library submap are located in the same panoramic image.
  • the image retrieval device can retrieve a panoramic image containing two detection types at the same time by determining the relationship between the base library sub-image and the panoramic image, so that it is easier to determine the relationship between different detection types of targets in different base library sub-images.
  • the target in the first base library sub-image is the face F2
  • the target in the second base library sub-image is the non-motorized vehicle V2
  • the first base library sub-image and the second base sub-image are The panorama corresponding to the base library sub-image has the same image identifier, indicating that the face F2 and the non-motor vehicle V2 were originally located in the same first associated panorama B.
  • the first associated panoramic image B can also be used as the target image corresponding to the retrieval instruction.
  • such a target image can be obtained.
  • the method for acquiring the first detection type and the second detection type may be: displaying the detection type corresponding to each detected target to the user, so that the user can select from the detection type corresponding to each detected target The first detection type and the second detection type.
  • the image retrieval device displays the detection type corresponding to each detected target to the user.
  • the display method can be displayed to the user through the display screen of the image retrieval device or through It is first transmitted to the terminal and then displayed to the user through the display screen of the terminal, so that the user selects the first detection type and the second detection type from the detection types corresponding to each detected target.
  • the user can manually select the first detection type and the second detection type according to the detection type prompt option.
  • the user can also select one detection type or more than two detection types.
  • the detection type corresponding to the detected target is displayed to the user, so that the user can select the target of the detection type with the retrieval requirement, and the retrieved target image can be quickly obtained. Moreover, this can prevent all detection types of targets from being retrieved, so that the amount of retrieved target image data is too large, thereby increasing the time for the user to view the retrieval results, and undoubtedly increasing the amount of tasks for the user. Therefore, the efficiency and accuracy of image retrieval can be further improved.
  • the method further includes the following steps:
  • Step S2112 according to the first similarity between the subgraph corresponding to the detected target of the first detection type and the first base library subgraph, and the difference between the subgraph corresponding to the detected target of the second detection type and the second base library subgraph
  • the second degree of similarity obtains the degree of similarity of each target image corresponding to the retrieval instruction.
  • the similarity between the images can be obtained by extracting the image features in each image and calculating the feature distance of the corresponding position.
  • the image retrieval device is based on the first similarity between the sub-image corresponding to the detected target of the first detection type and the first base library sub-image, and the difference between the sub-image corresponding to the detected object of the second detection type and the second base library sub-image
  • the second degree of similarity obtains the degree of similarity between each target image and the image to be retrieved.
  • the image retrieval device may linearly superimpose the first similarity and the second similarity according to a preset weight to obtain the similarity of each target image corresponding to the retrieval instruction.
  • the image retrieval device may also perform non-linear superposition of the first similarity and the second similarity to obtain the similarity of each target image corresponding to the retrieval instruction.
  • the similarity between each target image and the image to be retrieved can also be calculated in other ways, and the present application is not limited to this.
  • the user hopes that since the same target image contains a human face matching the human face F and a human body matching the human body P, an associated retrieval instruction including the face detection type and the human body retrieval type is given.
  • the face matching similarity threshold is 90%
  • the human body matching similarity threshold is 70%.
  • the face retrieval result is more accurate, and a higher weight can be set, such as 0.8, and a lower weight, such as 0.2, can be set for the human body due to clothing or occlusion.
  • the user image retrieval device retrieves F1 (90% similarity to F, corresponding to panoramic image identification 1), F2 (95% similarity to F, corresponding to panoramic image identification 2), and P1 that matches human body P (90% similarity to P, corresponding to panoramic image identification 1), P2 (75% similarity to F, corresponding to panoramic image identification 2), the target image M1 (including F1 and P1) with panoramic image identification 1 can be obtained, with The target image M2 (including F2 and P2) of the panoramic image identifier 2, where the similarity between M1 and the image to be retrieved is 90%, and the similarity between M2 and the image to be retrieved is 91%.
  • the associated similarity calculated based on the first similarity and the second similarity can be used to characterize the similarity between the first associated panoramic image and the detected targets of the first detection type and the second detection type. In this way, more image information can be obtained, which helps to find the image between the two types of targets at the same time. Relevance.
  • the similarities under different detection types may be sorted in descending order, and the top N bits may be selected as the target image corresponding to the retrieval instruction. In this way, displaying target images with a higher degree of similarity to the user reduces the amount of tasks the user has to view on the one hand, and on the other hand provides more accurate target images, which is conducive to improving user experience.
  • the retrieval instruction includes the identification of the detected target used for retrieval. Based on this, please refer to Figure 6, the method also includes the following steps:
  • step S209 the distribution area corresponding to each detected target or the sub-image corresponding to each detected target is displayed to the user, so that the user selects a detected target for image retrieval from the detected targets.
  • the image retrieval device displays the distribution area corresponding to each detected target and/or the sub-map corresponding to each detected target
  • the display mode can be displayed to the user through the display screen of the image retrieval device or through the first transmission to the terminal and then displayed to the user through the terminal display, so that the user can select the checkout for image retrieval from each checkout target Target.
  • the image retrieval device After the image retrieval device performs target detection on the image to be retrieved through the preset target detection algorithm and obtains each detected target, it assigns an identifier (for example, target ID) to each detected target, and the user selects a certain detected target. After the target is used as a checkout target for search, it returns a search instruction containing the identification of the checkout target used for search.
  • target ID for example, target ID
  • step S210 can be specifically implemented through the following steps:
  • Step S2102 for the third detection target corresponding to the identification of the detection target used for image retrieval, in the image base corresponding to the detection type of the third detection target, search for the child corresponding to the third detection target.
  • the third base library sub-image that the image matches.
  • the image retrieval device receives the detection target selected by the user, it determines the third detection target according to the identification of the detection target, and searches the image database corresponding to the detection type of the third detection target.
  • the third base library subgraph matching the subgraph corresponding to the third detection target is, in this embodiment, the search is performed only for the checkout targets selected by the user, and it is not necessary to search for all checkout targets.
  • third detection targets there may be multiple third detection targets, and multiple third detection targets may correspond to the same or different detection types.
  • the user selects the face F, the non-motor vehicle V from the face F, the human body P, and the non-motorized vehicle V in the image to be retrieved as the third detection target.
  • the base library sub-image F4 matched by F is searched for the base library sub-image P4 matching P in the non-motor vehicle image base library.
  • the image retrieval device may only show two different targets of the same detection type to the user for selection when the image to be retrieved contains two different targets of the same detection type.
  • the target contained in it can be used for retrieval by default. For example, if the image to be detected contains two human faces and one non-motorized vehicle, the two human faces can be displayed to the user so that the user can select the face that needs to be used for retrieval without showing the non-motorized vehicle to the user. After that, the image retrieval device uses the non-motorized vehicle contained in the image A to be retrieved and a face selected by the user for retrieval.
  • the distribution area corresponding to each detected target and/or the sub-graph corresponding to each detected target is displayed to the user, so that the user can select the target with the retrieval requirement, so as to quickly retrieve the user with the retrieval requirement.
  • the retrieval image of the target further improves retrieval efficiency.
  • the retrieval instruction includes at least two identifications of the detected targets used for retrieval. Based on this, step S210 can also be specifically implemented through the following steps:
  • Step S2104 for the fourth detection target corresponding to the identification of the detection target used for image retrieval, in the image base corresponding to the detection type of the fourth detection target, search for the child corresponding to the fourth detection target
  • the fourth base library sub-picture of the picture matching for the fourth detection target corresponding to the identification of the detection target used for image retrieval, in the image base corresponding to the detection type of the fourth detection target, search for the child corresponding to the fourth detection target.
  • the image retrieval device retrieves the fourth detection target in the image base corresponding to the detection type of the fourth detection target
  • the corresponding subgraph matches the fourth base library subgraph.
  • step S212 can be specifically implemented through the following steps:
  • Step S2122 If the third base library sub-image and the fourth base library sub-image are associated with a second associated panorama with the same image identifier, use the second associated panorama as the target image corresponding to the retrieval instruction, or associate the second associated panorama with The panoramic image, the third base library sub-image, and the fourth base library sub-image are used as the target image corresponding to the retrieval instruction.
  • the image retrieval device may use the second associated panorama as the target image corresponding to the retrieval instruction, or the image retrieval device may use the second associated panorama, the third base library sub-image, and the fourth base library sub-image as the retrieval instruction corresponding to the retrieval instruction.
  • Target image the third base library sub-image and the fourth base library sub-image are associated with the second associated panorama with the same image identifier.
  • the image retrieval device will use the second associated panoramic image in which the face A and the face B are captured at the same time as the target image.
  • the detection types of the third detection target and the fourth detection target may be the same or different.
  • the different base library sub-images belong to the partial images in the same second associated panorama, it indicates that these base library sub-images were captured by the same image acquisition device at the same time. Therefore, these The base library sub-image and the second associated panoramic image are used as the final target image, which is beneficial for the user to know the correlation between the images, and thereby learn more image information.
  • step S210 may be specifically implemented through the following steps:
  • Step S232 in the image base library corresponding to the detection type of the detected target, filter the base library sub-image set that meets the set time and/or set location input by the user;
  • Step S234 searching for a base library subgraph matching the subgraph corresponding to the detected target in the base library subgraph set.
  • the user can set the search time period and the search location range in the search condition option in the search interface displayed on the terminal. Based on the set time and/or set location, the image corresponding to the detection type of the detected target In the base library, filter the set of base library submaps that meet the set time and/or set location input by the user. Next, the target detection device searches for the base library subgraph matching the subgraph corresponding to the detected target in the base library subgraph set.
  • the search is only performed in the base library sub-map at the set time and/or set location, which is beneficial to quickly obtain the search image.
  • time setting there are multiple ways to implement time setting, and only a few of them are listed below:
  • Implementation method 1 Obtain the preset time and preset duration input by the user; use the time period including the preset time as the set time, where the duration of the set time is the preset duration.
  • the preset time is a time determined based on the shooting time of the image to be retrieved, and the set time is a time period centered on the preset time and 1/2 of the preset time length before and after.
  • the preset duration can be set according to the moving speed of the target.
  • Implementation method 2 Obtain the start time and end time entered by the user; use the time period between the start time and the end time as the set time.
  • the start time and the end time are determined based on the shooting time of the image to be retrieved.
  • the image retrieval device will use 2018-05-02 00:00:00 ⁇ 2018-05-09 00:00:00 as the set time.
  • Implementation method 3 Get the start date and end date entered by the user, the start time of each day, and the end time of each day, and add the start time and the end time of each day between the start date and the end date The time period between the end times of each day is regarded as the set time.
  • the start date and end date, the start time of each day, and the end time of each day are determined based on the shooting time of the image to be retrieved.
  • the user enters the start date and end date at the date, such as 2018-05-02, 2018-05-09, and enters the daily start time and every day at the time.
  • the end time of the day such as 01:00:00, 04:00:00, after setting, the image retrieval equipment will be 01:00:00 ⁇ 04:00:00 in 2018-05-02 ⁇ 2018-05-09 As the set time.
  • an image retrieval device including: an instruction receiving module 302, an image acquisition module 304, a target detection module 306, a matting module 308, an image retrieval module 310, and an image Determine module 312, where:
  • the instruction receiving module 302 is used to receive a user's retrieval instruction.
  • the image acquisition module 304 is used to acquire the image to be retrieved; the image to be retrieved contains multiple targets of different detection types.
  • the target detection module 306 is used to perform target detection on the image to be retrieved through a target detection algorithm to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target; the distribution area is the location of the detected target in the image to be detected. Area.
  • the matting module 308 is used for matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target.
  • the image retrieval module 310 is used to retrieve the base library sub-images that match the sub-images corresponding to the detected targets in the image base database corresponding to the detection type of the detected target for the detected targets of each detection type;
  • the base library sub-map is stored in the library, and the base library sub-map contains targets of the same detection type as the detected target.
  • the image determination module 312 is configured to obtain the target image corresponding to the retrieval instruction according to the base library sub-image matched with the sub-image corresponding to each detected target.
  • multiple targets of different detection types in the image to be retrieved can be detected at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target, and then for each detection type
  • the target image is retrieved in the image base corresponding to the detection type of the detected target.
  • the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system.
  • the user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time.
  • the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
  • the user's search instruction is an associated search instruction
  • the associated search instruction includes a first detection type and a second detection type; a base library sub-image that matches a sub-image corresponding to a detection target of the first detection type It is the first base library sub-image, and the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image.
  • the image base library is associated with the base library sub-image and the base library sub-image.
  • the image identifier of the panoramic image corresponding to the image; the image determining module 312 is specifically configured to associate the first associated panoramic image with the same image identifier if the first base library subimage and the second base library subimage are associated with the first associated panoramic image.
  • the image is used as the target image corresponding to the retrieval instruction, or the first associated panoramic image, the first base library sub-image, and the second base library sub-image are used as the target image corresponding to the retrieval instruction.
  • it further includes: a display module (not shown) for displaying the detection type corresponding to each detected target to the user, so that the user can select the first detection type from the detection type corresponding to each detected target.
  • Detection type and second detection type are examples of a display module (not shown) for displaying the detection type corresponding to each detected target to the user, so that the user can select the first detection type from the detection type corresponding to each detected target. Detection type and second detection type.
  • it further includes: a similarity calculation module, which is used to calculate the first similarity between the sub-image corresponding to the detected target of the first detection type and the first base library sub-image, and the second detection type The second similarity between the sub-image corresponding to the target and the second base library sub-image is detected, and the similarity of each target image corresponding to the retrieval instruction is obtained.
  • a similarity calculation module which is used to calculate the first similarity between the sub-image corresponding to the detected target of the first detection type and the first base library sub-image, and the second detection type The second similarity between the sub-image corresponding to the target and the second base library sub-image is detected, and the similarity of each target image corresponding to the retrieval instruction is obtained.
  • the retrieval instruction includes the identification of the detected target used for retrieval; the display module is also used to display the distribution area corresponding to each detected target or the sub-image corresponding to each detected target to the user, The user is allowed to select a detected target for image retrieval from among the detected targets; the image retrieval module 310 is specifically used for the third detected target corresponding to the identification of the detected target used for image retrieval, and the third detected target In the image base library corresponding to the detection type of the detected target, a third base library sub-image that matches the sub-image corresponding to the third detected target is retrieved.
  • the retrieval instruction includes at least two identifications of the detected targets used for retrieval; the image retrieval module 310 is specifically configured to determine the fourth detection corresponding to the identifications of the detected targets used for image retrieval.
  • Target in the image base corresponding to the detection type of the fourth detected target, retrieve the fourth base library sub-image that matches the sub-image corresponding to the fourth detected target; the image determining module 312 is specifically configured to: If the base library sub-image and the fourth base library sub-image are associated with the second associated panoramic image with the same image identifier, the second associated panoramic image is used as the target image corresponding to the retrieval instruction, or the second associated panoramic image and the third associated panoramic image are The library sub-image and the fourth base library sub-image are used as the target image corresponding to the retrieval instruction.
  • the image retrieval module 310 is specifically configured to filter the image base library corresponding to the detection type of the detected target to filter the base library sub-images that meet the set time and/or set location input by the user. Set; in the base library subgraph collection, search for base library subgraphs that match the subgraph corresponding to the detected target.
  • Each module in the above-mentioned image retrieval device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store the sub-picture data of the base library.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize an image retrieval method.
  • FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and a processor, and a computer program is stored in the memory, and the processor implements the following steps when the processor executes the computer program:
  • the image to be retrieved contains multiple targets of different detection types;
  • Target detection is performed on the image to be retrieved through the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the area where the detected target is located in the image to be detected;
  • the image base corresponding to the detection type of the detected target retrieve the base library sub-images that match the sub-image corresponding to the detected target; the image base library stores the base library sub-images , The base library sub-image contains the same target as the detection type of the detected target;
  • the target image corresponding to the retrieval instruction is obtained.
  • target detection can be performed on multiple targets of different detection types in the image to be retrieved at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target.
  • the target is detected, and the target image is retrieved in the image base corresponding to the detection type of the detected target.
  • the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system.
  • the user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time.
  • the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
  • the user's search instruction is an associated search instruction
  • the associated search instruction includes a first detection type and a second detection type; a base library sub-image that matches a sub-image corresponding to a detection target of the first detection type It is the first base library sub-image, and the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image.
  • the image base library is associated with the base library sub-image and the base library sub-image.
  • the processor further implements the following step when executing the computer program: displaying the detection type corresponding to each detected target to the user, so that the user selects the first detection type from the detection types corresponding to each detected target And the second detection type.
  • the processor further implements the following steps when executing the computer program: according to the first similarity between the subgraph corresponding to the detected target of the first detection type and the first base library subgraph, and the second detection type The second similarity between the sub-image corresponding to the detected target and the second base library sub-image is obtained to obtain the similarity of each target image corresponding to the retrieval instruction.
  • the retrieval instruction includes the identification of the detected target used for retrieval; the processor further implements the following steps when executing the computer program: the distribution area corresponding to each detected target or the subgraph corresponding to each detected target It is displayed to the user so that the user can select a detection target for image retrieval from each detection target; for the third detection target corresponding to the identification of the detection target used for image retrieval, the third detection target In the image base library corresponding to the detection type of, search for a third base library sub-image that matches the sub-image corresponding to the third detection target.
  • the retrieval instruction includes at least two identifications of the detected targets used for retrieval; the processor further implements the following steps when executing the computer program: Four detection targets, in the image base corresponding to the detection type of the fourth detection target, search for the fourth base library sub-image that matches the sub-image corresponding to the fourth detection target; if the third base library sub-image and If the fourth base library sub-image is associated with the second associated panoramic image with the same image identifier, the second associated panoramic image is used as the target image corresponding to the retrieval instruction, or the second associated panoramic image, the third base library sub-image and the first The four-base library sub-image is used as the target image corresponding to the retrieval instruction.
  • the processor executes the computer program, the following steps are further implemented: in the image database corresponding to the detection type of the detected target, filter the image database corresponding to the set time and/or set location input by the user.
  • Library subgraph collection in the base library subgraph collection, search the base library subgraph matching the subgraph corresponding to the detected target.
  • the processor further implements the following steps when executing the computer program: obtaining the preset time and the preset duration input by the user; taking the time period including the preset time as the set time, and the duration of the set time is Preset duration; or; obtain the start time and end time entered by the user; use the time period between the start time and the end time as the set time; or; obtain the start date and end date entered by the user, and the daily For the start time and the end time of each day, the time period between the start time of the day and the end time of each day in each date between the start date and the end date is used as the set time.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • the image to be retrieved contains multiple targets of different detection types;
  • Target detection is performed on the image to be retrieved through the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the area where the detected target is located in the image to be detected;
  • the image base corresponding to the detection type of the detected target retrieve the base library sub-images that match the sub-images corresponding to the detected targets; the base library sub-images are stored in the image base library , The base library sub-image contains the same target as the detection type of the detected target;
  • the target image corresponding to the retrieval instruction is obtained.
  • target detection can be performed on multiple targets of different detection types in the image to be retrieved at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target.
  • the target images are retrieved in the image base corresponding to the detection type of the detection target.
  • the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system. The user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time. Thus, the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
  • the user's search instruction is an associated search instruction
  • the associated search instruction includes a first detection type and a second detection type; a base library sub-image that matches a sub-image corresponding to a detection target of the first detection type It is the first base library sub-image, and the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image.
  • the image base library is associated with the base library sub-image and the base library sub-image.
  • the image identifier of the panoramic image corresponding to the image; the computer program is executed by the processor to implement the following steps: if the first base library sub-image and the second base library sub-image are associated with the first associated panoramic image with the same image identifier, then The first associated panoramic image is used as the target image corresponding to the retrieval instruction, or the first associated panoramic image, the first base library sub-image, and the second base library sub-image are used as the target image corresponding to the retrieval instruction.
  • the detection type corresponding to each detected target is displayed to the user, so that the user selects the first detection from the detection type corresponding to each detected target.
  • Type and second detection type are further implemented:
  • the following steps are further implemented: according to the first similarity between the subgraph corresponding to the detected target of the first detection type and the first base library subgraph, and the second detection The second similarity between the sub-image corresponding to the detected target of the type and the second base library sub-image is obtained to obtain the similarity of each target image corresponding to the retrieval instruction.
  • the retrieval instruction includes the identification of the detected target used for retrieval; when the computer program is executed by the processor, the following steps are also implemented: the distribution area corresponding to each detected target or the child corresponding to each detected target The picture is shown to the user, so that the user can select the detection target for image retrieval from each detection target; for the third detection target corresponding to the identification of the detection target used for image retrieval, the third detection target In the image base library corresponding to the detection type of the target, a third base library sub-image that matches the sub-image corresponding to the third detected target is retrieved.
  • the retrieval instruction includes at least two identifications of the detected targets used for retrieval; when the computer program is executed by the processor, the following steps are also implemented: The fourth detection target, in the image base corresponding to the detection type of the fourth detection target, search for the fourth base library sub-image that matches the sub-image corresponding to the fourth detection target; if the third base library sub-image If the second associated panoramic image with the same image identifier is associated with the fourth base library sub-image, the second associated panoramic image is used as the target image corresponding to the retrieval instruction, or the second associated panoramic image, the third base library sub-image and The fourth base library sub-image is used as the target image corresponding to the retrieval instruction.
  • the following steps are further implemented: in the image base corresponding to the detection type of the detected target, filter those that meet the set time and/or set location input by the user.
  • Base library subgraph collection in the base library subgraph collection, search for base library subgraphs that match the subgraph corresponding to the detected target.
  • the following steps are further implemented: obtaining the preset time and the preset duration input by the user; using the time period including the preset time as the set time, and the duration of the set time Is the preset duration; or; obtains the start time and end time entered by the user; takes the time period between the start time and the end time as the set time; or; obtains the start date and end date entered by the user, and every day
  • the start time and the end time of each day, the time period between the start time of the day and the end time of each day in each date between the start date and the end date is used as the set time.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical storage.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.

Landscapes

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

Abstract

Provided are an image retrieval method and apparatus, a computer device, and a storage medium. The method comprises: receiving a retrieval instruction from a user (S202); acquiring an image to be retrieved, wherein said image includes multiple targets of different detection types (S204); by means of a target detection algorithm, performing target detection on said image to obtain a detection type corresponding to each detected target and a distribution area corresponding to each detected target (S206); according to the distribution area corresponding to each detected target, performing image matting in said image to obtain a sub-image corresponding to each detected target (S208); with regard to the detected target of each detection type, retrieving, in an image base library corresponding to the detection type of the detected target, a base library sub-image matching the sub-image corresponding to the detected target, wherein the image base library stores the base library sub-image, and the base library sub-image includes a target with the same detection type as the detected target (S210); and according to the base library sub-image matching the sub-image corresponding to each detected target, obtaining a target image corresponding to the retrieval instruction (S212). By means of the method, the image retrieval efficiency can be improved.

Description

图像检索方法、装置、计算机设备和存储介质Image retrieval method, device, computer equipment and storage medium 技术领域Technical field
本申请涉及图像数据处理技术领域,特别是涉及一种图像检索方法、装置、计算机设备和存储介质。This application relates to the technical field of image data processing, in particular to an image retrieval method, device, computer equipment and storage medium.
背景技术Background technique
随着多媒体技术的发展,出现了图像检索技术,图像检索是指通过一张待检索图像检索出数据库中与之相似的图像的过程。图像检索技术产生至今,已经形成了三个重要的分支:基于文本的图像检索、基于内容的图像检索和基于语义的图像检索。With the development of multimedia technology, image retrieval technology emerged. Image retrieval refers to the process of retrieving similar images in the database through a piece of image to be retrieved. Since the emergence of image retrieval technology, three important branches have been formed: text-based image retrieval, content-based image retrieval, and semantic-based image retrieval.
传统的图像检索方法中,首先需要用户人为地截取待检索图像中各个目标的子图,然后用户将目标子图输入检索系统以实现图像检索功能。但是,在检索过程中,用户每次仅能输入一个目标子图,且该检索系统每次只能对于一个目标完成检索。当目标存在多个时,该检索系统需要执行多次图像检索任务,导致检索时间较长,检索效率较低。In the traditional image retrieval method, the user first needs to manually intercept the sub-images of each target in the image to be retrieved, and then the user inputs the target sub-images into the retrieval system to realize the image retrieval function. However, in the retrieval process, the user can only input one target sub-picture at a time, and the retrieval system can only complete retrieval for one target at a time. When there are multiple targets, the retrieval system needs to perform multiple image retrieval tasks, resulting in longer retrieval time and lower retrieval efficiency.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种能够提高图像检索效率的图像检索方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide an image retrieval method, device, computer equipment, and storage medium that can improve the efficiency of image retrieval in response to the above technical problems.
一种图像检索方法,所述方法包括:An image retrieval method, the method includes:
接收用户的检索指令;Receiving user's retrieval instructions;
获取待检索图像;所述待检索图像包含多个不同检测类型的目标;Acquiring an image to be retrieved; the image to be retrieved includes multiple targets of different detection types;
通过目标检测算法对所述待检索图像进行目标检测,得到各检出目标对应的检测类型以及所述各检出目标对应的分布区域;所述分布区域为所述检出目标在所述待检测图像中所处的区域;Target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the detected target in the to-be-detected The area in the image;
根据所述各检出目标对应的分布区域在所述待检索图像中进行抠图,得到所述各检出目标对应的子图;Matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target;
对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图;所述图像底库中存储有底库子图,所述底库子图包含与所述检出目标的检测类型相同的目标;For the detected targets of each detection type, in the image base database corresponding to the detection type of the detected target, search the base library sub-images that match the sub-images corresponding to the detected targets; in the image base library Storing a base library sub-picture, the base library sub-picture contains the same target as the detection type of the detected target;
根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像。The target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
在其中一个实施例中,所述用户的检索指令为关联检索指令,所述关联检索指令包含第一检测类型和第二检测类型;与所述第一检测类型的检出目标对应的子图匹配的底库子图为第一底库子图,与所述第二检测类型的检出目标对应的子图匹配的底库子图为第二底库子图,所述图像底库中关联存储有所述底库子图以及所述底库子图所对应全景图的图像标识;In one of the embodiments, the user's search instruction is an associated search instruction, and the associated search instruction includes a first detection type and a second detection type; the subgraph corresponding to the detected target of the first detection type matches The base library sub-image of is the first base library sub-image, the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image, and the image base library is stored in association There are the base library sub-picture and the image identifier of the panorama corresponding to the base library sub-picture;
所述根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像,包括:The obtaining the target image corresponding to the retrieval instruction according to the base library sub-image matching the sub-image corresponding to each detected target includes:
若所述第一底库子图和所述第二底库子图关联了具有相同图像标识的第一关联全景图,则将所述第一关联全景图作为所述检索指令对应的目标图像,或者将所述第一关联全景图、所述第一底库子图和所述第二底库子图作为所述检索指令对应的目标图像。If the first base library sub-image and the second base library sub-image are associated with a first associated panoramic image with the same image identifier, then the first associated panoramic image is used as the target image corresponding to the retrieval instruction, Or use the first associated panoramic image, the first base library sub-image, and the second base library sub-image as the target image corresponding to the retrieval instruction.
在其中一个实施例中,所述方法还包括:In one of the embodiments, the method further includes:
将所述各检出目标对应的检测类型展示给所述用户,以使所述用户从所述各检出目标对应的检测类型中选取所述第一检测类型和所述第二检测类型。The detection type corresponding to each detected target is displayed to the user, so that the user selects the first detection type and the second detection type from the detection types corresponding to each detected target.
在其中一个实施例中,所述方法还包括:In one of the embodiments, the method further includes:
根据所述第一检测类型的检出目标对应的子图与所述第一底库子图的第一相似度,和所述第二检测类型的检出目标对应的子图与所述第二底库子图的第二相似度,得到所述检索指令对应的各目标图像的相似度。According to the first similarity between the sub-image corresponding to the detected target of the first detection type and the first base library sub-image, the sub-image corresponding to the detected target of the second detection type is compared with the second The second degree of similarity of the base library sub-images obtains the degree of similarity of each target image corresponding to the retrieval instruction.
在其中一个实施例中,所述检索指令包含用于检索的检出目标的标识;所述方法还包括:In one of the embodiments, the retrieval instruction includes the identification of the detected target used for retrieval; the method further includes:
将所述各检出目标对应的分布区域或所述各检出目标对应的子图展示给所述用户,以使所述用户从所述各检出目标中选取用于图像检索的检出目标;Display the distribution area corresponding to each detected target or the sub-image corresponding to each detected target to the user, so that the user selects the detected target for image retrieval from the detected targets ;
所述对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图,包括:For the detection targets of each detection type, in the image base library corresponding to the detection type of the detection target, searching the base library sub-images that match the sub-images corresponding to the detected targets includes:
对于与所述用于图像检索的检出目标的标识对应的第三检出目标,在与所述第三检出目标的检测类型对应的图像底库中,检索与所述第三检出目标对应的子图匹配的第三底库子图。For the third detection target corresponding to the identification of the detection target used for image retrieval, search for the third detection target in the image base corresponding to the detection type of the third detection target The third base library sub-image matched by the corresponding sub-image.
在其中一个实施例中,所述检索指令包含至少两个用于检索的检出目标的标识; 所述对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图,还包括:In one of the embodiments, the retrieval instruction includes at least two identifications of the detected targets used for retrieval; the detected targets of each detection type are displayed on the bottom of the image corresponding to the detection types of the detected targets. In the library, retrieving the base library subgraph matching the subgraph corresponding to the detected target, further includes:
对于与所述用于图像检索的检出目标的标识对应的第四检出目标,在与所述第四检出目标的检测类型对应的图像底库中,检索与所述第四检出目标对应的子图匹配的第四底库子图;For the fourth detection target corresponding to the identification of the detection target used for image retrieval, search for the fourth detection target in the image base corresponding to the detection type of the fourth detection target The fourth base library subgraph matched by the corresponding subgraph;
所述根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像,包括:The obtaining the target image corresponding to the retrieval instruction according to the base library sub-image matching the sub-image corresponding to each detected target includes:
若所述第三底库子图和所述第四底库子图关联了具有相同图像标识的第二关联全景图,则将所述第二关联全景图作为所述检索指令对应的目标图像,或者将所述第二关联全景图、所述第三底库子图和所述第四底库子图作为所述检索指令对应的目标图像。If the third base library sub-image and the fourth base library sub-image are associated with a second associated panorama with the same image identifier, then the second associated panorama is used as the target image corresponding to the retrieval instruction, Or use the second associated panoramic image, the third base library sub-image, and the fourth base library sub-image as the target image corresponding to the retrieval instruction.
在其中一个实施例中,所述在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图,包括:In one of the embodiments, in the image base library corresponding to the detection type of the detected target, retrieving the base library sub-image that matches the sub-image corresponding to the detected target includes:
在与所述检出目标的检测类型对应的图像底库中,筛选符合所述用户输入的设定时间和/或设定地点的底库子图集合;In the image base library corresponding to the detection type of the detected target, filter the base library sub-image set that meets the set time and/or set location input by the user;
在所述底库子图集合中,检索与所述检出目标对应的子图匹配的底库子图。In the set of base library subgraphs, search base library subgraphs matching the subgraph corresponding to the detected target.
在其中一个实施例中,在所述筛选符合所述用户输入的设定时间和/或设定地点的底库子图集合之前,所述方法还包括:In one of the embodiments, before the screening of the set of base library submaps that meet the set time and/or set location input by the user, the method further includes:
获取所述用户输入的预设时间以及预设时长;Acquiring the preset time and the preset duration input by the user;
将包含所述预设时间的时间段作为所述设定时间,所述设定时间的时长为所述预设时长;或;Use a time period including the preset time as the set time, and the duration of the set time is the preset duration; or;
获取所述用户输入的起始时间和终止时间;Acquiring the start time and end time input by the user;
将所述起始时间与所述终止时间之间的时间段作为所述设定时间;或;Use the time period between the start time and the end time as the set time; or;
获取所述用户输入的起始日期和终止日期、每日的起始时间和每日的终止时间,Acquire the start date and end date, daily start time and daily end time entered by the user,
将所述起始日期和所述终止日期之间的每个日期中,所述每日的起始时间和所述每日的终止时间之间的时间段作为所述设定时间。In each date between the start date and the end date, a time period between the start time of the day and the end time of the day is taken as the set time.
一种图像检索装置,所述装置包括:An image retrieval device, the device includes:
指令接收模块,用于接收用户的检索指令;The instruction receiving module is used to receive the user's retrieval instruction;
图像获取模块,用于获取待检索图像;所述待检索图像包含多个不同检测类型的目标;An image acquisition module for acquiring an image to be retrieved; the image to be retrieved contains multiple targets of different detection types;
目标检测模块,用于通过目标检测算法对所述待检索图像进行目标检测,得到各检出目标对应的检测类型以及所述各检出目标对应的分布区域;所述分布区域为所述检出目标在所述待检测图像中所处的区域;The target detection module is used to perform target detection on the image to be retrieved through a target detection algorithm to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target; the distribution area is the detected target The area where the target is located in the image to be detected;
抠图模块,用于根据所述各检出目标对应的分布区域在所述待检索图像中进行抠图,得到所述各检出目标对应的子图;A matting module for matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target;
图像检索模块,用于对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图;所述图像底库中存储有底库子图,所述底库子图包含与所述检出目标的检测类型相同的目标;The image retrieval module is used to retrieve, in the image base database corresponding to the detection type of the detected target, the base library sub-image that matches the sub-image corresponding to the detected target for the detected targets of each detection type; The image base library stores base library sub-images, and the base library sub-images include targets of the same detection type as the detected targets;
图像确定模块,用于根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像。The image determination module is used to obtain the target image corresponding to the retrieval instruction according to the base library sub-image matched with the sub-image corresponding to each detected target.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when the processor executes the computer program:
接收用户的检索指令;Receiving user's retrieval instructions;
获取待检索图像;所述待检索图像包含多个不同检测类型的目标;Acquiring an image to be retrieved; the image to be retrieved includes multiple targets of different detection types;
通过目标检测算法对所述待检索图像进行目标检测,得到各检出目标对应的检测类型以及所述各检出目标对应的分布区域;所述分布区域为所述检出目标在所述待检测图像中所处的区域;Target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the detected target in the to-be-detected The area in the image;
根据所述各检出目标对应的分布区域在所述待检索图像中进行抠图,得到所述各检出目标对应的子图;Matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target;
对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图;所述图像底库中存储有底库子图,所述底库子图包含与所述检出目标的检测类型相同的目标;For the detected targets of each detection type, in the image base database corresponding to the detection type of the detected target, search the base library sub-images that match the sub-images corresponding to the detected targets; in the image base library Storing a base library sub-picture, the base library sub-picture contains the same target as the detection type of the detected target;
根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像。The target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
接收用户的检索指令;Receiving user's retrieval instructions;
获取待检索图像;所述待检索图像包含多个不同检测类型的目标;Acquiring an image to be retrieved; the image to be retrieved includes multiple targets of different detection types;
通过目标检测算法对所述待检索图像进行目标检测,得到各检出目标对应的检测类型以及所述各检出目标对应的分布区域;所述分布区域为所述检出目标在所述待检 测图像中所处的区域;Target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the detected target in the to-be-detected The area in the image;
根据所述各检出目标对应的分布区域在所述待检索图像中进行抠图,得到所述各检出目标对应的子图;Matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target;
对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图;所述图像底库中存储有底库子图,所述底库子图包含与所述检出目标的检测类型相同的目标;For the detected targets of each detection type, in the image base database corresponding to the detection type of the detected target, search the base library sub-images that match the sub-images corresponding to the detected targets; in the image base library Storing a base library sub-picture, the base library sub-picture contains the same target as the detection type of the detected target;
根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像。The target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
上述图像检索方法、装置、计算机设备和存储介质,可一次性实现对待检索图像中多个不同检测类型的目标进行目标检测,从而得到各检出目标对应的检测类型以及各检出目标对应的分布区域,进而对于各检测类型的检出目标,分别在与检出目标的检测类型对应的图像底库中检索出目标图像。本申请实施例无需用户人为地截取待检索图像中各个目标的子图并将各个目标子图输入检索系统,用户只需上传一次图像即可一次性完成对所有检测类型的检出目标的检索,从而有效降低了用户操作复杂度,提高了检索效率。The above-mentioned image retrieval method, device, computer equipment and storage medium can realize target detection for multiple targets of different detection types in the image to be retrieved at one time, so as to obtain the detection type corresponding to each detected target and the corresponding distribution of each detected target Region, and for each detection target of each detection type, the target image is retrieved from the image base corresponding to the detection type of the detection target. In the embodiment of the application, the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system. The user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time. Thus, the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
附图说明Description of the drawings
图1为一个实施例中图像检索方法的应用环境图;Figure 1 is an application environment diagram of an image retrieval method in an embodiment;
图2为一个实施例中图像检索方法的流程示意图;Figure 2 is a schematic flowchart of an image retrieval method in an embodiment;
图3为一个实施例中将各检出目标对应的子图展示给用户的效果图;FIG. 3 is an effect diagram showing the sub-picture corresponding to each detected target to the user in an embodiment;
图4为一个实施例中将目标图像展示给用户的效果图;Fig. 4 is an effect diagram showing the target image to the user in an embodiment;
图5为另一个实施例中图像检索方法的流程示意图;Fig. 5 is a schematic flowchart of an image retrieval method in another embodiment;
图6为又一个实施例中图像检索方法的流程示意图;FIG. 6 is a schematic flowchart of an image retrieval method in another embodiment;
图7为一个实施例中筛选符合用户设定的时间及地点检索条件的底库子图集合的流程示意图;FIG. 7 is a schematic flow diagram of screening a collection of base library sub-images that meet the time and location search conditions set by the user in an embodiment;
图8为一个实施例中图像检索装置的结构框图;Figure 8 is a structural block diagram of an image retrieval device in an embodiment;
图9为一个实施例中计算机设备的内部结构图。Fig. 9 is an internal structure diagram of a computer device in an embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本 申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of the application more clear, the application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
在一示例性实施例中,以本申请涉及的图像检索方法应用于图像检索设备进行举例说明。可以理解的是,如图1所示,该图像检索设备可以是终端102,也可以是服务器104,还可以是包括终端102和服务器104的系统,并通过终端102和服务器104的交互实现。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。In an exemplary embodiment, the image retrieval method involved in the present application is applied to an image retrieval device for illustration. It is understandable that, as shown in FIG. 1, the image retrieval device may be a terminal 102, a server 104, or a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
在一示例性实施例中,如图2所示,提供了一种图像检索方法,以图像检索设备为图1中的服务器为例进行说明,具体可以通过以下步骤实现:In an exemplary embodiment, as shown in FIG. 2, an image retrieval method is provided. The image retrieval device is the server in FIG. 1 as an example for description, which can be specifically implemented by the following steps:
步骤S202,接收用户的检索指令。Step S202: Receive a search instruction from the user.
其中,用户的检索指令是用户基于图像检索需求,在终端上进行相应的用户操作而得以生成。Among them, the user's retrieval instruction is generated by the user based on the image retrieval requirement by performing corresponding user operations on the terminal.
具体地,图像检索设备可接收终端发送的用户的检索指令。Specifically, the image retrieval device may receive a user's retrieval instruction sent by the terminal.
步骤S204,获取待检索图像。Step S204: Obtain the image to be retrieved.
其中,待检索图像包含多个不同检测类型的目标。检测类型是图像检索设备所使用的目标检测算法能够检测出的目标类型。例如,目标检测算法能够检测出人脸类型的目标、人体类型的目标和机动车类型的目标,不能检测出猫脸、电线杆类型的目标,则检测类型为人脸类型、人体类型和机动车类型,猫脸、电线杆不属于检测类型。Among them, the image to be retrieved contains multiple targets of different detection types. The detection type is the target type that can be detected by the target detection algorithm used by the image retrieval device. For example, the target detection algorithm can detect the face type target, the human body type target and the motor vehicle type target, but the cat face, telephone pole type target cannot be detected, and the detection type is the face type, the human body type and the motor vehicle type. , Cat faces and telephone poles are not the detection type.
具体地,图像检索设备获取待检索图像。其中,该待检索图像可以是用户通过终端输入的图像,该图像包含多个检测类型的目标,例如,待检索图像A中包含1个人脸、1个人体、1辆非机动车,即包含人脸、人体、非机动车3个检测类型的目标。Specifically, the image retrieval device acquires the image to be retrieved. Wherein, the image to be retrieved may be an image input by the user through the terminal, and the image contains multiple detection types of targets. For example, the image to be retrieved A contains a face, a human body, and a non-motor vehicle, that is, it contains a person. Three types of targets are detected: face, human body, and non-motor vehicle.
步骤S206,通过目标检测算法对待检索图像进行目标检测,得到各检出目标对应的检测类型以及各检出目标对应的分布区域。In step S206, target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained.
其中,目标检测算法检测出的目标称为检出目标,目标检测算法可一次性检测出多个检测类型的检出目标。分布区域为检出目标在待检测图像中所处的区域,也即目标在待检测图像中所处的位置。Among them, the target detected by the target detection algorithm is called the detected target, and the target detection algorithm can detect multiple detection types of detected targets at one time. The distribution area is the area where the detected target is located in the image to be detected, that is, the position of the target in the image to be detected.
具体地,图像检索设备通过预设的目标检测算法对待检索图像进行目标检测,得到各检出目标对应的检测类型以及各检出目标对应的分布区域。例如,针对待检索图像A进行目标检测,可同时检测出1个人脸、1个人体和1辆非机动车。若由于某些原因(比如目 标被遮挡、画质不清晰等)导致目标检测算法无法检测出这类目标,那么,这类目标不属于上述的“检出目标”。Specifically, the image retrieval device performs target detection on the image to be retrieved through a preset target detection algorithm, and obtains the detection type corresponding to each detected target and the distribution area corresponding to each detected target. For example, target detection is performed on the image A to be retrieved, and a human face, a human body, and a non-motor vehicle can be detected at the same time. If the target detection algorithm cannot detect this type of target due to some reasons (such as occlusion of the target, unclear image quality, etc.), then this type of target does not belong to the aforementioned "detected target".
可选地,图像检索设备在获取到各检出目标对应的分布区域后,将各检出目标对应的分布区域标记在待检测图像上展示给用户,以使用户获知都有哪些目标被检测出来。Optionally, after acquiring the distribution area corresponding to each detected target, the image retrieval device displays the distribution area corresponding to each detected target on the image to be detected to the user, so that the user knows which targets have been detected .
步骤S208,根据各检出目标对应的分布区域在待检索图像中进行抠图,得到各检出目标对应的子图。Step S208: Cut out the image in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target.
具体地,图像检索设备根据各检出目标对应的分布区域,针对各检出目标分别在待检索图像中进行抠图,得到各检出目标对应的子图,以用于后续的检索步骤。可选地,分布区域用检出目标所在检出框(boundingbox)左上、左下、右上、右下4个顶点的坐标表示,根据这4个顶点的坐标在待检索图像中截取检出目标的子图。可选地,针对每一检出目标,都需要从原图(即待检索图像)中截取目标子图。Specifically, the image retrieval device performs matting in the image to be retrieved for each detected target according to the distribution area corresponding to each detected target, and obtains a sub-image corresponding to each detected target for subsequent retrieval steps. Optionally, the distribution area is represented by the coordinates of the upper left, lower left, upper right, and lower right four vertices of the detection box (boundingbox) where the detected target is located. picture. Optionally, for each detected target, the target sub-image needs to be intercepted from the original image (that is, the image to be retrieved).
可选地,图像检索设备在得到各检出目标对应的子图后,将各检出目标对应的子图展示给用户,以使用户获知都有哪些目标被检测出来并将用于后续检索,其中,效果图可参见图3。Optionally, after obtaining the sub-images corresponding to each detected target, the image retrieval device displays the sub-images corresponding to each detected target to the user, so that the user knows which targets have been detected and will be used for subsequent retrieval. Among them, the effect picture can be seen in Figure 3.
步骤S210,对于各检测类型的检出目标,在与检出目标的检测类型对应的图像底库中,检索与检出目标对应的子图匹配的底库子图。Step S210: For the detected targets of each detection type, in the image base library corresponding to the detection type of the detected target, search for base library sub-images that match the sub-image corresponding to the detected target.
其中,图像底库中存储有底库子图,底库子图包含检测类型与检出目标的检测类型相同的目标。Among them, the image base library stores base library sub-images, and the base library sub-images include targets with the same detection type as the detection type of the detected target.
具体地,图像检索设备首先根据检出目标的检测类型查找相匹配的图像底库,进而在与检出目标的检测类型相匹配的图像底库中,检索与检出目标对应的子图匹配的底库子图。例如,在待检索图像A中,检出目标包括人脸目标、人体目标和非机动车目标,对应检出目标的检测类型分别是人脸类型、人体类型和非机动车类型。图像检测设备根据机动车类型查找机动车类型的图像底库,根据非机动车类型查找非机动车类型的图像底库,根据人体类型查找人体类型的图像底库,然后,图像检测设备分别在各种类型的图像底库中,例如在人脸类型的图像底库中,检索与人脸子图匹配的底库子图,在非机动车类型的图像底库中,检索与非机动车子图匹配的底库子图,在人体类型的图像底库中,检索与人体子图匹配的底库子图。Specifically, the image retrieval device first searches for a matching image base based on the detection type of the detected target, and then searches the image base matching the detection type of the detected target for the sub-image that matches the detected target. Bottom library submap. For example, in the image A to be retrieved, the detected targets include face targets, human targets, and non-motorized vehicle targets, and the detection types corresponding to the detected targets are face type, human body type, and non-motorized vehicle type, respectively. The image detection equipment finds the image database of the motor vehicle type according to the type of motor vehicle, the image database of the non-motor vehicle type according to the type of non-motor vehicle, and the image database of the human body type according to the type of human body. In various types of image bases, for example, in the image base of the face type, search the base sub-images that match the face sub-images, and in the non-motor vehicle type image bases, search the sub-images that match the non-motor vehicle sub-images Base library sub-image, in the image base library of the human body type, search for the base library sub-image matching the human body sub-image.
可选地,目标子图与底库子图的匹配方式可以是:首先,分别提取目标子图的图像特征和底库子图的图像特征,然后,确定目标子图的图像特征和底库子图的图像特征之间的相似度,将相似度大于预设阈值的底库子图作为与检出目标对应的子图匹配的底库子图。 可选地,相似度可以通过计算特征向量之间的距离来确定。Optionally, the matching method of the target sub-image and the base library sub-image may be as follows: firstly, extract the image features of the target sub-image and the image features of the base library sub-image respectively, and then determine the image features of the target sub-image and the base library sub-image. For the similarity between the image features of the images, the base library sub-image with the similarity greater than the preset threshold is used as the base library sub-image matching the sub-image corresponding to the detected target. Alternatively, the similarity can be determined by calculating the distance between feature vectors.
步骤S212,根据与各检出目标对应的子图匹配的底库子图,得到检索指令对应的目标图像。In step S212, the target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
具体地,图像检索设备可以将与各检出目标对应的子图匹配的底库子图直接作为检索指令对应的目标图像,也可以对与各检出目标对应的子图匹配的底库子图进行进一步的筛选、处理得到检索指令对应的目标图像,例如可将底库子图对应的全景图(底库子图是由全景图中进行目标检测并抠图获得)作为目标图像。Specifically, the image retrieval device may directly use the base library sub-images matching the sub-images corresponding to each detected target as the target image corresponding to the retrieval instruction, or may directly use the base library sub-images matching the sub-images corresponding to each detected target as the target image. Further screening and processing are performed to obtain the target image corresponding to the retrieval instruction. For example, the panoramic image corresponding to the base library sub-image (the base library sub-image is obtained by target detection and matting in the panoramic image) can be used as the target image.
续举前例,可选地,对于待检测图像A,图像检索设备可一次性对其中的人脸目标、人体目标、非机动车目标进行检索,得到人脸检索结果、人体检索结果、非机动车检索结果,将三者的集合作为检索指令对应的目标图像。Continuing the previous example, optionally, for the image A to be detected, the image retrieval device can retrieve the face target, the human target, and the non-motorized vehicle target at one time, and obtain the face retrieval result, the human body retrieval result, and the non-motorized vehicle target. As a result of the search, the set of the three is used as the target image corresponding to the search instruction.
可选地,图像检索设备可根据检出目标对应的子图与匹配的底库子图之间的相似度,将多张匹配的底库子图按照降序排列,并选取前N位作为检索指令对应的目标图像。将目标图像展示给用户的效果图可参见图4。Optionally, the image retrieval device can arrange the multiple matched base library sub-images in descending order according to the similarity between the sub-image corresponding to the detected target and the matched base library sub-image, and select the top N bits as the search command The corresponding target image. The rendering of the target image to the user can be seen in Figure 4.
需要说明的是,本申请实施例对各步骤的先后顺序并未限制,例如,步骤S202可在步骤S204、S206或S208之后。It should be noted that the embodiment of the present application does not limit the sequence of the steps. For example, step S202 may follow step S204, S206, or S208.
上述图像检索方法中,可一次性实现对待检索图像中多个不同检测类型的目标进行目标检测,从而得到各检出目标对应的检测类型以及各检出目标对应的分布区域,进而对于各检测类型的检出目标,分别在与检出目标的检测类型对应的图像底库中检索出目标图像。本申请实施例无需用户人为地截取待检索图像中各个目标的子图并将各个目标子图输入检索系统,用户只需上传一次图像即可一次性完成对所有检测类型的检出目标的检索,从而有效降低了用户操作复杂度,提高了检索效率。In the above image retrieval method, multiple targets of different detection types in the image to be retrieved can be detected at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target, and then for each detection type The target image is retrieved in the image base corresponding to the detection type of the detected target. In the embodiment of the application, the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system. The user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time. Thus, the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
在一示例性实施例中,用户的检索指令为关联检索指令,该关联检索指令包含第一检测类型和第二检测类型。与第一检测类型的检出目标对应的子图匹配的底库子图为第一底库子图,与第二检测类型的检出目标对应的子图匹配的底库子图为第二底库子图。图像底库中关联存储有底库子图以及底库子图所对应全景图的图像标识。In an exemplary embodiment, the user's search instruction is an associated search instruction, and the associated search instruction includes a first detection type and a second detection type. The base library subgraph matching the subgraph corresponding to the detection target of the first detection type is the first base library subgraph, and the base library subgraph matching the subgraph corresponding to the detection target of the second detection type is the second base Library map. The image base library is associated with the base library sub-image and the image identifier of the panorama corresponding to the base library sub-image.
续举前例,待检索图像A中包含人脸F、人体P和非机动车V,上一实施例中,检索指令对应的目标图像包含用人脸F检索出的人脸F1,用人体P检索出的人体P1和用非机动车V检索出的非机动车V1。目标图像可以是人脸F1、人体P1和非机动车V1所在的底库子图(见图4),也可以是人脸F1、人体P1和非机动车V1所在的全景图。由于人脸F1仅是由人脸F检索出的,无法获知人脸F1中所在的全景图中是否拍到了人体、拍到的 人体是否与人体P匹配。然而,某些情况下,用户希望检索出这样的目标图像,它在同一张图像中既然包含与人脸F匹配的人脸F2又包含与人体P匹配的人体P2。或者,用户希望检索出这样的目标图像,它在同一张图像中既然包含与人体P匹配的人体P2又包含与非机动车V匹配的非机动车V2。即,用户希望在同一目标图像中有至少两种检测类型的目标存在,且每种检测类型的目标均与待检索图像中相应类型的目标匹配。此时,用户可以给出包含第一检测类型和第二检测类型的关联检索指令。例如,用户希望同一张目标图像中既然包含与人脸F匹配的人脸又包含与人体P匹配的人体时,可给出包含人脸检测类型和人体检索类型的关联检索指令。相应地,图像检索设备在获得了与人脸F匹配的F1、F2,与人体P匹配的P1、P2后,不会将F1、F2、P1、P2直接作为目标图像返回给用户,而是会进一步判断F1、F2和P1、P2是否出现在同一图像中,即F1、F2和P1、P2是否对应了相同的全景图。To continue the previous example, the image A to be retrieved contains the face F, the human body P and the non-motor vehicle V. In the previous embodiment, the target image corresponding to the retrieval instruction contains the face F1 retrieved by the face F, and retrieved by the human body P The human body P1 and the non-motor vehicle V1 retrieved by the non-motor vehicle V. The target image can be a sub-image of the base library where the human face F1, the human body P1 and the non-motorized vehicle V1 are located (see FIG. 4), or it can be a panoramic image where the human face F1, the human body P1 and the non-motorized vehicle V1 are located. Since the face F1 is only retrieved from the face F, it is impossible to know whether the human body is photographed in the panoramic image where the face F1 is located, and whether the photographed human body matches the human body P. However, in some cases, the user wants to retrieve such a target image, since it contains a human face F2 matching the human face F and a human body P2 matching the human body P in the same image. Or, the user wants to retrieve such a target image, since it contains a human body P2 matching the human body P and a non-motor vehicle V2 matching the non-motor vehicle V in the same image. That is, the user hopes that there are at least two detection types of targets in the same target image, and the targets of each detection type are matched with the corresponding types of targets in the image to be retrieved. At this time, the user can give an associated retrieval instruction including the first detection type and the second detection type. For example, when the user hopes that since the same target image contains a human face matching the human face F and a human body matching the human body P, an associated retrieval instruction including the face detection type and the human body retrieval type can be given. Correspondingly, after the image retrieval device obtains F1, F2 matching the human face F and P1, P2 matching the human body P, it will not return F1, F2, P1, P2 directly to the user as the target image, but will It is further judged whether F1, F2 and P1, P2 appear in the same image, that is, whether F1, F2 and P1, P2 correspond to the same panoramic image.
基于此,请参照图5,步骤S212具体可以通过以下步骤实现:Based on this, referring to FIG. 5, step S212 can be specifically implemented through the following steps:
步骤S212a,若第一底库子图和第二底库子图关联了具有相同图像标识的第一关联全景图,则将第一关联全景图作为检索指令对应的目标图像,或者将第一关联全景图、第一底库子图和第二底库子图作为检索指令对应的目标图像。Step S212a: If the first associated panoramic image with the same image identifier is associated with the first base library sub-image and the second base library sub-image, then the first associated panoramic image is used as the target image corresponding to the retrieval instruction, or the first associated The panoramic image, the first base library sub-image, and the second base library sub-image are used as the target image corresponding to the retrieval instruction.
具体地,第一底库子图和第二底库子图关联了具有相同图像标识的第一关联全景图,表明第一底库子图和第二底库子图都是从第一关联全景图中抠图得到,也就是说,第一底库子图中的第一检测类型的目标和第二底库子图中的第二检测类型的目标位于同一张全景图中。图像检索设备通过判定底库子图与全景图的关联关系,可检索出一张图中同时包含两种检测类型的全景图,这样更容易确定不同的底库子图中不同检测类型的目标的关系。Specifically, the first base library sub-image and the second base library sub-image are associated with the first associated panorama with the same image identifier, indicating that the first base library sub-image and the second base library sub-image are both from the first associated panorama The image is cut out in the figure, that is, the target of the first detection type in the first base library submap and the target of the second detection type in the second base library submap are located in the same panoramic image. The image retrieval device can retrieve a panoramic image containing two detection types at the same time by determining the relationship between the base library sub-image and the panoramic image, so that it is easier to determine the relationship between different detection types of targets in different base library sub-images.
举例而言,在待检索图像A中,若第一底库子图中的目标为人脸F2,第二底库子图中的目标为非机动车V2,若第一底库子图与第二底库子图对应的全景图具有相同的图像标识,表明人脸F2与非机动车V2原来是位于同一张第一关联全景图B中,这时,由于底库子图与全景图的关联性,可将第一关联全景图B也作为检索指令对应的目标图像。For example, in the image A to be retrieved, if the target in the first base library sub-image is the face F2, the target in the second base library sub-image is the non-motorized vehicle V2, if the first base library sub-image and the second base sub-image are The panorama corresponding to the base library sub-image has the same image identifier, indicating that the face F2 and the non-motor vehicle V2 were originally located in the same first associated panorama B. At this time, due to the correlation between the base library sub-image and the panorama , The first associated panoramic image B can also be used as the target image corresponding to the retrieval instruction.
本申请实施例中,可以得到这样的目标图像,在同一目标图像中有至少两种检测类型的目标存在,且每种检测类型的目标均与待检索图像中相应类型的目标匹配。如此,可提供更加丰富、多维的检索手段,提升用户体验。In the embodiment of the present application, such a target image can be obtained. There are at least two detection types of targets in the same target image, and each detection type of target matches the corresponding type of target in the image to be retrieved. In this way, a richer and multi-dimensional search method can be provided, and the user experience can be improved.
在一示例性实施例中,第一检测类型和第二检测类型的获取方式可以是:将各检出目标对应的检测类型展示给用户,以使用户从各检出目标对应的检测类型中选取第一检测类型和第二检测类型。In an exemplary embodiment, the method for acquiring the first detection type and the second detection type may be: displaying the detection type corresponding to each detected target to the user, so that the user can select from the detection type corresponding to each detected target The first detection type and the second detection type.
具体地,在图像检索设备获得各检出目标对应的检测类型之后,图像检索设备将各检出目标对应的检测类型展示给用户,展示方式可以是通过图像检索设备的显示屏展示给用户或者通过先传输给终端再通过终端的显示屏展示给用户,以使用户从各检出目标对应的检测类型中选取第一检测类型和第二检测类型。可选地,用户可以根据检测类型提示选项手动选择第一检测类型和第二检测类型。可选地,用户也可以选择一种检测类型或者多于两种的检测类型。Specifically, after the image retrieval device obtains the detection type corresponding to each detected target, the image retrieval device displays the detection type corresponding to each detected target to the user. The display method can be displayed to the user through the display screen of the image retrieval device or through It is first transmitted to the terminal and then displayed to the user through the display screen of the terminal, so that the user selects the first detection type and the second detection type from the detection types corresponding to each detected target. Optionally, the user can manually select the first detection type and the second detection type according to the detection type prompt option. Optionally, the user can also select one detection type or more than two detection types.
本申请实施例中,通过将检出目标对应的检测类型展示给用户,以便于用户选择有检索需求的检测类型的目标,可快速得到检索的目标图像。并且,如此可避免全部检测类型的目标被检索,使得所检索出的目标图像数据量过大,从而增加用户查看检索结果的时间,无疑增加了用户的任务量。因此,可进一步提高图像检索效率以及准确性。In the embodiment of the present application, the detection type corresponding to the detected target is displayed to the user, so that the user can select the target of the detection type with the retrieval requirement, and the retrieved target image can be quickly obtained. Moreover, this can prevent all detection types of targets from being retrieved, so that the amount of retrieved target image data is too large, thereby increasing the time for the user to view the retrieval results, and undoubtedly increasing the amount of tasks for the user. Therefore, the efficiency and accuracy of image retrieval can be further improved.
在一示例性实施例中,该方法还包括以下步骤:In an exemplary embodiment, the method further includes the following steps:
步骤S2112,根据第一检测类型的检出目标对应的子图与第一底库子图的第一相似度,和第二检测类型的检出目标对应的子图与第二底库子图的第二相似度,得到检索指令对应的各目标图像的相似度。Step S2112, according to the first similarity between the subgraph corresponding to the detected target of the first detection type and the first base library subgraph, and the difference between the subgraph corresponding to the detected target of the second detection type and the second base library subgraph The second degree of similarity obtains the degree of similarity of each target image corresponding to the retrieval instruction.
具体地,图像之间的相似度可以通过提取各图像中的图像特征,并计算相应位置的特征距离来得到。图像检索设备根据第一检测类型的检出目标对应的子图与第一底库子图的第一相似度,和第二检测类型的检出目标对应的子图与第二底库子图的第二相似度,得到各目标图像与待检索图像的相似度。可选地,图像检索设备可以对第一相似度和第二相似度按照预设权重进行线性叠加之后得到检索指令对应的各目标图像的相似度。图像检索设备还可以对第一相似度和第二相似度进行非线性叠加之后得到检索指令对应的各目标图像的相似度。当然,也可以通过其他方式计算各目标图像与待检索图像的相似度,本申请不限于此。Specifically, the similarity between the images can be obtained by extracting the image features in each image and calculating the feature distance of the corresponding position. The image retrieval device is based on the first similarity between the sub-image corresponding to the detected target of the first detection type and the first base library sub-image, and the difference between the sub-image corresponding to the detected object of the second detection type and the second base library sub-image The second degree of similarity obtains the degree of similarity between each target image and the image to be retrieved. Optionally, the image retrieval device may linearly superimpose the first similarity and the second similarity according to a preset weight to obtain the similarity of each target image corresponding to the retrieval instruction. The image retrieval device may also perform non-linear superposition of the first similarity and the second similarity to obtain the similarity of each target image corresponding to the retrieval instruction. Of course, the similarity between each target image and the image to be retrieved can also be calculated in other ways, and the present application is not limited to this.
例如,用户希望同一张目标图像中既然包含与人脸F匹配的人脸又包含与人体P匹配的人体,给出了包含人脸检测类型和人体检索类型的关联检索指令。其中,人脸匹配相似度阈值为90%,人体匹配相似度阈值为70%。通常情况下人脸检索结果较为准确,可设置较高权重例如0.8,人体因受衣着、遮挡等原因可设置较低权重例如0.2。用户图像检索设备检索到与人脸F匹配的F1(与F相似度90%,对应全景图标识1)、F2(与F相似度95%,对应全景图标识2),与人体P匹配的P1(与P相似度90%,对应全景图标识1)、P2(与F相似度75%,对应全景图标识2),可获得具有全景图标识1的目标图像M1(包含F1和P1),具有全景图标识2的目标图像M2(包含F2和P2),其中M1与待检索图像的相 似度为90%,M2与待检索图像的相似度为91%。For example, the user hopes that since the same target image contains a human face matching the human face F and a human body matching the human body P, an associated retrieval instruction including the face detection type and the human body retrieval type is given. Among them, the face matching similarity threshold is 90%, and the human body matching similarity threshold is 70%. Normally, the face retrieval result is more accurate, and a higher weight can be set, such as 0.8, and a lower weight, such as 0.2, can be set for the human body due to clothing or occlusion. The user image retrieval device retrieves F1 (90% similarity to F, corresponding to panoramic image identification 1), F2 (95% similarity to F, corresponding to panoramic image identification 2), and P1 that matches human body P (90% similarity to P, corresponding to panoramic image identification 1), P2 (75% similarity to F, corresponding to panoramic image identification 2), the target image M1 (including F1 and P1) with panoramic image identification 1 can be obtained, with The target image M2 (including F2 and P2) of the panoramic image identifier 2, where the similarity between M1 and the image to be retrieved is 90%, and the similarity between M2 and the image to be retrieved is 91%.
本申请实施例中,由于第一底库子图与第二底库子图为同一张第一关联全景图中的图像,因此,根据第一相似度和第二相似度计算出的关联相似度,可用来表征第一关联全景图与第一检测类型和第二检测类型的检出目标的相似程度,这样,可获得更多的图像信息,有助于找寻同时出现两类目标的图像之间关联性。In the embodiment of the present application, since the first base library sub-image and the second base library sub-image are images in the same first associated panoramic image, the associated similarity calculated based on the first similarity and the second similarity , Can be used to characterize the similarity between the first associated panoramic image and the detected targets of the first detection type and the second detection type. In this way, more image information can be obtained, which helps to find the image between the two types of targets at the same time. Relevance.
进一步地,在得到检索指令对应的各目标图像的相似度之后,可将不同检测类型下的相似度分别按照降序排列,并选取前N位作为检索指令对应的目标图像。这样,将相似度较高的目标图像展示给用户,一方面减少了用户查看的任务量,另一方面提供的目标图像更为准确,有利于提高用户体验。Further, after the similarity of each target image corresponding to the retrieval instruction is obtained, the similarities under different detection types may be sorted in descending order, and the top N bits may be selected as the target image corresponding to the retrieval instruction. In this way, displaying target images with a higher degree of similarity to the user reduces the amount of tasks the user has to view on the one hand, and on the other hand provides more accurate target images, which is conducive to improving user experience.
在一示例性实施例中,检索指令包含用于检索的检出目标的标识。基于此,请参照图6,该方法还包括以下步骤:In an exemplary embodiment, the retrieval instruction includes the identification of the detected target used for retrieval. Based on this, please refer to Figure 6, the method also includes the following steps:
步骤S209,将各检出目标对应的分布区域或各检出目标对应的子图展示给用户,以使用户从各检出目标中选取用于图像检索的检出目标。In step S209, the distribution area corresponding to each detected target or the sub-image corresponding to each detected target is displayed to the user, so that the user selects a detected target for image retrieval from the detected targets.
具体地,图像检索设备在获得各检出目标对应的分布区域和/或各检出目标对应的子图之后,将各检出目标对应的分布区域和/或各检出目标对应的子图展示给用户,展示方式可以是通过图像检索设备的显示屏展示给用户或者通过先传输给终端再通过终端的显示屏展示给用户,以使用户从各检出目标中选取用于图像检索的检出目标。Specifically, after obtaining the distribution area corresponding to each detected target and/or the sub-map corresponding to each detected target, the image retrieval device displays the distribution area corresponding to each detected target and/or the sub-map corresponding to each detected target To the user, the display mode can be displayed to the user through the display screen of the image retrieval device or through the first transmission to the terminal and then displayed to the user through the terminal display, so that the user can select the checkout for image retrieval from each checkout target Target.
可以理解的是,图像检索设备通过预设的目标检测算法对待检索图像进行目标检测得到各检出目标后,即对各检出目标分配一标识(例如目标ID),用户选取了某个检出目标作为用于检索的检出目标后,即返回包含用于检索的检出目标的标识的检索指令。It is understandable that after the image retrieval device performs target detection on the image to be retrieved through the preset target detection algorithm and obtains each detected target, it assigns an identifier (for example, target ID) to each detected target, and the user selects a certain detected target. After the target is used as a checkout target for search, it returns a search instruction containing the identification of the checkout target used for search.
进一步地,步骤S210具体可以通过以下步骤实现:Further, step S210 can be specifically implemented through the following steps:
步骤S2102,对于与用于图像检索的检出目标的标识对应的第三检出目标,在与第三检出目标的检测类型对应的图像底库中,检索与第三检出目标对应的子图匹配的第三底库子图。Step S2102, for the third detection target corresponding to the identification of the detection target used for image retrieval, in the image base corresponding to the detection type of the third detection target, search for the child corresponding to the third detection target. The third base library sub-image that the image matches.
具体地,图像检索设备在接收到用户选择的检出目标之后,根据检出目标的标识确定第三检出目标,并在与第三检出目标的检测类型对应的图像底库中,检索与第三检出目标对应的子图匹配的第三底库子图。即本实施例中,只针对用户选择的检出目标进行检索,无需对所有的检出目标进行检索。Specifically, after the image retrieval device receives the detection target selected by the user, it determines the third detection target according to the identification of the detection target, and searches the image database corresponding to the detection type of the third detection target. The third base library subgraph matching the subgraph corresponding to the third detection target. That is, in this embodiment, the search is performed only for the checkout targets selected by the user, and it is not necessary to search for all checkout targets.
需要说明的是,第三检出目标可以是多个,多个第三检出目标可以对应相同或不同的检测类型。例如,用户从待检索图像中的人脸F、人体P、非机动车V中选取人脸F、非 机动车V作为第三检出目标,图像检索设备可在人脸图像底库中检索与F匹配的底库子图F4,在非机动车图像底库中检索与P匹配的底库子图P4。It should be noted that there may be multiple third detection targets, and multiple third detection targets may correspond to the same or different detection types. For example, the user selects the face F, the non-motor vehicle V from the face F, the human body P, and the non-motorized vehicle V in the image to be retrieved as the third detection target. The base library sub-image F4 matched by F is searched for the base library sub-image P4 matching P in the non-motor vehicle image base library.
在另一实施方式中,图像检索设备可以只在待检索图像中包含两个同一检测类型的不同目标时将这两个不同的目标展示给用户供用户选择,对于只包含一个目标的检测类型,可默认用其包含的目标进行检索。例如,待检测图像中包含2个人脸,1辆非机动车,则可将2个人脸展示给用户以使用户选择需要用于检索的人脸,而无需把非机动车展示给用户。之后,图像检索设备使用待检索图像A中包含的非机动车,以及用户选择的1张人脸进行检索。In another embodiment, the image retrieval device may only show two different targets of the same detection type to the user for selection when the image to be retrieved contains two different targets of the same detection type. For a detection type that contains only one target, The target contained in it can be used for retrieval by default. For example, if the image to be detected contains two human faces and one non-motorized vehicle, the two human faces can be displayed to the user so that the user can select the face that needs to be used for retrieval without showing the non-motorized vehicle to the user. After that, the image retrieval device uses the non-motorized vehicle contained in the image A to be retrieved and a face selected by the user for retrieval.
本申请实施例中,通过将各检出目标对应的分布区域和/或各检出目标对应的子图展示给用户,以便于用户选择有检索需求的目标,从而快速检索出用户有检索需求的目标的检索图像,进一步提高了检索效率。In the embodiment of the present application, the distribution area corresponding to each detected target and/or the sub-graph corresponding to each detected target is displayed to the user, so that the user can select the target with the retrieval requirement, so as to quickly retrieve the user with the retrieval requirement. The retrieval image of the target further improves retrieval efficiency.
在一示例性实施例中,检索指令包含至少两个用于检索的检出目标的标识。基于此,步骤S210具体还可以通过以下步骤实现:In an exemplary embodiment, the retrieval instruction includes at least two identifications of the detected targets used for retrieval. Based on this, step S210 can also be specifically implemented through the following steps:
步骤S2104,对于与用于图像检索的检出目标的标识对应的第四检出目标,在与第四检出目标的检测类型对应的图像底库中,检索与第四检出目标对应的子图匹配的第四底库子图。Step S2104, for the fourth detection target corresponding to the identification of the detection target used for image retrieval, in the image base corresponding to the detection type of the fourth detection target, search for the child corresponding to the fourth detection target The fourth base library sub-picture of the picture matching.
具体地,图像检索设备对于与用于图像检索的检出目标的标识对应的第四检出目标,在与第四检出目标的检测类型对应的图像底库中,检索与第四检出目标对应的子图匹配的第四底库子图。Specifically, for the fourth detection target corresponding to the identification of the detection target used for image retrieval, the image retrieval device retrieves the fourth detection target in the image base corresponding to the detection type of the fourth detection target The corresponding subgraph matches the fourth base library subgraph.
某些情况下,用户希望检索到同时包含第三检出目标和第四检出目标的图像。例如,待检索图像中包含人脸A和人脸B,用户希望找到人脸A和人脸B被同时拍到的其他图像。此时,步骤S212具体可以通过以下步骤实现:In some cases, the user wants to retrieve images that contain both the third detection target and the fourth detection target. For example, the image to be retrieved contains face A and face B, and the user wants to find other images where face A and face B are captured at the same time. At this time, step S212 can be specifically implemented through the following steps:
步骤S2122,若第三底库子图和第四底库子图关联了具有相同图像标识的第二关联全景图,则将第二关联全景图作为检索指令对应的目标图像,或者将第二关联全景图、第三底库子图和第四底库子图作为检索指令对应的目标图像。Step S2122: If the third base library sub-image and the fourth base library sub-image are associated with a second associated panorama with the same image identifier, use the second associated panorama as the target image corresponding to the retrieval instruction, or associate the second associated panorama with The panoramic image, the third base library sub-image, and the fourth base library sub-image are used as the target image corresponding to the retrieval instruction.
具体地,若第三底库子图和第四底库子图关联了具有相同图像标识的第二关联全景图,表明第三底库子图和第四底库子图都是从第二关联全景图中抠图得到,也就是说,第三底库子图中的目标和第四底库子图中的目标位于同一张全景图中。此时,图像检索设备可将第二关联全景图作为检索指令对应的目标图像,或者图像检索设备将第二关联全景图、第三底库子图和第四底库子图作为检索指令对应的目标图像。Specifically, if the third base library sub-image and the fourth base library sub-image are associated with the second associated panorama with the same image identifier, it indicates that the third base library sub-image and the fourth base library sub-image are both from the second association. The map is obtained in the panorama, that is, the target in the third base library sub-map and the target in the fourth base library sub-map are in the same panoramic view. At this time, the image retrieval device may use the second associated panorama as the target image corresponding to the retrieval instruction, or the image retrieval device may use the second associated panorama, the third base library sub-image, and the fourth base library sub-image as the retrieval instruction corresponding to the retrieval instruction. Target image.
如此,图像检索设备会将人脸A和人脸B被同时拍到的第二关联全景图作为目标图像。In this way, the image retrieval device will use the second associated panoramic image in which the face A and the face B are captured at the same time as the target image.
需要说明的是,第三检出目标和第四检出目标的检测类型可以相同也可以不同。It should be noted that the detection types of the third detection target and the fourth detection target may be the same or different.
本申请实施例中,若不同的底库子图属于同一张第二关联全景图中的局部图,表明这些底库子图是在同一时间被同一图像采集设备拍摄到的,因此,可将这些底库子图以及第二关联全景图作为最终的目标图像,有利于用户获知各图像之间的关联性,并以此获知更多的图像信息。In the embodiment of this application, if the different base library sub-images belong to the partial images in the same second associated panorama, it indicates that these base library sub-images were captured by the same image acquisition device at the same time. Therefore, these The base library sub-image and the second associated panoramic image are used as the final target image, which is beneficial for the user to know the correlation between the images, and thereby learn more image information.
在一示例性实施例中,请参照图7,步骤S210具体可以通过以下步骤实现:In an exemplary embodiment, referring to FIG. 7, step S210 may be specifically implemented through the following steps:
步骤S232,在与检出目标的检测类型对应的图像底库中,筛选符合用户输入的设定时间和/或设定地点的底库子图集合;Step S232, in the image base library corresponding to the detection type of the detected target, filter the base library sub-image set that meets the set time and/or set location input by the user;
步骤S234,在底库子图集合中,检索与检出目标对应的子图匹配的底库子图。Step S234, searching for a base library subgraph matching the subgraph corresponding to the detected target in the base library subgraph set.
具体地,用户可在终端展示的检索界面中,在检索条件选项处设置检索时间段和检索地点范围,基于该设定时间和/或设定地点,在与检出目标的检测类型对应的图像底库中,筛选符合用户输入的设定时间和/或设定地点的底库子图集合。接下来,目标检测设备在底库子图集合中,检索与检出目标对应的子图匹配的底库子图。Specifically, the user can set the search time period and the search location range in the search condition option in the search interface displayed on the terminal. Based on the set time and/or set location, the image corresponding to the detection type of the detected target In the base library, filter the set of base library submaps that meet the set time and/or set location input by the user. Next, the target detection device searches for the base library subgraph matching the subgraph corresponding to the detected target in the base library subgraph set.
本申请实施例中,只在设定时间和/或设定地点的底库子图中进行检索,有利于快速地获得检索图像。In the embodiment of the present application, the search is only performed in the base library sub-map at the set time and/or set location, which is beneficial to quickly obtain the search image.
在一示例性实施例中,时间设定的实现方式包括多种,以下仅列举其中几种实现方式:In an exemplary embodiment, there are multiple ways to implement time setting, and only a few of them are listed below:
实现方式一:获取用户输入的预设时间以及预设时长;将包含预设时间的时间段作为设定时间,其中,设定时间的时长为预设时长。可选地,预设时间为基于待检索图像的拍摄时间确定的时间,设定时间为以预设时间为中心,前后1/2预设时长的时间段。Implementation method 1: Obtain the preset time and preset duration input by the user; use the time period including the preset time as the set time, where the duration of the set time is the preset duration. Optionally, the preset time is a time determined based on the shooting time of the image to be retrieved, and the set time is a time period centered on the preset time and 1/2 of the preset time length before and after.
通常情况下,在待检索图像拍摄时间前后一段时间内更容易检索到目标,预设时长可根据目标移动速度设定。Under normal circumstances, it is easier to retrieve the target within a period of time before and after the time the image to be retrieved is taken, and the preset duration can be set according to the moving speed of the target.
实现方式二:获取用户输入的起始时间和终止时间;将起始时间与终止时间之间的时间段作为设定时间。可选地,起始时间和终止时间基于待检索图像的拍摄时间确定。Implementation method 2: Obtain the start time and end time entered by the user; use the time period between the start time and the end time as the set time. Optionally, the start time and the end time are determined based on the shooting time of the image to be retrieved.
举例而言,在连续时间段选项中,用户在起始时间处输入起始时间,例如2018-05-02 00:00:00,并在截止时间处输入终止时间,例如2018-05-09 00:00:00,设置好之后,图像检索设备将2018-05-02 00:00:00~2018-05-09 00:00:00作为设定时间。For example, in the continuous time period option, the user enters the start time at the start time, such as 2018-05-02 00:00:00, and the end time at the end time, such as 2018-05-09 00 :00:00, after setting, the image retrieval device will use 2018-05-02 00:00:00 ~ 2018-05-09 00:00:00 as the set time.
实现方式三:获取用户输入的起始日期和终止日期、每日的起始时间和每日的终止时间,将起始日期和终止日期之间的每个日期中,每日的起始时间和每日的终止时间之间的 时间段作为设定时间。可选地,起始日期和终止日期、每日的起始时间和每日的终止时间基于待检索图像的拍摄时间确定。Implementation method 3: Get the start date and end date entered by the user, the start time of each day, and the end time of each day, and add the start time and the end time of each day between the start date and the end date The time period between the end times of each day is regarded as the set time. Optionally, the start date and end date, the start time of each day, and the end time of each day are determined based on the shooting time of the image to be retrieved.
举例而言,在有规律时间段选项中,用户在日期处输入起始日期和终止日期,例如2018-05-02、2018-05-09,并在时间处输入每日的起始时间和每日的终止时间,例如01:00:00、04:00:00,设置好之后,图像检索设备将2018-05-02~2018-05-09中的01:00:00~04:00:00作为设定时间。For example, in the regular time period option, the user enters the start date and end date at the date, such as 2018-05-02, 2018-05-09, and enters the daily start time and every day at the time. The end time of the day, such as 01:00:00, 04:00:00, after setting, the image retrieval equipment will be 01:00:00~04:00:00 in 2018-05-02~2018-05-09 As the set time.
本实施例中,通过设置多种检索时间的搜索方式,可满足不同的实际需求,功能更加多样化,适用性更强。In this embodiment, by setting multiple search time search methods, different actual needs can be met, the functions are more diversified, and the applicability is stronger.
应该理解的是,虽然图2-7的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-7中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowcharts of FIGS. 2-7 are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least part of the steps in Figures 2-7 can include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
在一示例性实施例中,如图8所示,提供了一种图像检索装置,包括:指令接收模块302、图像获取模块304、目标检测模块306、抠图模块308、图像检索模块310和图像确定模块312,其中:In an exemplary embodiment, as shown in FIG. 8, an image retrieval device is provided, including: an instruction receiving module 302, an image acquisition module 304, a target detection module 306, a matting module 308, an image retrieval module 310, and an image Determine module 312, where:
该指令接收模块302,用于接收用户的检索指令。The instruction receiving module 302 is used to receive a user's retrieval instruction.
该图像获取模块304,用于获取待检索图像;待检索图像包含多个不同检测类型的目标。The image acquisition module 304 is used to acquire the image to be retrieved; the image to be retrieved contains multiple targets of different detection types.
该目标检测模块306,用于通过目标检测算法对待检索图像进行目标检测,得到各检出目标对应的检测类型以及各检出目标对应的分布区域;分布区域为检出目标在待检测图像中所处的区域。The target detection module 306 is used to perform target detection on the image to be retrieved through a target detection algorithm to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target; the distribution area is the location of the detected target in the image to be detected. Area.
该抠图模块308,用于根据各检出目标对应的分布区域在待检索图像中进行抠图,得到各检出目标对应的子图。The matting module 308 is used for matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target.
该图像检索模块310,用于对于各检测类型的检出目标,在与检出目标的检测类型对应的图像底库中,检索与检出目标对应的子图匹配的底库子图;图像底库中存储有底库子图,底库子图包含与检出目标的检测类型相同的目标。The image retrieval module 310 is used to retrieve the base library sub-images that match the sub-images corresponding to the detected targets in the image base database corresponding to the detection type of the detected target for the detected targets of each detection type; The base library sub-map is stored in the library, and the base library sub-map contains targets of the same detection type as the detected target.
该图像确定模块312,用于根据与各检出目标对应的子图匹配的底库子图,得到检索指令对应的目标图像。The image determination module 312 is configured to obtain the target image corresponding to the retrieval instruction according to the base library sub-image matched with the sub-image corresponding to each detected target.
上述图像检索装置中,可一次性实现对待检索图像中多个不同检测类型的目标进行目标检测,从而得到各检出目标对应的检测类型以及各检出目标对应的分布区域,进而对于各检测类型的检出目标,分别在与检出目标的检测类型对应的图像底库中检索出目标图像。本申请实施例无需用户人为地截取待检索图像中各个目标的子图并将各个目标子图输入检索系统,用户只需上传一次图像即可一次性完成对所有检测类型的检出目标的检索,从而有效降低了用户操作复杂度,提高了检索效率。In the above image retrieval device, multiple targets of different detection types in the image to be retrieved can be detected at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target, and then for each detection type The target image is retrieved in the image base corresponding to the detection type of the detected target. In the embodiment of the application, the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system. The user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time. Thus, the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
在一示例性实施例中,用户的检索指令为关联检索指令,关联检索指令包含第一检测类型和第二检测类型;与第一检测类型的检出目标对应的子图匹配的底库子图为第一底库子图,与第二检测类型的检出目标对应的子图匹配的底库子图为第二底库子图,图像底库中关联存储有底库子图以及底库子图所对应全景图的图像标识;该图像确定模块312具体用于若第一底库子图和第二底库子图关联了具有相同图像标识的第一关联全景图,则将第一关联全景图作为检索指令对应的目标图像,或者将第一关联全景图、第一底库子图和第二底库子图作为检索指令对应的目标图像。In an exemplary embodiment, the user's search instruction is an associated search instruction, and the associated search instruction includes a first detection type and a second detection type; a base library sub-image that matches a sub-image corresponding to a detection target of the first detection type It is the first base library sub-image, and the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image. The image base library is associated with the base library sub-image and the base library sub-image. The image identifier of the panoramic image corresponding to the image; the image determining module 312 is specifically configured to associate the first associated panoramic image with the same image identifier if the first base library subimage and the second base library subimage are associated with the first associated panoramic image. The image is used as the target image corresponding to the retrieval instruction, or the first associated panoramic image, the first base library sub-image, and the second base library sub-image are used as the target image corresponding to the retrieval instruction.
在一示例性实施例中,还包括:展示模块(图未示),用于将各检出目标对应的检测类型展示给用户,以使用户从各检出目标对应的检测类型中选取第一检测类型和第二检测类型。In an exemplary embodiment, it further includes: a display module (not shown) for displaying the detection type corresponding to each detected target to the user, so that the user can select the first detection type from the detection type corresponding to each detected target. Detection type and second detection type.
在一示例性实施例中,还包括:相似度计算模块,用于根据第一检测类型的检出目标对应的子图与第一底库子图的第一相似度,和第二检测类型的检出目标对应的子图与第二底库子图的第二相似度,得到检索指令对应的各目标图像的相似度。In an exemplary embodiment, it further includes: a similarity calculation module, which is used to calculate the first similarity between the sub-image corresponding to the detected target of the first detection type and the first base library sub-image, and the second detection type The second similarity between the sub-image corresponding to the target and the second base library sub-image is detected, and the similarity of each target image corresponding to the retrieval instruction is obtained.
在一示例性实施例中,检索指令包含用于检索的检出目标的标识;该展示模块还用于将各检出目标对应的分布区域或各检出目标对应的子图展示给用户,以使用户从各检出目标中选取用于图像检索的检出目标;该图像检索模块310具体用于对于与用于图像检索的检出目标的标识对应的第三检出目标,在与第三检出目标的检测类型对应的图像底库中,检索与第三检出目标对应的子图匹配的第三底库子图。In an exemplary embodiment, the retrieval instruction includes the identification of the detected target used for retrieval; the display module is also used to display the distribution area corresponding to each detected target or the sub-image corresponding to each detected target to the user, The user is allowed to select a detected target for image retrieval from among the detected targets; the image retrieval module 310 is specifically used for the third detected target corresponding to the identification of the detected target used for image retrieval, and the third detected target In the image base library corresponding to the detection type of the detected target, a third base library sub-image that matches the sub-image corresponding to the third detected target is retrieved.
在一示例性实施例中,检索指令包含至少两个用于检索的检出目标的标识;该图像检索模块310具体用于对于与用于图像检索的检出目标的标识对应的第四检出目标,在与第四检出目标的检测类型对应的图像底库中,检索与第四检出目标对应的子图匹配的第四底库子图;该图像确定模块312具体用于若第三底库子图和第四底库子图关联了具有相同图像标识的第二关联全景图,则将第二关联全景图作为检索指令对应的目标图像,或者将第二关联全景图、第三底库子图和第四底库子图作为检索指令对应的目标图像。In an exemplary embodiment, the retrieval instruction includes at least two identifications of the detected targets used for retrieval; the image retrieval module 310 is specifically configured to determine the fourth detection corresponding to the identifications of the detected targets used for image retrieval. Target, in the image base corresponding to the detection type of the fourth detected target, retrieve the fourth base library sub-image that matches the sub-image corresponding to the fourth detected target; the image determining module 312 is specifically configured to: If the base library sub-image and the fourth base library sub-image are associated with the second associated panoramic image with the same image identifier, the second associated panoramic image is used as the target image corresponding to the retrieval instruction, or the second associated panoramic image and the third associated panoramic image are The library sub-image and the fourth base library sub-image are used as the target image corresponding to the retrieval instruction.
在一示例性实施例中,该图像检索模块310具体用于在与检出目标的检测类型对应的图像底库中,筛选符合用户输入的设定时间和/或设定地点的底库子图集合;在底库子图集合中,检索与检出目标对应的子图匹配的底库子图。In an exemplary embodiment, the image retrieval module 310 is specifically configured to filter the image base library corresponding to the detection type of the detected target to filter the base library sub-images that meet the set time and/or set location input by the user. Set; in the base library subgraph collection, search for base library subgraphs that match the subgraph corresponding to the detected target.
关于图像检索装置的具体限定可以参见上文中对于图像检索方法的限定,在此不再赘述。上述图像检索装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the image retrieval device, please refer to the above definition of the image retrieval method, which will not be repeated here. Each module in the above-mentioned image retrieval device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一示例性实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储底库子图数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种图像检索方法。In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 9. The computer equipment includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store the sub-picture data of the base library. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize an image retrieval method.
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
在一示例性实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In an exemplary embodiment, a computer device is provided, including a memory and a processor, and a computer program is stored in the memory, and the processor implements the following steps when the processor executes the computer program:
接收用户的检索指令;Receiving user's retrieval instructions;
获取待检索图像;待检索图像包含多个不同检测类型的目标;Obtain the image to be retrieved; the image to be retrieved contains multiple targets of different detection types;
通过目标检测算法对待检索图像进行目标检测,得到各检出目标对应的检测类型以及各检出目标对应的分布区域;分布区域为检出目标在待检测图像中所处的区域;Target detection is performed on the image to be retrieved through the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the area where the detected target is located in the image to be detected;
根据各检出目标对应的分布区域在待检索图像中进行抠图,得到各检出目标对应的子图;Cut out the image in the image to be retrieved according to the distribution area corresponding to each detected target, and obtain the sub-image corresponding to each detected target;
对于各检测类型的检出目标,在与检出目标的检测类型对应的图像底库中,检索与检出目标对应的子图匹配的底库子图;图像底库中存储有底库子图,底库子图包含与检出目标的检测类型相同的目标;For detection targets of each detection type, in the image base corresponding to the detection type of the detected target, retrieve the base library sub-images that match the sub-image corresponding to the detected target; the image base library stores the base library sub-images , The base library sub-image contains the same target as the detection type of the detected target;
根据与各检出目标对应的子图匹配的底库子图,得到检索指令对应的目标图像。According to the base library sub-images matching the sub-images corresponding to each detected target, the target image corresponding to the retrieval instruction is obtained.
上述计算机设备中,可一次性实现对待检索图像中多个不同检测类型的目标进行目标 检测,从而得到各检出目标对应的检测类型以及各检出目标对应的分布区域,进而对于各检测类型的检出目标,分别在与检出目标的检测类型对应的图像底库中检索出目标图像。本申请实施例无需用户人为地截取待检索图像中各个目标的子图并将各个目标子图输入检索系统,用户只需上传一次图像即可一次性完成对所有检测类型的检出目标的检索,从而有效降低了用户操作复杂度,提高了检索效率。In the above-mentioned computer equipment, target detection can be performed on multiple targets of different detection types in the image to be retrieved at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target. The target is detected, and the target image is retrieved in the image base corresponding to the detection type of the detected target. In the embodiment of the application, the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system. The user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time. Thus, the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
在一示例性实施例中,用户的检索指令为关联检索指令,关联检索指令包含第一检测类型和第二检测类型;与第一检测类型的检出目标对应的子图匹配的底库子图为第一底库子图,与第二检测类型的检出目标对应的子图匹配的底库子图为第二底库子图,图像底库中关联存储有底库子图以及底库子图所对应全景图的图像标识;处理器执行计算机程序时还实现以下步骤:若第一底库子图和第二底库子图关联了具有相同图像标识的第一关联全景图,则将第一关联全景图作为检索指令对应的目标图像,或者将第一关联全景图、第一底库子图和第二底库子图作为检索指令对应的目标图像。In an exemplary embodiment, the user's search instruction is an associated search instruction, and the associated search instruction includes a first detection type and a second detection type; a base library sub-image that matches a sub-image corresponding to a detection target of the first detection type It is the first base library sub-image, and the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image. The image base library is associated with the base library sub-image and the base library sub-image. The image identifier of the panoramic image corresponding to the image; the processor also implements the following steps when executing the computer program: if the first base library sub-image and the second base library sub-image are associated with the first associated panoramic image with the same image identifier, the An associated panoramic image is used as the target image corresponding to the retrieval instruction, or the first associated panoramic image, the first base library sub-image, and the second base library sub-image are used as the target image corresponding to the retrieval instruction.
在一示例性实施例中,处理器执行计算机程序时还实现以下步骤:将各检出目标对应的检测类型展示给用户,以使用户从各检出目标对应的检测类型中选取第一检测类型和第二检测类型。In an exemplary embodiment, the processor further implements the following step when executing the computer program: displaying the detection type corresponding to each detected target to the user, so that the user selects the first detection type from the detection types corresponding to each detected target And the second detection type.
在一示例性实施例中,处理器执行计算机程序时还实现以下步骤:根据第一检测类型的检出目标对应的子图与第一底库子图的第一相似度,和第二检测类型的检出目标对应的子图与第二底库子图的第二相似度,得到检索指令对应的各目标图像的相似度。In an exemplary embodiment, the processor further implements the following steps when executing the computer program: according to the first similarity between the subgraph corresponding to the detected target of the first detection type and the first base library subgraph, and the second detection type The second similarity between the sub-image corresponding to the detected target and the second base library sub-image is obtained to obtain the similarity of each target image corresponding to the retrieval instruction.
在一示例性实施例中,检索指令包含用于检索的检出目标的标识;处理器执行计算机程序时还实现以下步骤:将各检出目标对应的分布区域或各检出目标对应的子图展示给用户,以使用户从各检出目标中选取用于图像检索的检出目标;对于与用于图像检索的检出目标的标识对应的第三检出目标,在与第三检出目标的检测类型对应的图像底库中,检索与第三检出目标对应的子图匹配的第三底库子图。In an exemplary embodiment, the retrieval instruction includes the identification of the detected target used for retrieval; the processor further implements the following steps when executing the computer program: the distribution area corresponding to each detected target or the subgraph corresponding to each detected target It is displayed to the user so that the user can select a detection target for image retrieval from each detection target; for the third detection target corresponding to the identification of the detection target used for image retrieval, the third detection target In the image base library corresponding to the detection type of, search for a third base library sub-image that matches the sub-image corresponding to the third detection target.
在一示例性实施例中,检索指令包含至少两个用于检索的检出目标的标识;处理器执行计算机程序时还实现以下步骤:对于与用于图像检索的检出目标的标识对应的第四检出目标,在与第四检出目标的检测类型对应的图像底库中,检索与第四检出目标对应的子图匹配的第四底库子图;若第三底库子图和第四底库子图关联了具有相同图像标识的第二关联全景图,则将第二关联全景图作为检索指令对应的目标图像,或者将第二关联全景图、第三底库子图和第四底库子图作为检索指令对应的目标图像。In an exemplary embodiment, the retrieval instruction includes at least two identifications of the detected targets used for retrieval; the processor further implements the following steps when executing the computer program: Four detection targets, in the image base corresponding to the detection type of the fourth detection target, search for the fourth base library sub-image that matches the sub-image corresponding to the fourth detection target; if the third base library sub-image and If the fourth base library sub-image is associated with the second associated panoramic image with the same image identifier, the second associated panoramic image is used as the target image corresponding to the retrieval instruction, or the second associated panoramic image, the third base library sub-image and the first The four-base library sub-image is used as the target image corresponding to the retrieval instruction.
在一示例性实施例中,处理器执行计算机程序时还实现以下步骤:在与检出目标的检 测类型对应的图像底库中,筛选符合用户输入的设定时间和/或设定地点的底库子图集合;在底库子图集合中,检索与检出目标对应的子图匹配的底库子图。In an exemplary embodiment, when the processor executes the computer program, the following steps are further implemented: in the image database corresponding to the detection type of the detected target, filter the image database corresponding to the set time and/or set location input by the user. Library subgraph collection; in the base library subgraph collection, search the base library subgraph matching the subgraph corresponding to the detected target.
在一示例性实施例中,处理器执行计算机程序时还实现以下步骤:获取用户输入的预设时间以及预设时长;将包含预设时间的时间段作为设定时间,设定时间的时长为预设时长;或;获取用户输入的起始时间和终止时间;将起始时间与终止时间之间的时间段作为设定时间;或;获取用户输入的起始日期和终止日期、每日的起始时间和每日的终止时间,将起始日期和终止日期之间的每个日期中,每日的起始时间和每日的终止时间之间的时间段作为设定时间。In an exemplary embodiment, the processor further implements the following steps when executing the computer program: obtaining the preset time and the preset duration input by the user; taking the time period including the preset time as the set time, and the duration of the set time is Preset duration; or; obtain the start time and end time entered by the user; use the time period between the start time and the end time as the set time; or; obtain the start date and end date entered by the user, and the daily For the start time and the end time of each day, the time period between the start time of the day and the end time of each day in each date between the start date and the end date is used as the set time.
在一示例性实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
接收用户的检索指令;Receiving user's retrieval instructions;
获取待检索图像;待检索图像包含多个不同检测类型的目标;Obtain the image to be retrieved; the image to be retrieved contains multiple targets of different detection types;
通过目标检测算法对待检索图像进行目标检测,得到各检出目标对应的检测类型以及各检出目标对应的分布区域;分布区域为检出目标在待检测图像中所处的区域;Target detection is performed on the image to be retrieved through the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the area where the detected target is located in the image to be detected;
根据各检出目标对应的分布区域在待检索图像中进行抠图,得到各检出目标对应的子图;Cut out the image in the image to be retrieved according to the distribution area corresponding to each detected target, and obtain the sub-image corresponding to each detected target;
对于各检测类型的检出目标,在与检出目标的检测类型对应的图像底库中,检索与检出目标对应的子图匹配的底库子图;图像底库中存储有底库子图,底库子图包含与检出目标的检测类型相同的目标;For the detected targets of each detection type, in the image base corresponding to the detection type of the detected target, retrieve the base library sub-images that match the sub-images corresponding to the detected targets; the base library sub-images are stored in the image base library , The base library sub-image contains the same target as the detection type of the detected target;
根据与各检出目标对应的子图匹配的底库子图,得到检索指令对应的目标图像。According to the base library sub-images matching the sub-images corresponding to each detected target, the target image corresponding to the retrieval instruction is obtained.
上述计算机可读存储介质中,可一次性实现对待检索图像中多个不同检测类型的目标进行目标检测,从而得到各检出目标对应的检测类型以及各检出目标对应的分布区域,进而对于各检测类型的检出目标,分别在与检出目标的检测类型对应的图像底库中检索出目标图像。本申请实施例无需用户人为地截取待检索图像中各个目标的子图并将各个目标子图输入检索系统,用户只需上传一次图像即可一次性完成对所有检测类型的检出目标的检索,从而有效降低了用户操作复杂度,提高了检索效率。In the above-mentioned computer-readable storage medium, target detection can be performed on multiple targets of different detection types in the image to be retrieved at one time, so as to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target. For the detection targets of the detection type, the target images are retrieved in the image base corresponding to the detection type of the detection target. In the embodiment of the application, the user does not need to manually intercept the sub-images of each target in the image to be retrieved and input each target sub-image into the retrieval system. The user only needs to upload the image once to complete the retrieval of all detected targets of detection types at one time. Thus, the complexity of user operations is effectively reduced, and retrieval efficiency is improved.
在一示例性实施例中,用户的检索指令为关联检索指令,关联检索指令包含第一检测类型和第二检测类型;与第一检测类型的检出目标对应的子图匹配的底库子图为第一底库子图,与第二检测类型的检出目标对应的子图匹配的底库子图为第二底库子图,图像底库中关联存储有底库子图以及底库子图所对应全景图的图像标识;计算机程序被处理器执行 时还实现以下步骤:若第一底库子图和第二底库子图关联了具有相同图像标识的第一关联全景图,则将第一关联全景图作为检索指令对应的目标图像,或者将第一关联全景图、第一底库子图和第二底库子图作为检索指令对应的目标图像。In an exemplary embodiment, the user's search instruction is an associated search instruction, and the associated search instruction includes a first detection type and a second detection type; a base library sub-image that matches a sub-image corresponding to a detection target of the first detection type It is the first base library sub-image, and the base library sub-image that matches the sub-image corresponding to the detection target of the second detection type is the second base library sub-image. The image base library is associated with the base library sub-image and the base library sub-image. The image identifier of the panoramic image corresponding to the image; the computer program is executed by the processor to implement the following steps: if the first base library sub-image and the second base library sub-image are associated with the first associated panoramic image with the same image identifier, then The first associated panoramic image is used as the target image corresponding to the retrieval instruction, or the first associated panoramic image, the first base library sub-image, and the second base library sub-image are used as the target image corresponding to the retrieval instruction.
在一示例性实施例中,计算机程序被处理器执行时还实现以下步骤:将各检出目标对应的检测类型展示给用户,以使用户从各检出目标对应的检测类型中选取第一检测类型和第二检测类型。In an exemplary embodiment, when the computer program is executed by the processor, the following steps are further implemented: the detection type corresponding to each detected target is displayed to the user, so that the user selects the first detection from the detection type corresponding to each detected target. Type and second detection type.
在一示例性实施例中,计算机程序被处理器执行时还实现以下步骤:根据第一检测类型的检出目标对应的子图与第一底库子图的第一相似度,和第二检测类型的检出目标对应的子图与第二底库子图的第二相似度,得到检索指令对应的各目标图像的相似度。In an exemplary embodiment, when the computer program is executed by the processor, the following steps are further implemented: according to the first similarity between the subgraph corresponding to the detected target of the first detection type and the first base library subgraph, and the second detection The second similarity between the sub-image corresponding to the detected target of the type and the second base library sub-image is obtained to obtain the similarity of each target image corresponding to the retrieval instruction.
在一示例性实施例中,检索指令包含用于检索的检出目标的标识;计算机程序被处理器执行时还实现以下步骤:将各检出目标对应的分布区域或各检出目标对应的子图展示给用户,以使用户从各检出目标中选取用于图像检索的检出目标;对于与用于图像检索的检出目标的标识对应的第三检出目标,在与第三检出目标的检测类型对应的图像底库中,检索与第三检出目标对应的子图匹配的第三底库子图。In an exemplary embodiment, the retrieval instruction includes the identification of the detected target used for retrieval; when the computer program is executed by the processor, the following steps are also implemented: the distribution area corresponding to each detected target or the child corresponding to each detected target The picture is shown to the user, so that the user can select the detection target for image retrieval from each detection target; for the third detection target corresponding to the identification of the detection target used for image retrieval, the third detection target In the image base library corresponding to the detection type of the target, a third base library sub-image that matches the sub-image corresponding to the third detected target is retrieved.
在一示例性实施例中,检索指令包含至少两个用于检索的检出目标的标识;计算机程序被处理器执行时还实现以下步骤:对于与用于图像检索的检出目标的标识对应的第四检出目标,在与第四检出目标的检测类型对应的图像底库中,检索与第四检出目标对应的子图匹配的第四底库子图;若第三底库子图和第四底库子图关联了具有相同图像标识的第二关联全景图,则将第二关联全景图作为检索指令对应的目标图像,或者将第二关联全景图、第三底库子图和第四底库子图作为检索指令对应的目标图像。In an exemplary embodiment, the retrieval instruction includes at least two identifications of the detected targets used for retrieval; when the computer program is executed by the processor, the following steps are also implemented: The fourth detection target, in the image base corresponding to the detection type of the fourth detection target, search for the fourth base library sub-image that matches the sub-image corresponding to the fourth detection target; if the third base library sub-image If the second associated panoramic image with the same image identifier is associated with the fourth base library sub-image, the second associated panoramic image is used as the target image corresponding to the retrieval instruction, or the second associated panoramic image, the third base library sub-image and The fourth base library sub-image is used as the target image corresponding to the retrieval instruction.
在一示例性实施例中,计算机程序被处理器执行时还实现以下步骤:在与检出目标的检测类型对应的图像底库中,筛选符合用户输入的设定时间和/或设定地点的底库子图集合;在底库子图集合中,检索与检出目标对应的子图匹配的底库子图。In an exemplary embodiment, when the computer program is executed by the processor, the following steps are further implemented: in the image base corresponding to the detection type of the detected target, filter those that meet the set time and/or set location input by the user. Base library subgraph collection; in the base library subgraph collection, search for base library subgraphs that match the subgraph corresponding to the detected target.
在一示例性实施例中,计算机程序被处理器执行时还实现以下步骤:获取用户输入的预设时间以及预设时长;将包含预设时间的时间段作为设定时间,设定时间的时长为预设时长;或;获取用户输入的起始时间和终止时间;将起始时间与终止时间之间的时间段作为设定时间;或;获取用户输入的起始日期和终止日期、每日的起始时间和每日的终止时间,将起始日期和终止日期之间的每个日期中,每日的起始时间和每日的终止时间之间的时间段作为设定时间。In an exemplary embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining the preset time and the preset duration input by the user; using the time period including the preset time as the set time, and the duration of the set time Is the preset duration; or; obtains the start time and end time entered by the user; takes the time period between the start time and the end time as the set time; or; obtains the start date and end date entered by the user, and every day The start time and the end time of each day, the time period between the start time of the day and the end time of each day in each date between the start date and the end date is used as the set time.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过 计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (11)

  1. 一种图像检索方法,其特征在于,所述方法包括:An image retrieval method, characterized in that the method includes:
    接收用户的检索指令;Receiving user's retrieval instructions;
    获取待检索图像;所述待检索图像包含多个不同检测类型的目标;Acquiring an image to be retrieved; the image to be retrieved includes multiple targets of different detection types;
    通过目标检测算法对所述待检索图像进行目标检测,得到各检出目标对应的检测类型以及所述各检出目标对应的分布区域;所述分布区域为所述检出目标在所述待检测图像中所处的区域;Target detection is performed on the image to be retrieved by the target detection algorithm, and the detection type corresponding to each detected target and the distribution area corresponding to each detected target are obtained; the distribution area is the detected target in the to-be-detected The area in the image;
    根据所述各检出目标对应的分布区域在所述待检索图像中进行抠图,得到所述各检出目标对应的子图;Matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target;
    对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图;所述图像底库中存储有底库子图,所述底库子图包含与所述检出目标的检测类型相同的目标;For the detected targets of each detection type, in the image base database corresponding to the detection type of the detected target, search the base library sub-images that match the sub-images corresponding to the detected targets; in the image base library Storing a base library sub-picture, the base library sub-picture contains the same target as the detection type of the detected target;
    根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像。The target image corresponding to the retrieval instruction is obtained according to the base library sub-image that matches the sub-image corresponding to each detected target.
  2. 根据权利要求1所述的方法,其特征在于,所述用户的检索指令为关联检索指令,所述关联检索指令包含第一检测类型和第二检测类型;与所述第一检测类型的检出目标对应的子图匹配的底库子图为第一底库子图,与所述第二检测类型的检出目标对应的子图匹配的底库子图为第二底库子图,所述图像底库中关联存储有所述底库子图以及所述底库子图所对应全景图的图像标识;The method according to claim 1, wherein the user's search instruction is an associated search instruction, and the associated search instruction includes a first detection type and a second detection type; and the detection of the first detection type The base library subgraph matched by the subgraph corresponding to the target is the first base library subgraph, and the base library subgraph matched with the subgraph corresponding to the detected target of the second detection type is the second base library subgraph. The image base library is associated and stored with the base library sub-image and the image identifier of the panorama corresponding to the base library sub-image;
    所述根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像,包括:The obtaining the target image corresponding to the retrieval instruction according to the base library sub-image matching the sub-image corresponding to each detected target includes:
    若所述第一底库子图和所述第二底库子图关联了具有相同图像标识的第一关联全景图,则将所述第一关联全景图作为所述检索指令对应的目标图像,或者将所述第一关联全景图、所述第一底库子图和所述第二底库子图作为所述检索指令对应的目标图像。If the first base library sub-image and the second base library sub-image are associated with a first associated panoramic image with the same image identifier, then the first associated panoramic image is used as the target image corresponding to the retrieval instruction, Or use the first associated panoramic image, the first base library sub-image, and the second base library sub-image as the target image corresponding to the retrieval instruction.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    将所述各检出目标对应的检测类型展示给所述用户,以使所述用户从所述各检出目标对应的检测类型中选取所述第一检测类型和所述第二检测类型。The detection type corresponding to each detected target is displayed to the user, so that the user selects the first detection type and the second detection type from the detection types corresponding to each detected target.
  4. 根据权利要求2或3所述的方法,其特征在于,所述方法还包括:The method according to claim 2 or 3, wherein the method further comprises:
    根据所述第一检测类型的检出目标对应的子图与所述第一底库子图的第一相似度,和所述第二检测类型的检出目标对应的子图与所述第二底库子图的第二相似度,得到所述检 索指令对应的各目标图像的相似度。According to the first similarity between the sub-image corresponding to the detected target of the first detection type and the first base library sub-image, the sub-image corresponding to the detected target of the second detection type is compared with the second The second degree of similarity of the base library sub-images obtains the degree of similarity of each target image corresponding to the retrieval instruction.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述检索指令包含用于检索的检出目标的标识;所述方法还包括:The method according to any one of claims 1 to 4, wherein the retrieval instruction includes an identification of a detected target used for retrieval; the method further comprises:
    将所述各检出目标对应的分布区域或所述各检出目标对应的子图展示给所述用户,以使所述用户从所述各检出目标中选取用于图像检索的检出目标;Display the distribution area corresponding to each detected target or the sub-image corresponding to each detected target to the user, so that the user selects the detected target for image retrieval from the detected targets ;
    所述对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图,包括:For the detection targets of each detection type, in the image base library corresponding to the detection type of the detection target, searching the base library sub-images that match the sub-images corresponding to the detected targets includes:
    对于与所述用于图像检索的检出目标的标识对应的第三检出目标,在与所述第三检出目标的检测类型对应的图像底库中,检索与所述第三检出目标对应的子图匹配的第三底库子图。For the third detection target corresponding to the identification of the detection target used for image retrieval, search for the third detection target in the image base corresponding to the detection type of the third detection target The third base library sub-image matched by the corresponding sub-image.
  6. 根据权利要求5所述的方法,其特征在于,所述检索指令包含至少两个用于检索的检出目标的标识;所述对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图,还包括:The method according to claim 5, wherein the retrieval instruction includes at least two identifications of the detected targets used for retrieval; In the image base library corresponding to the detection type, retrieving the base library sub-image that matches the sub-image corresponding to the detected target, further includes:
    对于与所述用于图像检索的检出目标的标识对应的第四检出目标,在与所述第四检出目标的检测类型对应的图像底库中,检索与所述第四检出目标对应的子图匹配的第四底库子图;For the fourth detection target corresponding to the identification of the detection target used for image retrieval, search for the fourth detection target in the image base corresponding to the detection type of the fourth detection target The fourth base library subgraph matched by the corresponding subgraph;
    所述根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像,包括:The obtaining the target image corresponding to the retrieval instruction according to the base library sub-image matching the sub-image corresponding to each detected target includes:
    若所述第三底库子图和所述第四底库子图关联了具有相同图像标识的第二关联全景图,则将所述第二关联全景图作为所述检索指令对应的目标图像,或者将所述第二关联全景图、所述第三底库子图和所述第四底库子图作为所述检索指令对应的目标图像。If the third base library sub-image and the fourth base library sub-image are associated with a second associated panorama with the same image identifier, then the second associated panorama is used as the target image corresponding to the retrieval instruction, Or use the second associated panoramic image, the third base library sub-image, and the fourth base library sub-image as the target image corresponding to the retrieval instruction.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图,包括:The method according to any one of claims 1 to 6, characterized in that, in the image base corresponding to the detection type of the detected target, search for the sub-images corresponding to the detected target The base library submap, including:
    在与所述检出目标的检测类型对应的图像底库中,筛选符合所述用户输入的设定时间和/或设定地点的底库子图集合;In the image base library corresponding to the detection type of the detected target, filter the base library sub-image set that meets the set time and/or set location input by the user;
    在所述底库子图集合中,检索与所述检出目标对应的子图匹配的底库子图。In the set of base library subgraphs, search base library subgraphs matching the subgraph corresponding to the detected target.
  8. 根据权利要求7所述的方法,其特征在于,在所述筛选符合所述用户输入的设定时间和/或设定地点的底库子图集合之前,所述方法还包括:The method according to claim 7, characterized in that, before the screening of the set of base library sub-images that meet the set time and/or set location input by the user, the method further comprises:
    获取所述用户输入的预设时间以及预设时长;Acquiring the preset time and the preset duration input by the user;
    将包含所述预设时间的时间段作为所述设定时间,所述设定时间的时长为所述预设时 长;Use a time period including the preset time as the set time, and the duration of the set time is the preset time;
    或;or;
    获取所述用户输入的起始时间和终止时间;Acquiring the start time and end time input by the user;
    将所述起始时间与所述终止时间之间的时间段作为所述设定时间;Use the time period between the start time and the end time as the set time;
    或;or;
    获取所述用户输入的起始日期和终止日期、每日的起始时间和每日的终止时间,Acquire the start date and end date, daily start time and daily end time entered by the user,
    将所述起始日期和所述终止日期之间的每个日期中,所述每日的起始时间和所述每日的终止时间之间的时间段作为所述设定时间。In each date between the start date and the end date, a time period between the start time of the day and the end time of the day is taken as the set time.
  9. 一种图像检索装置,其特征在于,所述装置包括:An image retrieval device, characterized in that the device includes:
    指令接收模块,用于接收用户的检索指令;The instruction receiving module is used to receive the user's retrieval instruction;
    图像获取模块,用于获取待检索图像;所述待检索图像包含多个不同检测类型的目标;An image acquisition module for acquiring an image to be retrieved; the image to be retrieved contains multiple targets of different detection types;
    目标检测模块,用于通过目标检测算法对所述待检索图像进行目标检测,得到各检出目标对应的检测类型以及所述各检出目标对应的分布区域;所述分布区域为所述检出目标在所述待检测图像中所处的区域;The target detection module is used to perform target detection on the image to be retrieved through a target detection algorithm to obtain the detection type corresponding to each detected target and the distribution area corresponding to each detected target; the distribution area is the detected target The area where the target is located in the image to be detected;
    抠图模块,用于根据所述各检出目标对应的分布区域在所述待检索图像中进行抠图,得到所述各检出目标对应的子图;A matting module for matting in the image to be retrieved according to the distribution area corresponding to each detected target to obtain a sub-image corresponding to each detected target;
    图像检索模块,用于对于各检测类型的检出目标,在与所述检出目标的检测类型对应的图像底库中,检索与所述检出目标对应的子图匹配的底库子图;所述图像底库中存储有底库子图,所述底库子图包含与所述检出目标的检测类型相同的目标;The image retrieval module is used to retrieve, in the image base database corresponding to the detection type of the detected target, the base library sub-image that matches the sub-image corresponding to the detected target for the detected targets of each detection type; The image base library stores base library sub-images, and the base library sub-images include targets of the same detection type as the detected targets;
    图像确定模块,用于根据与各检出目标对应的子图匹配的底库子图,得到所述检索指令对应的目标图像。The image determination module is used to obtain the target image corresponding to the retrieval instruction according to the base library sub-image matched with the sub-image corresponding to each detected target.
  10. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至8中任一项所述的方法的步骤。A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 8 when the computer program is executed by the processor.
  11. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述的方法的步骤。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 8 when the computer program is executed by a processor.
PCT/CN2020/119714 2020-03-31 2020-09-30 Image retrieval method and apparatus, computer device, and storage medium WO2021196551A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010244132.4 2020-03-31
CN202010244132.4A CN111522969A (en) 2020-03-31 2020-03-31 Image retrieval method, image retrieval device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021196551A1 true WO2021196551A1 (en) 2021-10-07

Family

ID=71902479

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/119714 WO2021196551A1 (en) 2020-03-31 2020-09-30 Image retrieval method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN111522969A (en)
WO (1) WO2021196551A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522969A (en) * 2020-03-31 2020-08-11 北京旷视科技有限公司 Image retrieval method, image retrieval device, computer equipment and storage medium
CN114296965A (en) * 2021-12-29 2022-04-08 北京市商汤科技开发有限公司 Feature retrieval method, feature retrieval device, electronic equipment and computer storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678661A (en) * 2013-12-24 2014-03-26 中国联合网络通信集团有限公司 Image searching method and terminal
CN106777083A (en) * 2016-12-13 2017-05-31 四川研宝科技有限公司 The method and device of object in a kind of mark picture
CN106815272A (en) * 2015-12-02 2017-06-09 杭州海康威视数字技术股份有限公司 A kind of image search method, apparatus and system
CN108197265A (en) * 2017-12-29 2018-06-22 深圳市视维科技股份有限公司 A kind of method and system based on short video search complete video
CN109241349A (en) * 2018-08-14 2019-01-18 中国电子科技集团公司第三十八研究所 A kind of monitor video multiple target classification retrieving method and system based on deep learning
CN109544496A (en) * 2018-11-19 2019-03-29 南京旷云科技有限公司 Generation method, the training method and device of object detection model of training data
CN111522969A (en) * 2020-03-31 2020-08-11 北京旷视科技有限公司 Image retrieval method, image retrieval device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678661A (en) * 2013-12-24 2014-03-26 中国联合网络通信集团有限公司 Image searching method and terminal
CN106815272A (en) * 2015-12-02 2017-06-09 杭州海康威视数字技术股份有限公司 A kind of image search method, apparatus and system
CN106777083A (en) * 2016-12-13 2017-05-31 四川研宝科技有限公司 The method and device of object in a kind of mark picture
CN108197265A (en) * 2017-12-29 2018-06-22 深圳市视维科技股份有限公司 A kind of method and system based on short video search complete video
CN109241349A (en) * 2018-08-14 2019-01-18 中国电子科技集团公司第三十八研究所 A kind of monitor video multiple target classification retrieving method and system based on deep learning
CN109544496A (en) * 2018-11-19 2019-03-29 南京旷云科技有限公司 Generation method, the training method and device of object detection model of training data
CN111522969A (en) * 2020-03-31 2020-08-11 北京旷视科技有限公司 Image retrieval method, image retrieval device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111522969A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN105243060B (en) A kind of method and device of retrieving image
US8270684B2 (en) Automatic media sharing via shutter click
US9323785B2 (en) Method and system for mobile visual search using metadata and segmentation
US20170351934A1 (en) Object recognition device, object recognition method, and program
JP5358083B2 (en) Person image search device and image search device
WO2018032721A1 (en) Image sharing method based on thumbnail image and terminal
JP5524219B2 (en) Interactive image selection method
US9773023B2 (en) Image selection using automatically generated semantic metadata
US20170352162A1 (en) Region-of-interest extraction device and region-of-interest extraction method
KR100956159B1 (en) Apparatus and auto tagging method for life-log
CN111444366B (en) Image classification method, device, storage medium and electronic equipment
CN111046235A (en) Method, system, equipment and medium for searching acoustic image archive based on face recognition
CN111581423B (en) Target retrieval method and device
WO2021196551A1 (en) Image retrieval method and apparatus, computer device, and storage medium
US9665773B2 (en) Searching for events by attendants
JP2017182628A (en) Augmented reality user interface application device and control method
CN108702551B (en) Method and apparatus for providing summary information of video
CN111753766B (en) Image processing method, device, equipment and medium
JP2019159537A (en) Image search apparatus, image search method, electronic device and its control method
CN114416905A (en) Article searching method, label generating method and device
JP5356289B2 (en) Image search system
US9621505B1 (en) Providing images with notifications
JP6132996B1 (en) Image processing apparatus, image processing method, and image processing program
CN111104915B (en) Method, device, equipment and medium for peer analysis
CN104850600B (en) A kind of method and apparatus for searching for the picture comprising face

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: 20928971

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: 20928971

Country of ref document: EP

Kind code of ref document: A1