Image processing method and electronic device

By using pre-trained landmark recognition model to identify landmark identification and directly determine the geographical location, combined with the inverse geocoding interface to obtain the unidentified image location, the problem of frequent access to the inverse geocoding interface in the prior art is solved, and the image is improved Classification efficiency.

CN112560890BActive Publication Date: 2024-11-26LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011230965.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-06
Publication Date
2024-11-26
Estimated Expiration
2040-11-06

AI Technical Summary

Technical Problem

In the prior art, when automatically classifying the shooting position based on the image, frequent access to the third party's inverse geocoding interface is required, resulting in large access volume and low efficiency, especially when there are many images in the gallery.

Method used

By inputting the image into the pre-trained landmark recognition model, identifying the landmark identifier, directly determining the geographical location, and inputting the image latitude and longitude information that failed to recognize the landmark identifier into the inverse geocoding interface to obtain the geographical location and reduce the access to the inverse geocoding interface frequency.

Benefits of technology

It effectively reduces the number of accesses to the inverse geocoding interface, improves image classification and sorting efficiency, and reduces system load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112560890B_ABST
    Figure CN112560890B_ABST
Patent Text Reader

Abstract

The present application provides an image processing method and an electronic device, the method comprising: inputting images in a target set into a pre-trained landmark recognition model respectively to obtain a first image set capable of identifying landmark identifiers; determining a first geographical location of a first image in the first image set based on the landmark identifier; classifying the first image in the first image set based on the first geographical location; obtaining a second image set whose landmark identifiers cannot be identified by the landmark recognition model; inputting the latitude and longitude information of a second image in the second image set into a reverse geocoding interface to obtain a second geographical location of the second image; determining a corresponding relationship between the second geographical location and the second image set; and reducing the number of visits to the reverse geocoding interface on the basis of sorting the images of the target set through the present application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and more particularly to an image processing method and electronic equipment. Background Art

[0002] Most existing smart devices have the function of automatically classifying images. In one way, images can be automatically classified based on the shooting location of the image. In order to realize this function, it is necessary to access the reverse geocoding interface of a third party. Among them, reverse geocoding refers to accessing the reverse geocoding interface of a third party through the latitude and longitude information of the image itself, so as to obtain the specific shooting location of the image.

[0003] In the prior art, the latitude and longitude information of each image in the gallery is used to access the third-party reverse geocoding interface to obtain the specific shooting location of the image, so as to automatically classify the image. Since the specific shooting location obtained based on the latitude and longitude information is very accurate, there will be many categories of images, and when there are many images in the gallery, the number of visits will be too large, thereby reducing the efficiency of automatic sorting. Summary of the invention

[0004] In view of this, the present invention provides an image processing method and an electronic device to solve the above technical problems.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] An image processing method, comprising:

[0007] Input the images in the target set into the pre-trained landmark recognition model respectively to obtain a first image set capable of recognizing landmark identifications;

[0008] determining a first geographic location of a first image in the first image set based on the landmark identifier;

[0009] classifying a first image in the first image set based on the first geographic location;

[0010] Acquire a second set of images in which landmarks cannot be identified by the landmark recognition model;

[0011] Inputting the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image;

[0012] A correspondence between the second geographical location and the second image set is determined.

[0013] Optionally, also include:

[0014] Get the shooting attribute information of each image in the gallery;

[0015] The images in the gallery are classified based on the shooting attribute information and divided into different image sets; wherein the target set belongs to the image set.

[0016] Optionally, inputting the latitude and longitude information of the second image in the second image set into a reverse geocoding interface to obtain the second geographic location of the second image includes:

[0017] Determine a target second image from the second image set, input the latitude and longitude information of the target second image into a reverse geocoding interface, and obtain a second geographic location of the target second image;

[0018] The determining the correspondence between the second geographical location and the second image set includes:

[0019] A correspondence between the second geographical location and the second image set is established.

[0020] Optionally, the target set corresponds to a gallery; the method further includes:

[0021] Acquire shooting attribute information of each second image in the second image set;

[0022] classifying the second image set based on the shooting attribute information;

[0023] Correspondingly, the step of inputting the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image includes:

[0024] Determine the target second image in the classified image set respectively, input the latitude and longitude information of the target second image into the reverse geocoding interface, and obtain the second geographical location of the target second image;

[0025] The determining the correspondence between the second geographical location and the second image set includes:

[0026] A corresponding relationship between the second geographical location and the classified image set is established respectively.

[0027] Optionally, the pre-trained landmark recognition model is a model capable of outputting landmark identifications that is obtained by deep learning a large number of images containing landmarks.

[0028] An electronic device, comprising:

[0029] Memory, used to store programs;

[0030] A processor runs the program to input the images in the target set into a pre-trained landmark recognition model, respectively, to obtain a first image set capable of identifying landmark identifiers; determine a first geographic location of a first image in the first image set based on the landmark identifier; classify the first image in the first image set based on the first geographic location; obtain a second image set for which the landmark identifiers cannot be identified by the landmark recognition model; input the latitude and longitude information of a second image in the second image set into a reverse geocoding interface to obtain a second geographic location of the second image; and determine a corresponding relationship between the second geographic location and the second image set.

[0031] Optionally, the processor is further configured to obtain shooting attribute information of each image in a gallery; classify the images in the gallery into different image sets based on the shooting attribute information; wherein the target set belongs to the image set.

[0032] Optionally, the processor inputs the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image, including: determining a target second image from the second image set, inputting the latitude and longitude information of the target second image into the reverse geocoding interface, and obtaining the second geographic location of the target second image;

[0033] The processor determines the correspondence between the second geographical location and the second image set, including: establishing the correspondence between the second geographical location and the second image set.

[0034] Optionally, the target set corresponds to a gallery; the processor is further configured to obtain shooting attribute information of each second image in the second image set; and classify the second image set based on the shooting attribute information;

[0035] Correspondingly, the processor inputs the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image, including: determining the target second image in the classified image set respectively, inputting the latitude and longitude information of the target second image into the reverse geocoding interface, and obtaining the second geographic location of the target second image;

[0036] The processor determines the correspondence between the second geographical location and the second image set, including: establishing the correspondence between the second geographical location and the classified image set respectively.

[0037] Optionally, the pre-trained landmark recognition model is a model capable of outputting landmark identifications that is obtained by deep learning a large number of images containing landmarks.

[0038] It can be seen from the above technical solution that the present application provides an image processing method, by respectively inputting the images in the target combination into the pre-trained landmark recognition model to obtain a first image set that can identify the landmark identification and a second image set that cannot identify the landmark identification. For the first image set that can identify the landmark identification, the first geographical location is determined based on the landmark identification. For the second image set that cannot identify the landmark identification, the longitude and latitude information of the second image in the second image set is input into the reverse geocoding interface to obtain the second geographical location of the second image, thereby determining the correspondence between the second geographical location and the second image set, and then classifying the first image in the first image set based on the first geographical location. It can be seen that in the present application, the images in the first image set that can identify the landmark identification through the landmark recognition model no longer need to determine the position by accessing the reverse geocoding interface, and can directly determine the geographical location based on the landmark identification, thereby reducing the number of visits to the reverse geocoding interface. For the images in the second image set that cannot identify the landmark identification through the landmark recognition module, the reverse geocoding interface can still be used to determine the geographical location, thereby determining the correspondence between the geographical location and the second image set, thereby realizing the sorting of all images in the target set. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 A flowchart of an image processing method provided in Embodiment 1 of the present application;

[0041] Figure 2 A flowchart of an image processing method provided in Embodiment 2 of the present application;

[0042] Figure 3 A flowchart of an image processing method provided in Embodiment 3 of the present application;

[0043] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 1 of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] The first embodiment of the present invention provides an image processing method, such as Figure 1 As shown, the method comprises the following steps:

[0046] Step 101: input the images in the target set into the pre-trained landmark recognition model to obtain a first image set capable of recognizing landmark identifications;

[0047] The target set in the present application may correspond to a gallery of images that have not been classified in an electronic device, or may correspond to a set of classified images.

[0048] Regarding the method in which the target set corresponds to the classified image set, the present application may further include, before step 101, obtaining shooting attribute information of each image in the gallery, and classifying the images in the gallery into different image sets based on the shooting attribute information, wherein the target set belongs to the image set.

[0049] In this implementation, the images in the gallery are first classified based on the shooting attribute information of the images. Specifically, the shooting attribute information of the images is information generated during the image acquisition process, such as the shooting attribute information of the images may at least include one or more of shooting time information and shooting longitude and latitude information. The attribute value range that can belong to the same set can be pre-set, and the images whose shooting attribute information belongs to the same attribute value range are classified into the same image set. For example, images whose shooting time is within 5 minutes apart are classified into the same image set.

[0050] It should be noted that at least the method of classifying images based on the shooting latitude and longitude information is different from the method of classifying images based on the geographic location used in the prior art. The shooting latitude and longitude information is an inherent attribute of the image, while the geographic location needs to be obtained by accessing the reverse geocoding interface based on the shooting latitude and longitude information. There is a significant difference between the two.

[0051] Among them, the pre-trained landmark recognition model is a model that can output landmark logos obtained by deep learning a large number of images containing landmarks.

[0052] Step 102: determining a first geographical location of a first image in the first image set based on the landmark identifier;

[0053] The images in the first image set are called first images. After the landmark identifier of the first image is determined, the first geographic location of the first image can be determined directly based on the landmark identifier without accessing the reverse geocoding interface to determine the first geographic location of the first image.

[0054] For example, if the landmark identification of a first image in the first image set is a zoo, the first geographic location of the first image can be determined directly based on the zoo without accessing a reverse geocoding interface through the latitude and longitude information of the first image to determine the first geographic location of the first image.

[0055] Step 103: classifying the first image in the first image set based on the first geographical location;

[0056] After the first geographic location of the first image in the first image set is determined, the first geographic location can be directly used to classify the first images in the first image set, so that the first images belonging to the same geographic location are classified into one category, and the first images belonging to different geographic locations are classified into different categories, thereby achieving classification and organization of the first images in the first image set.

[0057] Step 104: Acquire a second image set in which landmarks cannot be identified by the landmark recognition model;

[0058] The landmark recognition model can be used to divide the images in the target set into at least one set. If the images in the target set can all recognize the landmark signs through the landmark recognition model, then these images all belong to the first image set; if the images in the target set cannot all recognize the landmark signs through the landmark recognition model, then these images all belong to the second image set; and if some of the images in the target set can recognize the landmark signs through the input landmark recognition model, while other images cannot recognize the landmark signs, then the target set is divided into the first image set and the second image set.

[0059] Step 105: inputting the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image;

[0060] In one way, the longitude and latitude information of all images in the second image set can be input into the reverse geocoding interface respectively, so as to obtain the second geographic location of each second image. In another way, the longitude and latitude information of some second images in the second image set can be input into the reverse geocoding interface to further reduce the number of accesses to the reverse geocoding interface. The specific implementation method will be described in detail later.

[0061] Step 106: Determine a correspondence between the second geographical location and the second image set.

[0062] It can be seen that in this embodiment, the images in the first image set that can identify the landmark identification through the landmark recognition model no longer need to determine the position by accessing the reverse geocoding interface, and the geographical location can be determined directly based on the landmark identification, thereby reducing the number of visits to the reverse geocoding interface. For the images in the second image set that cannot identify the landmark identification through the landmark recognition module, the reverse geocoding interface is still used to determine the geographical location, thereby determining the correspondence between the geographical location and the second image set, thereby realizing the organization of all images in the target set.

[0063] The second embodiment of the present invention provides an image processing method. In this embodiment, the target set is an image set obtained by classifying images in the image library. Figure 2 As shown, the method comprises the following steps:

[0064] Step 201: Obtaining shooting attribute information of each image in the gallery;

[0065] Step 202: Classifying the images in the gallery into different image sets based on the shooting attribute information;

[0066] Specifically, the image shooting attribute information is information generated during the image acquisition process, such as the image shooting attribute information may include at least one or more of shooting time information and shooting longitude and latitude information. The attribute value range that can belong to the same set can be preset, and images with shooting attribute information belonging to the same attribute value range are divided into the same image set. For example, images shot within 5 minutes apart are divided into the same image set.

[0067] Because images with similar shooting attribute information are generally collected at the same location. For example, if a user takes multiple images continuously at a certain location, the time interval between the shooting of these multiple images will be very short, and the longitude and latitude of the shooting will be roughly the same. Therefore, after the images are classified based on the shooting attribute information, images belonging to the same category are generally located at the same geographical location.

[0068] It should be noted that at least the method of classifying images based on the shooting latitude and longitude information is different from the method of classifying images based on the geographic location used in the prior art. The shooting latitude and longitude information is an inherent attribute of the image, while the geographic location needs to be obtained by accessing the reverse geocoding interface based on the shooting latitude and longitude information. There is a significant difference between the two.

[0069] The target set belongs to the image set.

[0070] Step 203: input the images in the target set into the pre-trained landmark recognition model respectively to obtain a first image set capable of recognizing landmark identifications;

[0071] Step 204: Determine a first geographical location of a first image in the first image set based on the landmark identifier;

[0072] Step 205: Classifying the first image in the first image set based on the first geographical location;

[0073] Step 206: Acquire a second set of images in which landmarks cannot be identified by the landmark recognition model;

[0074] Step 207: determining a target second image from the second image set, inputting the latitude and longitude information of the target second image into a reverse geocoding interface, and acquiring a second geographic location of the target second image;

[0075] The target second image may be any image in the second image set, that is, a target second image is randomly determined from the second image set. The target second image may also be an image that meets a preset condition, for example, the target second image is an image with the best shooting quality in the second image set.

[0076] Among them, step 207 is a specific implementation of the step of "inputting the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image".

[0077] Step 208: Establish a correspondence between the second geographical location and the second image set.

[0078] Since the second image set originates from the target set, and the target set is an image set obtained by classifying images in the gallery based on shooting attribute information, the second image set is actually already an image set classified based on the shooting attribute information. Therefore, it is only necessary to determine the geographic location of one of the images to establish a corresponding relationship between the second geographic location and the second image set.

[0079] Among them, step 208 is a specific implementation of the step of "determining the correspondence between the second geographical location and the second image set".

[0080] It can be seen that in this embodiment, the images in the first image set that can identify the landmark identifier through the landmark recognition model no longer need to determine the position by accessing the reverse geocoding interface, and the geographical location can be determined directly based on the landmark identifier, thereby reducing the number of accesses to the reverse geocoding interface. For the images in the second image set that cannot identify the landmark identifier through the landmark recognition module, the reverse geocoding interface is still used to determine the geographical location, thereby determining the corresponding relationship between the geographical location and the second image set, thereby realizing the sorting of all images in the target set;

[0081] Furthermore, in the present application, the images in the gallery are first classified based on the shooting attribute information to obtain a classified image set, and the target set belongs to the classified image set. Therefore, for the second image set belonging to the target set, it is only necessary to use the longitude and latitude information of one target second image to access the reverse geocoding interface set, so as to establish a correspondence between the geographic location of the target second image and the second image set, without having to access the reverse geocoding interface for the longitude and latitude information of all second images in the second image set, thereby further reducing the number of visits to the reverse geocoding interface.

[0082] The third embodiment of the present invention provides an image processing method. In this embodiment, the target set belongs to a gallery. The images in the gallery are not classified. Figure 3 As shown, the method comprises the following steps:

[0083] Step 301: input the images in the target set into the pre-trained landmark recognition model respectively to obtain a first image set capable of recognizing landmark identifications;

[0084] Step 302: Determine a first geographical location of a first image in the first image set based on the landmark identifier;

[0085] Step 303: classifying the first image in the first image set based on the first geographical location;

[0086] Step 304: Acquire a second set of images in which no landmark identification is recognized by the landmark recognition model;

[0087] Step 305: Acquire shooting attribute information of each second image in the second image set;

[0088] Step 306: classifying the second image set based on the shooting attribute information;

[0089] Specifically, the image shooting attribute information is information generated during the image acquisition process, such as the image shooting attribute information may include at least one or more of shooting time information and shooting longitude and latitude information. The attribute value range that can belong to the same set can be preset, and images with shooting attribute information belonging to the same attribute value range are divided into the same image set. For example, images shot within 5 minutes apart are divided into the same image set.

[0090] Because images with similar shooting attribute information are generally collected at the same location. For example, if a user takes multiple images continuously at a certain location, the time interval between the shooting of these multiple images will be very short, and the longitude and latitude of the shooting will be roughly the same. Therefore, after the images are classified based on the shooting attribute information, images belonging to the same category are generally located at the same geographical location.

[0091] It should be noted that at least the method of classifying images based on the shooting latitude and longitude information is different from the method of classifying images based on the geographic location used in the prior art. The shooting latitude and longitude information is an inherent attribute of the image, while the geographic location needs to be obtained by accessing the reverse geocoding interface based on the shooting latitude and longitude information. There is a significant difference between the two.

[0092] Step 307: Determine the target second image in the classified image set respectively, input the latitude and longitude information of the target second image into the reverse geocoding interface, and obtain the second geographic location of the target second image;

[0093] After the second image set is classified, a target second image is determined from each of the classified image sets. The target second image may be any image in the classified image set, that is, a target second image is randomly determined from the classified image set. The target second image may also be an image that meets a preset condition, for example, the target second image is an image with the best shooting quality in the classified image set.

[0094] Among them, step 307 is a specific implementation of the step of "inputting the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image".

[0095] Step 308: Establish corresponding relationships between the second geographical locations and the classified image sets respectively.

[0096] What is established is the corresponding relationship between the second geographical location and the image set to which the target second image of the second geographical location belongs. That is, each classified image set can establish a relationship with the second geographical location of the target second image therein, so that the user can easily determine the geographical location of each classified image set.

[0097] Among them, step 308 is a specific implementation of the step of "determining the correspondence between the second geographical location and the second image set".

[0098] It can be seen that in this embodiment, the images in the first image set that can identify the landmark identifier through the landmark recognition model no longer need to determine the location by accessing the reverse geocoding interface, and the geographical location can be determined directly based on the landmark identifier, thereby reducing the number of accesses to the reverse geocoding interface. For the images in the second image set that cannot identify the landmark identifier through the landmark recognition module, the reverse geocoding interface is still used to determine the geographical location, thereby determining the corresponding relationship between the geographical location and the second image set, thereby realizing the sorting of all images in the target set;

[0099] Furthermore, in the present application, the second image set is classified based on the shooting attribute information, the target second image is determined in the classified image set, the latitude and longitude information of the target second image is input into the reverse geocoding interface, the second geographical location of the target second image is obtained, and the corresponding relationship between the second geographical location and the classified image set is established respectively; then for the classified image set, it is only necessary to use the latitude and longitude information of one target second image to access the reverse geocoding interface set, so as to establish the corresponding relationship between the geographical location of the target second image and the corresponding image set, without having to access the reverse geocoding interface with the latitude and longitude information of all second images in the second image set, thereby further reducing the number of visits to the reverse geocoding interface.

[0100] Corresponding to the above-mentioned image processing method, the device embodiment of the present application also provides an electronic device.

[0101] Specifically, the first embodiment of the present application provides an electronic device, such as Figure 4 As shown, the electronic device includes: a memory 410 and a processor 420; wherein:

[0102] A memory 410, used for storing programs;

[0103] Processor 420 runs the program to input the images in the target set into the pre-trained landmark recognition model respectively to obtain a first image set that can identify the landmark identification; determine the first geographical location of the first image in the first image set based on the landmark identification; classify the first image in the first image set based on the first geographical location; obtain a second image set for which the landmark identification cannot be identified by the landmark recognition model; input the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographical location of the second image; and determine the correspondence between the second geographical location and the second image set.

[0104] The target set in the present application may correspond to a gallery of images that have not been classified in an electronic device, or may correspond to a set of classified images.

[0105] For the method in which the target set corresponds to the classified image set, optionally, the processor is further configured to obtain shooting attribute information of each image in the gallery, and classify the images in the gallery into different image sets based on the shooting attribute information, wherein the target set belongs to the image set.

[0106] In this implementation, the images in the gallery are first classified based on the shooting attribute information of the images. Specifically, the shooting attribute information of the images is information generated during the image acquisition process, such as the shooting attribute information of the images may at least include one or more of shooting time information and shooting longitude and latitude information. The attribute value range that can belong to the same set can be pre-set, and the images whose shooting attribute information belongs to the same attribute value range are classified into the same image set. For example, images whose shooting time is within 5 minutes apart are classified into the same image set.

[0107] It should be noted that at least the method of classifying images based on the shooting latitude and longitude information is different from the method of classifying images based on the geographic location used in the prior art. The shooting latitude and longitude information is an inherent attribute of the image, while the geographic location needs to be obtained by accessing the reverse geocoding interface based on the shooting latitude and longitude information. There is a significant difference between the two.

[0108] Among them, the pre-trained landmark recognition model is a model that can output landmark logos obtained by deep learning a large number of images containing landmarks.

[0109] It can be seen that in this embodiment, the images in the first image set that can identify the landmark identification through the landmark recognition model no longer need to determine the position by accessing the reverse geocoding interface, and the geographical location can be determined directly based on the landmark identification, thereby reducing the number of visits to the reverse geocoding interface. For the images in the second image set that cannot identify the landmark identification through the landmark recognition module, the reverse geocoding interface is still used to determine the geographical location, thereby determining the correspondence between the geographical location and the second image set, thereby realizing the organization of all images in the target set.

[0110] In the second embodiment of the device of the present application, the processor is also used to obtain shooting attribute information of each image in the gallery; classify the images in the gallery based on the shooting attribute information and divide them into different image sets; wherein the target set belongs to the image set.

[0111] Correspondingly, the processor inputs the longitude and latitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image, including: determining the target second image from the second image set, inputting the longitude and latitude information of the target second image into the reverse geocoding interface, and obtaining the second geographic location of the target second image.

[0112] Correspondingly, the processor determines the correspondence between the second geographical location and the second image set, including: establishing the correspondence between the second geographical location and the second image set.

[0113] The target second image may be any image in the second image set, that is, a target second image is randomly determined from the second image set. The target second image may also be an image that meets a preset condition, for example, the target second image is an image with the best shooting quality in the second image set.

[0114] Since the second image set originates from the target set, and the target set is an image set obtained by classifying images in the gallery based on shooting attribute information, the second image set is actually already an image set classified based on the shooting attribute information. Therefore, it is only necessary to determine the geographic location of one of the images to establish a corresponding relationship between the second geographic location and the second image set.

[0115] In this embodiment, the images in the gallery are first classified based on the shooting attribute information to obtain a classified image set, and the target set belongs to the classified image set. Therefore, for the second image set belonging to the target set, it is only necessary to use the longitude and latitude information of one target second image to access the reverse geocoding interface set, so as to establish a corresponding relationship between the geographic location of the target second image and the second image set, without accessing the reverse geocoding interface for the longitude and latitude information of all second images in the second image set, thereby further reducing the number of visits to the reverse geocoding interface.

[0116] In the third embodiment of the device of the present application, the target set corresponds to the image library; the processor is further configured to obtain shooting attribute information of each second image in the second image set; and classify the second image set based on the shooting attribute information;

[0117] Correspondingly, the processor inputs the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image, including: determining the target second image in the classified image set respectively, inputting the latitude and longitude information of the target second image into the reverse geocoding interface, and obtaining the second geographic location of the target second image;

[0118] Correspondingly, the processor determines the correspondence between the second geographical location and the second image set, including: establishing the correspondence between the second geographical location and the classified image set respectively.

[0119] After the second image set is classified, a target second image is determined from each classified image set, and the target second image may be any image in the classified image set, that is, a target second image is randomly determined from the classified image set. The target second image may also be an image that meets a preset condition, for example, the target second image is an image with the best shooting quality in the classified image set.

[0120] It can be seen that in this embodiment, the second image set is classified based on the shooting attribute information, the target second image is determined in the classified image set, the latitude and longitude information of the target second image is input into the reverse geocoding interface, the second geographical location of the target second image is obtained, and the corresponding relationship between the second geographical location and the classified image set is established respectively; then for the classified image set, it is only necessary to use the latitude and longitude information of one target second image to access the reverse geocoding interface set, so as to establish the corresponding relationship between the geographical location of the target second image and the corresponding image set, without having to access the reverse geocoding interface with the latitude and longitude information of all second images in the second image set, thereby further reducing the number of visits to the reverse geocoding interface.

[0121] The features described in the various embodiments of this specification can be replaced or combined with each other. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0122] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image processing method, comprising: Input the images in the target set into the pre-trained landmark recognition model respectively to obtain a first image set capable of recognizing landmark identifications; determining a first geographic location of a first image in the first image set based on the landmark identifier; classifying the first images in the first image set based on the first geographical location so as to classify the first images belonging to the same geographical location into one category; Acquire a second set of images in which landmarks cannot be identified by the landmark recognition model; Determine a target second image from the second image set, input the latitude and longitude information of the target second image into a reverse geocoding interface, and obtain a second geographic location of the target second image; The target second image is any image in the second image set, or is an image that meets a preset condition; A correspondence between the second geographical location and the second image set is determined, where the images in the second image set are images classified based on shooting attribute information of the images.

2. The method according to claim 1, further comprising: Get the shooting attribute information of each image in the gallery; The images in the gallery are classified based on the shooting attribute information and divided into different image sets; wherein the target set belongs to the image set.

3. The method according to claim 2, wherein inputting the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image comprises: Determine a target second image from the second image set, input the latitude and longitude information of the target second image into a reverse geocoding interface, and obtain a second geographic location of the target second image; The determining the correspondence between the second geographical location and the second image set includes: A correspondence between the second geographical location and the second image set is established.

4. The method according to claim 1, wherein the target set corresponds to a gallery; the method further comprising: Acquire shooting attribute information of each second image in the second image set; classifying the second image set based on the shooting attribute information; Correspondingly, the step of inputting the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image includes: Determine the target second image in the classified image set respectively, input the latitude and longitude information of the target second image into the reverse geocoding interface, and obtain the second geographical location of the target second image; The determining the correspondence between the second geographical location and the second image set includes: A corresponding relationship between the second geographical location and the classified image set is established respectively.

5. According to the method of claim 1, the pre-trained landmark recognition model is a model capable of outputting landmark identifications obtained by deep learning a large number of images containing landmarks.

6. An electronic device comprising: Memory, used to store programs; A processor runs the program to input the images in the target set into a pre-trained landmark recognition model to obtain a first image set capable of recognizing landmark identifications; determining a first geographic location of a first image in the first image set based on the landmark identifier; classifying the first images in the first image set based on the first geographical location so as to classify the first images belonging to the same geographical location into one category; Acquire a second set of images in which landmarks cannot be identified by the landmark recognition model; Determine a target second image from the second image set, input the latitude and longitude information of the target second image into a reverse geocoding interface, and obtain a second geographic location of the target second image; A correspondence between the second geographical location and the second image set is determined, where the images in the second image set are images classified based on shooting attribute information of the images.

7. The electronic device according to claim 6, wherein the processor is further configured to obtain shooting attribute information of each image in the gallery; and classify the images in the gallery into different image sets based on the shooting attribute information; wherein, The object set belongs to the image set.

8. The electronic device according to claim 7, wherein the processor inputs the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image, comprising: Determine a target second image from the second image set, input the latitude and longitude information of the target second image into a reverse geocoding interface, and obtain a second geographic location of the target second image; The processor determines the correspondence between the second geographical location and the second image set, including: establishing the correspondence between the second geographical location and the second image set.

9. The electronic device according to claim 6, wherein the target set corresponds to a gallery; the processor is further configured to obtain shooting attribute information of each second image in the second image set; and classify the second image set based on the shooting attribute information; Correspondingly, the processor inputs the latitude and longitude information of the second image in the second image set into the reverse geocoding interface to obtain the second geographic location of the second image, including: Determine the target second image in the classified image set respectively, input the latitude and longitude information of the target second image into the reverse geocoding interface, and obtain the second geographical location of the target second image; The processor determines the correspondence between the second geographical location and the second image set, including: establishing the correspondence between the second geographical location and the classified image set respectively.

10. The electronic device according to claim 6, wherein the pre-trained landmark recognition model is a model capable of outputting landmark identifications that is obtained by deep learning a large number of images containing landmarks.