A method, apparatus, terminal and storage medium for image management
Through the method of user manually selecting target images and terminal automatically identifying related images, the problem that the terminal image classification model cannot manage new categories is solved, improving the accuracy and efficiency of image management, and protecting user privacy.
Patent Information
- Application Number
- CN202010707461.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-21
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2040-07-21
AI Technical Summary
The existing terminal image classification model cannot effectively manage images of new categories, resulting in reduced image management accuracy and efficiency, and cloud classification has the risk of privacy leakage.
By manually selecting the target image by the user, the terminal automatically recognizes and adds related images to the newly created classification group, reducing the need for training samples, improving management accuracy and efficiency, and protecting user privacy.
It realizes the management of quickly creating and adjusting image groups on the terminal, improves the accuracy and efficiency of image management, and avoids privacy leakage.
Smart Images

Figure CN113971223B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application belong to the field of image processing, and in particular, relate to a method, device, terminal, and storage medium for image management. Background Technique
[0002] A terminal can store multiple images, and the terminal can classify the images according to the content of each image. For example, the terminal can classify multiple images through a built-in classification model. However, when the types of images increase, the above classification model cannot manage the images of the new categories, thereby reducing the accuracy of image management and affecting the management efficiency of the terminal for images. Summary of the Invention
[0003] In view of this, the embodiments of the present application provide a method, device, terminal, and storage medium for image management, which are used to improve the accuracy of image management and the management efficiency of images.
[0004] To achieve the above purpose, the embodiments of the present application provide the following technical solutions:
[0005] In a first aspect, the embodiments of the present application provide a method for image management, including: the terminal displays a first interface, and the first interface includes N images, where 2 ≤ N ≤ M. The terminal receives a first operation input by the user for L target images among the M images, where 1 ≤ L. In response to the first operation, the terminal displays a second interface. The second interface at least includes L target images, Q first images among the N images, and P second images among the N images. In the second interface, the L target images and the Q first images are in a marked state, the similarity between the first images and the target images is greater than or equal to a preset threshold, where 1 ≤ Q, and Q + L + P ≤ M, 0 ≤ P, and M, N, L, Q, and P are all integers. The terminal manages the L target images and Y first images among the M images, where the Y first images include the Q first images, and Y is an integer.
[0006] In the embodiments of the present application, when image management is required, for example, when a new image group needs to be created or some images in the image group need to be removed, the user can manually select the target image, and then the terminal can select Y first images associated with the target image from the images, and display L target images and Q first images in the marked state on the second interface. Subsequently, it is convenient for the user to manage the Q first images and the target image selected by the user, such as dividing them into the same image group or removing them from the image group, realizing the management of the image group. Compared with the existing image management technology, the user can manually select a part of the images related to the target image, and then select the first images related to the target image from the images, realizing the fast batch management of the images, realizing the creation of a new image group or the quick adjustment of the existing image group based on the existing classification model, and improving the accuracy and management efficiency of image management.
[0007] In a possible implementation manner of the first aspect, the terminal manages L of the target images and Y of the first images in the M images, including: the terminal receives a second operation input by the user; in response to the second operation, the terminal displays a third interface, and the third interface includes the L target images and the Y first images. This implementation manner can be used to determine all the selected target images and all the first images similar to the target image for subsequent management operations.
[0008] In a possible implementation manner of the first aspect, after the terminal displays the third interface in response to the second operation, and the third interface includes the L target images and the Y first images, the method further includes: the terminal receives a third operation input by the user on the third interface for deselecting the third image, where the third image is an image among the Y first images, and / or the third image is an image among the L target images; in response to the third operation, the terminal displays a fourth interface, and the fourth interface includes the images in the third interface except the fourth image, and the fourth image includes the third image and a fifth image, and the similarity between the fifth image and the third image is greater than or equal to a preset threshold. This implementation manner facilitates the deselection of the selected target images and first images, improving the accuracy of the management process.
[0009] In a possible implementation of the first aspect, before the terminal displays the fourth interface, the method further includes: if the third image is an image among the L target images, the terminal determines at least one first image from the Y first images, and the at least one first image is associated with the third image; if the at least one first image is only associated with the third image, the terminal determines the at least one first image as the fourth image; if the at least one first image is associated with other images among the L target images in addition to being associated with the third image, the terminal determines the image similarity between the at least one first image and the third image; if the image similarity is greater than the maximum similarity threshold between the at least one first image and the other images, the terminal determines the at least one first image as the fourth image.
[0010] In a possible implementation of the first aspect, before the terminal displays the fourth interface, the method further includes: if the third image is an image among the Y first images, the terminal calculates the first similarity between the third image and the sixth image, and the sixth image is a target image associated with the third image among the L target images; if the image similarity between the first image associated with the sixth image and the sixth image is less than or equal to the first similarity, the terminal determines the first image associated with the sixth image as the fourth image.
[0011] In the embodiments of the present application, different selection methods for the fourth image are adopted according to whether the third image is a first image or a target image, which improves the accuracy of the fourth image selection, thereby improving the accuracy of subsequent management operations.
[0012] In a possible implementation of the first aspect, the method for image management further includes: updating the preset threshold corresponding to the target image based on the first similarity.
[0013] In a possible implementation of the first aspect, before the second interface is displayed on the terminal, the method further includes: the terminal determines the similarity between each of the M images and the target image; the terminal determines, as the first image, an image among the M images whose similarity with the target image is greater than or equal to a preset threshold. In this implementation, by calculating the similarity between images, the first image similar to the target image is determined, achieving the purpose of automatically identifying the first image and reducing unnecessary selection operations.
[0014] In a possible implementation of the first aspect, the terminal determines the similarity between each of the M images and the target image, including: the terminal determines the vector distance between the feature vector of each image and the target feature vector of the target image according to the feature vector of each image and the target feature vector of the target image; the terminal determines the similarity between each image and the target image according to the vector distance.
[0015] In a possible implementation of the first aspect, the terminal manages L target images and Y first images among the M images, including: the terminal receives a fourth operation input by the user; the terminal deletes the L target images and the Y first images. In this implementation, batch deletion of images is achieved, improving the efficiency of deleting images.
[0016] In a second aspect, an embodiment of the present application provides an image management device, including: a first interface display unit for displaying a first interface, the first interface including N images, 2 ≤ N ≤ M; a first operation receiving unit for receiving a first operation input by the user for L target images among the M images, 1 ≤ L;
[0017] In response to the first operation, a second interface display unit for displaying a second interface, the second interface at least including L target images, Q first images among the N images, and P second images among the N images, the L target images and the Q first images are in a marked state in the second interface, the similarity between the first image and the target image is greater than or equal to a preset threshold, 1 ≤ Q, and Q + L + P ≤ M, 0 ≤ P, and M, N, L, Q, and P are all integers; an image management unit for managing L target images and Y first images among the M images, the Y first images including Q first images, and Y is an integer.
[0018] In a third aspect, an embodiment of the present application provides a terminal, including a processor, and the processor is configured to execute a computer program or instruction stored in a memory to implement the image management method described in any one of the first aspects above.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image management method described in any one of the first aspects above is implemented.
[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, and when the computer program product runs on a terminal device, the terminal is enabled to execute the image management method described in any one of the first aspects above.
[0021] In a sixth aspect, an embodiment of the present application provides a chip system, including a processor, the processor being coupled to a memory, and the processor executing a computer program stored in the memory to implement the method for image management as described in any one of the first aspects.
[0022] The chip system may be a single chip or a chip module composed of multiple chips. The memory may be an internal memory of the chip system or an external memory of the chip system, and the embodiments of the present application do not make any limitation thereto.
[0023] It can be understood that the beneficial effects of the above second aspect to the sixth aspect can refer to the relevant descriptions in the first aspect above, and will not be elaborated herein. Description of the Drawings
[0024] Figure 1 is a block diagram of a partial structure of a mobile phone provided by an embodiment of the present application;
[0025] Figure 2 is a software structure block diagram of the mobile phone provided by an embodiment of the present application;
[0026] Figure 3 is a flowchart of the implementation of the method for image management provided by an embodiment of the present application;
[0027] Figure 4 is a schematic diagram of an operation process provided by an embodiment of the present application;
[0028] Figure 5 is a schematic diagram of the page layout of multiple display modes provided by an embodiment of the present application;
[0029] Figure 6 is a schematic diagram of touch-activated image management provided by an embodiment of the present application;
[0030] Figure 7 is a schematic diagram of a first interface provided by another embodiment of the present application;
[0031] Figure 8 is a schematic diagram of a second interface provided by an embodiment of the present application;
[0032] Figure 9 is a schematic diagram of a second interface provided by another embodiment of the present application;
[0033] Figure 10 is a schematic diagram of the configuration of image classification labels provided by an embodiment of the present application;
[0034] Figure 11 is a specific implementation flowchart of calculating the similarity between a target image and any one of multiple images provided by an embodiment of the present application;
[0035] Figure 12 It is a specific implementation flowchart of step 1101 provided by another embodiment of the present application;
[0036] Figure 13 It is a schematic diagram of image division provided by an embodiment of the present application;
[0037] Figure 14 It is a schematic diagram of the selection of the first image provided by an embodiment of the present application;
[0038] Figure 15 It is a specific implementation flowchart of the image management method provided by an embodiment of the present application in step 304;
[0039] Figure 16 It is a schematic diagram of the fourth interface provided by an embodiment of the present application;
[0040] Figure 17 It is a schematic diagram of the interface for creating an image group provided by an embodiment of the present application;
[0041] Figure 18 It is a schematic diagram of the recognition of the fourth image provided by an embodiment of the present application;
[0042] Figure 19 It is a schematic diagram of the recognition of the first image provided by another embodiment of the present application;
[0043] Figure 20 It is a schematic diagram of the interface for batch deleting images provided by an embodiment of the present application;
[0044] Figure 21 It is a specific implementation flowchart of a method for image management provided by the third embodiment of the present application;
[0045] Figure 22 It is a schematic diagram of the recognition of adding a new image to an image group provided by an embodiment of the present application;
[0046] Figure 23 It is a structural block diagram of an image management device provided by an embodiment of the present application;
[0047] Figure 24 It is a schematic diagram of a terminal provided by an embodiment of the present application. Specific embodiments
[0048] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects. For example, the first image and the second image are only used to distinguish different images, and do not limit their order. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and the terms such as "first" and "second" do not necessarily mean different.
[0049] In the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, c can be single or multiple. A and B are similar in this article, and the association can have the same meaning.
[0050] It should be noted that in the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0051] Currently, the classification model in the terminal is obtained by training based on a neural network. Exemplarily, the above neural network can be a neural network based on a multi-layer pooling layer or a neural network based on Long Short-Term Memory (LSTM). The cloud server can train and learn the above neural network through training images configured with preset image classification labels to obtain a classification model.
[0052] There are two usage methods for the trained classification model. One is to deploy it on the cloud server, and the other is to send the classification model to each terminal.
[0053] Since the hard disk and memory space for storing and running models on cloud servers are very large, and the computing power of the server processors is also very strong, the classification models on cloud servers can be unrestricted by model size and computing power, and the models can be designed to be very large, such as 500MB, to support a very large number of image categories, such as 10,000 label categories. However, this method requires the terminal to upload images to the cloud server, which has the risk of image privacy leakage and is not a very secure method.
[0054] Deploying an image classification model on the terminal can avoid leaking user privacy. However, due to the limited space for storing the model on the terminal and the limited computing power of the terminal processor, the size of the image classification model on the terminal is relatively small, such as 20MB. Also, considering the constraints of the terminal processor performance, the number of labels of the model is small (such as 500), or the label granularity is too coarse to be recognized. For example, if the content of an image a is "kapok", currently, the terminal using this classification model can determine that the image classification label of the image a is "flower", but cannot further identify the specific type of flower in the image a. If there are a large number of images of flowers in the image library, such as the content of image b is "kapok", the content of image c is "rose", and the content of image d is "peony", using the current solution, the model deployed on the terminal may determine that the image classification labels of image b, image c, image d, and image a are all "flower", and group image b, image c, image d, and image a into the same image group. When the user hopes to find an image of "kapok", the terminal model will return all images with the label "flower", and the user still needs to manually search for the image of kapok, causing inconvenience in use.
[0055] Currently, to address the deficiencies of the above solution, users can manually input multiple training images for the newly added image classification labels to train the classification model built into the terminal, so as to achieve the purpose of being able to recognize the newly added image classification labels and expand the classifiable labels. However, this method also brings new problems. Since training and learning the classification model often requires a large number of sample images, and the number needs to reach dozens or hundreds of images of the same type. In the daily use of the terminal by users, the number of the same type is small. Even if there are enough images of a certain type of label in the terminal, it still requires a lot of manual operations to find and label the images of the newly added image types for training, thus increasing the operation difficulty of adding new image classifications.
[0056] Uploading images to the cloud server for classification has the risk of privacy leakage and is not a very good method.
[0057] To address the deficiencies of the above implementation methods and, at the same time, enable the expansion of classification tags, the embodiments of this application provide a method for object management. A user can manually select a part of the target objects associated with the newly created classification, and then automatically select the first objects related to the target objects from the image library and add them to the image group of the newly created classification, thus realizing the creation of a new image group based on the existing classification model, improving the classification accuracy and the image management efficiency. The object management method provided by the embodiments of this application does not rely on the classification model deployed in the cloud when creating new object management tags, thereby protecting the privacy information of users and ensuring the information security of users. Further, by the terminal manually selecting a small number of target objects, the first objects related to the target objects can be selected from the image library, reducing the number of training samples required for classification operations and lowering the difficulty of classification.
[0058] It should be noted that what this application discloses is a method for image management, but the implementation process in the embodiments can be applied to the management of other data such as documents, audio, and video. That is, the terminal can calculate the similarity between documents in the document library to determine the first document similar to the target document selected by the user, so as to achieve the purpose of batch management of documents. Among them, the calculation of document similarity can be achieved by extracting text vectors and determining the similarity between two documents based on the vector distance between the text vectors. Similarly, the terminal can calculate the similarity between audio in the audio library to determine the first audio similar to the target audio selected by the user, so as to achieve the purpose of batch management of audio. Among them, the calculation of audio similarity can be achieved by extracting the audio waveform diagram and calculating the similarity between two audio waveforms. Similarly, the terminal can calculate the similarity between videos in the video library to determine the first video similar to the target video selected by the user, so as to achieve the purpose of batch management of videos. Among them, the calculation of video similarity can be determined by combining the similarity of the sound tracks in the videos and the similarity between the preset key image frames. According to the similarity between the sound tracks of two videos and the similarity between the associated image frames, the similarity between the two videos is determined.
[0059] The image management method provided by the embodiments of this application can be applied to terminals such as mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. that can classify images, and can also be applied to servers and service response systems based on terminal artificial intelligence. The embodiments of this application do not impose any restrictions on the specific types of terminals.
[0060] Take the terminal as a mobile phone for example. Figure 1 Shown is a block diagram of a part of the structure of the mobile phone provided by an embodiment of the present application. Refer to Figure 1 , the mobile phone includes components such as a Radio Frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, a camera 160, a Near Field Communication module 170, a processor 180, and a power supply 190. Those skilled in the art can understand that Figure 1 the mobile phone structure shown in
[0061] does not limit the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 1 The following specifically introduces each component of the mobile phone:
[0062] The RF circuit 110 can be used for receiving and sending signals during information reception or call processes. Specifically, after receiving the downlink information from the base station, it is given to the processor 180 for processing; in addition, the designed uplink data is sent to the base station. Usually, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, etc. In addition, the RF circuit 110 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc. Specifically, the mobile phone can receive images sent by other terminals through the RF circuit 110 and store the images in the picture gallery in the memory 120.
[0063] The memory 120 can be used to store software programs and modules. The processor 180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120. For example, the photos captured by the camera unit or the images obtained from the Internet are stored in the photo gallery in the memory 120. The memory 120 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). For example, the above-mentioned photo gallery application program can be stored in the program storage area of the memory 120. The data storage area can store the data created according to the use of the mobile phone (such as audio data, phone book, etc.), and the data storage area can also store the data fed back by other terminals (such as biometric data fed back by wearable devices). In addition, the memory 120 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
[0064] The input unit 130 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the mobile phone 100. Specifically, the input unit 130 can include a touch panel 131 and other input devices 132. The touch panel 131, also known as a touch screen, can collect the touch operations of the user on or near it (such as the operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 131), and drive the corresponding connection device according to a pre-set program. For example, in the embodiment of the present application, a selection instruction is generated on the touch panel 131, and each selection instruction corresponds to a target image selected by the user.
[0065] The display unit 140 can be used to display the information input by the user or the information provided to the user, as well as various menus of the mobile phone. For example, it outputs the display page corresponding to the above-mentioned photo gallery, and the display page contains thumbnails of all existing images stored in the photo gallery. The display unit 140 can include a display panel 141. Optionally, the display panel 141 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 1In [the description], the touch panel 131 and the display panel 141 are implemented as two independent components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 131 and the display panel 141 can be integrated to realize the input and output functions of the mobile phone. For example, the display unit 140 in the embodiments of the present application can display the first interface, the second interface, the third interface, etc. involved in the embodiments of the present application.
[0066] The mobile phone 100 may further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 141 and / or the backlight when the mobile phone is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor that the mobile phone can also be configured with, they will not be elaborated here.
[0067] The mobile phone 100 may further include a camera 160. Optionally, the position of the camera on the mobile phone 100 can be front-facing or rear-facing, and the embodiments of the present application do not limit this. Optionally, the mobile phone 100 may include a single camera, a dual camera, or a triple camera, etc., and the embodiments of the present application do not limit this. For example, the mobile phone 100 may include a triple camera, where one is a main camera, one is a wide-angle camera, and one is a telephoto camera. Optionally, when the mobile phone 100 includes multiple cameras, these multiple cameras can all be front-facing, or all be rear-facing, or some be front-facing and some be rear-facing, and the embodiments of the present application do not limit this. The mobile phone can collect images through the camera 160 and store the collected images in the photo gallery of the memory 120.
[0068] The mobile phone can access the Internet through the near-field communication module 170, so as to receive the data linked list fed back by each distributed node. For example, the near-field communication module 170 is integrated with a WIFI communication module, establishes a communication connection with the wireless router in the current scene through the WIFI communication module, and accesses the Internet through the wireless router. Although Figure 1 the near-field communication module 170 is shown, it can be understood that it does not belong to an essential component of the mobile phone 100 and can be completely omitted within the scope of not changing the essence of the application according to needs.
[0069] The processor 180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 180. For example, the processor 180 can be used to execute step 302, step 304, step 1101 to step 1102, step 1201 to step 1203, step 3041, step 305 and step 2101 to step 2102 in the following steps.
[0070] The mobile phone 100 also includes a power source 190 (such as a battery) for supplying power to various components. Preferably, the power source can be logically connected to the processor 180 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.
[0071] The software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the mobile phone 100.
[0072] Figure 2 It is a software structure diagram of the mobile phone 100 of the embodiment of the present application. The Android system is divided into four layers, namely, the application layer, the application framework layer (framework, FWK), the system layer and the hardware abstraction layer, and the layers communicate with each other through software interfaces.
[0073] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0074] The application layer can include a series of application packages.
[0075] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0076] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0077] As Figure 2 shown, the application framework layer may include a window manager, a content provider, a view system, a telephone manager, a resource manager, a notification manager, etc.
[0078] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0079] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc.
[0080] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon may include a view for displaying text and a view for displaying pictures.
[0081] The telephone manager is used to provide the communication function of the electronic device 100. For example, the management of call states (including connection, disconnection, etc.).
[0082] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0083] The notification manager enables applications to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scroll bar text, such as a notification of a background-running application, and can also be a notification that appears on the screen in the form of a dialogue window. For example, prompt text information in the status bar, emit a prompt tone, the electronic device vibrates, the indicator light flashes, etc.
[0084] Android Runtime includes a core library and a virtual machine. Android runtime is responsible for the scheduling and management of the Android system.
[0085] The core library contains two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of Android.
[0086] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to manage the object life cycle, stack management, thread management, security and exception management, and garbage collection and other functions.
[0087] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.
[0088] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0089] The media library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0090] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.
[0091] The 2D graphics engine is a drawing engine for 2D drawing.
[0092] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver. In some embodiments, the above kernel layer further includes a PCIE driver.
[0093] By way of example and not limitation, the device installed with the image management program may specifically be a terminal, and the terminal may be a device with an image storage function such as a smart phone, a tablet computer, a laptop computer, etc. In subsequent embodiments, the above device installed with the image management program is represented by a terminal. The method for image management provided by the embodiments of the present application includes creating a new image group based on the images stored in the image gallery, and removing the images in the created image group.
[0094] Figure 3 The implementation flow chart of the method for image management provided by the embodiments of the present application is shown. The method is applied to a terminal, and the terminal has M images. The method includes:
[0095] Step 301, the terminal displays a first interface, and the first interface includes N images, 2 ≤ N ≤ M.
[0096] Exemplarily, when the terminal detects that the user clicks Figure 4After the gallery icon 201 shown in (a) in, the terminal opens the gallery and displays an interface as shown in Figure 4 in (b).
[0097] On the one hand, the first interface can be the interface displayed on the terminal after the terminal opens the gallery icon 201, such as Figure 4 shown in (b) in, and the N images included in this first interface are Image 1 to Image 55.
[0098] It should be understood that the above N images are displayed in the form of thumbnails on this first interface.
[0099] In the embodiments of the present application, when the images are displayed in the form of thumbnails on the interface, since each interface has a maximum number of images that can be displayed. When N = M and is less than or equal to the maximum number of images that can be displayed corresponding to the first interface, that is, these M images are all displayed on the first interface.
[0100] If M is greater than the maximum number of images that can be displayed corresponding to the first interface and N is the maximum number of images that can be displayed corresponding to the first interface, although these M images cannot be displayed in the first interface at the same time, it should be understood that there are still M - N images to be displayed. At this time, the user can change the images displayed in the first interface by swiping up and down or by dragging the progress bar to display the images that were originally to be displayed on the first interface. Such as Figure 4 the arrow in (c) indicates the sliding direction of the user's gesture. At this time, the N images on the display interface of the terminal are Image 6 to Image 60; and again such as Figure 4 the arrow in (d) indicates the sliding direction of the user's gesture. The user can change the images displayed in the first interface of the terminal by dragging the progress bar on the first interface. At this time, the N images on the display interface of the terminal are Image 6 to Image 60.
[0101] On the other hand, the first interface can be the interface shown in Figure 4 (c) in, and from Figure 4 (c), at this time the first interface includes N images which are Image 6 to Image 60. In other words, at this time the first interface is not the interface directly displayed by the terminal in response to the user opening the gallery icon 201, but the interface obtained by the terminal in response to the user operating on Figure 4 (b) in the figure.
[0102] It should be noted that in Figure 4 an example is given where a maximum of 60 images are displayed on the first interface.
[0103] Specifically, the terminal can store the acquired images in the storage area corresponding to the gallery icon 201. When the terminal starts the gallery icon 201, it can read the data in this storage area to display an interface containing the thumbnails corresponding to the above images. The terminal can obtain a click operation and determine the thumbnail of any image to be selected according to the click operation to achieve full-screen display of the image. In a possible implementation manner, in addition to reading the data in the corresponding storage area through the gallery icon 201 to display the images stored in the above storage area, the terminal can also read the data of the entire memory in the terminal to load all the image data stored in the terminal into the above gallery icon 201.
[0104] In this embodiment, after the terminal responds to the user's operation on the gallery icon 201 at (a) in Figure 4 , the terminal can display an image display interface, that is, the above-mentioned first interface. According to different display modes, this image display interface can correspond to different page layouts. The display models include but are not limited to tiled display, grouped display, and timeline-based display, etc. Among them, the tiled display is to display the thumbnails of some images in the gallery. The user can switch the thumbnails displayed on the current interface by swiping up and down or left and right. The above-mentioned grouped display specifically divides the stored images in the gallery into multiple image groups according to the image management tags recognized from each image, and outputs the group icons for each image group. The group icons can be generated based on the thumbnails of the images stored in the image group. In the grouped display interface, the user can click on the target image group to switch to the interface for displaying the thumbnails of each image in the target image group to further select the target image to be viewed. The above-mentioned timeline-based display specifically generates an axis with time as the coordinate dimension according to the shooting time of each image, marks each shooting time on the axis, and associates and displays the thumbnails of the images corresponding to the shooting time.
[0105] Exemplarily, Figure 5 shows a schematic diagram of the page layouts of multiple display modes provided by an embodiment of the present application. Referring to Figure 5 shown, where Figure 5 (a) in is specifically the page layout in the tiled display mode, Figure 5 (b) in is specifically the page layout in the classification display mode, Figure 5 (c) in is specifically the page layout in the timeline-based display mode.
[0106] Step 302: The terminal receives a first operation input by the user for L target images among N images, where 1 ≤ L.
[0107] It should be understood that L is less than or equal to N.
[0108] In a possible implementation, the method provided by the embodiments of the present application may further include: the terminal determines to enter the image management function or enables the image management mode.
[0109] For example, in combination with Figure 4 , after the terminal detects the operation of the user clicking the control 202 of "Add New Category" shown in (e) of Figure 4 , or after detecting the operation of the user clicking the control 203 of "Modify Existing Category" shown in (e) of Figure 4 , or after detecting the operation of the user clicking the control 204 of "Delete" shown in (e) of Figure 4 , it is determined that the operation indicating image management by the user is detected, or the user indicates to enable the image management function.
[0110] It should be noted that after the mobile phone detects the operation of the user clicking any of the above controls, the terminal can also display a prompt of "Agree" to enable the image management function and a prompt of "Disagree" to enable the image management function on the display interface. If it detects the operation of the terminal for the prompt of "Agree" to enable the image management function, the terminal determines to enable the image management function, which can prevent misoperation. If it detects the operation of the terminal for the prompt of "Disagree" to enable the image management function, the terminal determines not to enable the image management function.
[0111] Another example, as shown in (a) of Figure 6 , the user can long-press any image in the first interface to trigger the terminal to enter the image management mode. Or, as shown in (b) of Figure 6 , the user can draw a sliding track on the display interface of the terminal to trigger the terminal to enter the image management mode.
[0112] In yet another example, the terminal may have management controls on the first interface. The management controls include but are not limited to a new category control and an image deletion control. The new category control is used to create a new image group in the terminal's gallery and configure a new image classification identifier for the image group; while the image deletion control is used to batch delete images in the terminal's gallery. The first interface may include the above two controls or any one of the above controls, which is not limited herein. Figure 7 FIG. shows a schematic diagram of the first interface provided by another embodiment of the present application. As shown in Figure 7 , the first interface includes a control for adding an image group, that is, "Add New Category" (i.e., control 202). When the terminal detects that the user clicks the above control, it enters the image management mode.
[0113] In a possible implementation, after the terminal detects that the user clicks the control of "Add New Category", it enters the image management mode. Before receiving the first operation from the user in this image management mode, each image is in an unmarked state; after the terminal detects that the user clicks the control of "Modify Existing Category", it can also enter the image management mode. Before receiving the first operation from the user in this image management mode, the images related to the existing category can be in a marked state, so as to confirm which part of the images belong to the above-mentioned existing category. Unmarked images can be selected and added to the existing category, or marked images can be deselected to remove the deselected images from the existing category. It should be emphasized that both selecting unmarked images and deselecting marked images can be performed by the user selecting some target images and identifying the first images similar to the target images for batch selection or deselection. For specific descriptions, please refer to the description of the following process and will not be elaborated again.
[0114] It should be understood that when the terminal enters the image management mode, the terminal can then determine multiple first images similar to the L target images automatically selected based on the user's selection of the L target images.
[0115] In a possible implementation, the above-mentioned first operation includes but is not limited to: click operation, double-click operation, sliding selection operation, etc.
[0116] In a possible implementation, the terminal takes the L click operations sequentially input by the user on the first interface as the first operation, and each click operation is used to determine a target image.
[0117] In another possible implementation, the terminal determines the L target images input by the user as the images within the area covered by the sliding operation (e.g., the first operation) input by the user on the first interface.
[0118] Step 303: In response to the first operation, the terminal displays a second interface, which at least includes the L target images, Q first images among the N images, and P second images among the N images. In the second interface, the L target images and the Q first images are in a marked state, the similarity between the first images and the target images is greater than or equal to a preset threshold, 1≤Q, and Q + L + P≤M, 0≤P, where M, N, L, Q, and P are all integers.
[0119] Combined with Figure 4In (e), when the terminal enters the image management mode, if the images selected by the user are Image 2, Image 8, and Image 13, the terminal can determine multiple images similar to Image 2 (including Image 23), multiple images similar to Image 8 (including Image 38), and multiple images similar to Image 13 (including Image 46) as Q first images. The terminal displays L target images on the second interface (where some target images can be in a state to be displayed, not all target images are displayed on the second interface simultaneously. As described above, the terminal can receive the up and down sliding operations of the user to change the images displayed on the second interface, and the user can select a target image by clicking or other means within the images displayed after the sliding operation), and the status of Q first images among N images is the marked status. As Figure 4 As shown in (f), the status of Image 2, Image 8, Image 13, Image 46, Image 23, and Image 38 displayed on the second interface of the terminal is the marked status (or selected status), while the images other than Image 2, Image 8, Image 13, Image 46, Image 23, and Image 38 on the second interface are in the unmarked status (or unselected status).
[0120] In the embodiments of the present application, the terminal can make an image in the marked status by means of ticking, adding a border, changing the image color, etc.
[0121] It should be noted that if there are other images similar to the target images in addition to the images displayed on the second interface, there is also a control of "display all images" on the second interface. Or, the user can slide the second interface up and down to view all the first images similar to the target images among M images.
[0122] It should be noted that as Figure 4 shown in (f), in the embodiments of the present application, if Image 2 is similar to Image 23, then Image 2 and Image 23 have the same mark; if Image 8 is similar to Image 38, then Image 8 and Image 38 have the same mark; if Image 13 is similar to Image 46, then Image 13 and Image 46 have the same mark. And if the similarity between Image 2 and Image 8 is lower than the preset threshold, then the marks of Image 2 and Image 8 are different. In other words, if any two images in the marked status are similar, then these two images have the same mark; if any two images in the marked status are not similar, then they have different marks. This is convenient for the user to clarify the similar images according to the marks of each image.
[0123] It can be understood that when P = 0, it means that the terminal does not display the second image on the second interface. As Figure 8 shown, the M images displayed on the first interface are Image 1 to Image 2. If the user selects 1 target image as Image 2, and this Image 2 is similar to Image 1, then as Figure 8As shown, both Image 1 and Image 2 displayed on the second interface of the terminal are in a marked state. At this time, there is no second image on the second interface. Correspondingly, on the second interface, there is no need to display the control for "displaying all images" either.
[0124] It should be noted that when the number of images stored in the image gallery is large, the second interface cannot display all the images in the image gallery. In this case, if the terminal recognizes that the first image similar to the target image in the image gallery is an image not displayed in the second interface, the terminal can also set the un-displayed image to a selected state. When the user updates the images displayed on the second interface by swiping (such as Figure 4 (c) in Figure 4 (d) in Figure 9 or by dragging the progress bar, Figure 4 when the un-displayed image is displayed on the second interface, the previously un-displayed first image similar to the target image can be displayed as a selected state. Figure 1 - 5 shows a schematic diagram of the second interface provided by another embodiment of the present application. Referring to Figure 9 as shown, relative to
[0125] In a possible implementation, the terminal can perform an operation of selecting a first image from the image gallery whose image content is similar to the target image when detecting a selection completion instruction. Among them, the selection completion instruction is used to indicate that the user has completed selecting all target images.
[0126] In a possible implementation, the terminal can, after detecting that the user selects a target image, determine the first image similar to the target image in the background, and when detecting the selection completion instruction, perform the operation of step 304 according to all the identified first images and the target images selected by the user. Since it takes a certain amount of time for the terminal to recognize the first image similar to the target image, if the recognition operation of similar images is only performed after the user has finished selecting, it may take a long time to determine the first images corresponding to all target images, resulting in unnecessary waiting and increasing the time consumption of image management operations. Based on this, when the terminal detects that the user selects any target image, it performs the recognition operation of similar images in the background. Since the process of recognizing the first image does not require user operation and can be performed in the background, that is, the process of recognizing the first image is invisible to the user, and the user can continue to select and manage the target images related to the management purpose in the original target image selection interface, thereby greatly shortening the waiting time required by the user and improving the user experience.
[0127] In this embodiment, the terminal stores multiple images. After the user determines the target image related to the management purpose, for example, after determining the target image corresponding to the newly created image group, the terminal can search in the image library to check if there are images similar to the target image, and identify the images similar to the target image as the first images mentioned above.
[0128] In a possible implementation, the existing images in the image library are configured with image classification labels. The number of the above image classification labels can be one or multiple. The terminal can identify the first image corresponding to the target image based on the image classification labels of the multiple images and the image classification labels of the target image. Specifically, if the number of the same image classification labels between any one of the multiple images and the target image is greater than the preset number threshold, then identify any one of the multiple images as the first image associated with the target image, and the weights of different classification labels can be different. Exemplarily, Figure 10 FIG. shows a schematic diagram of the configuration of the image classification labels provided in an embodiment of the present application. Refer to Figure 10 As shown, the image contains two shooting subjects, namely a tree and a person. Therefore, the terminal can configure two image classification labels for the candidate image, namely "tree" and "portrait". For example, the label weight of "tree" is 40%, and the label weight of "portrait" is 30%.
[0129] In a possible implementation, the terminal is built-in with a classification model. The terminal can import any one of the multiple images and the target image into the above classification model to identify whether the two images belong to the same category. If the two images belong to the same type, then identify any one of the multiple images as the first image corresponding to the target image.
[0130] In this embodiment, the terminal can establish an association relationship between the first image and the target image. This association relationship is used to define the target image corresponding to the first image. The number of target images corresponding to each first image can be one, or two or more. Since the target images selected by the user all correspond to the same image group, there is a certain similarity between the target images. In this case, the first images identified based on the target images will also overlap, that is, the first images are similar to multiple target images. In this case, the first image can correspond to multiple target images. For example, if the first image A is only associated with the target image 1, then the association relationship corresponding to the first image A can be set as {target image 1}, while the first image B is associated with the target image 1 and the target image 2, then the association relationship corresponding to the first image B can be set as {target image 1, target image 2}.
[0131] Furthermore, as another embodiment of the present application, Figure 11The figure shows a specific implementation flowchart of calculating the similarity between a target image and any one of multiple images provided by an embodiment of the present application. Refer to Figure 11 As shown, relative to Figure 3 the embodiment described above, in the image management method provided by an embodiment of the present application, before the second interface is displayed on the terminal, the method further includes step 1101 to step 1102, which are specifically described as follows:
[0132] Step 1101: The terminal determines the similarity between each of the M images and the target image.
[0133] Exemplarily, step 1101 can be implemented in the following manner: The terminal determines the feature vector of each image and the target feature vector of the target image.
[0134] In this embodiment, the terminal can import the above two images (i.e., the candidate image and the target image) into a preset similarity calculation model to calculate the similarity between the two images. Further, the terminal can determine the similarity between the two based on the distance between the feature vectors of the two images.
[0135] In this embodiment, the terminal can construct the feature vectors corresponding to each of the multiple images and the target image, and based on the vector distance between the two feature vectors, determine whether the two images are related. Based on this, the terminal can parse each of the multiple images to identify the resolution of the image, and based on the image resolution and image size, determine the number of pixel points included in the image and the pixel values of each pixel point, and generate the feature vector of the image according to the pixel values of each pixel point.
[0136] In a possible implementation manner, the generation method of the feature vector can be: The terminal has a convolutional neural network built in, and the convolutional neural network includes multiple convolutional layers. The terminal can perform a convolutional dimensionality reduction operation on the image according to the convolutional kernels corresponding to each convolutional layer to obtain a dimensionality reduction matrix, and identify the output of the last convolutional kernel as the above-mentioned feature vector. It should be noted that the input data imported into the above convolutional neural network can specifically be an image matrix composed of the pixel values of each pixel point. If the image is a color image, then one image can correspond to multiple image matrices, for example, including an image matrix corresponding to the R layer, an image matrix corresponding to the G layer, and an image matrix corresponding to the B layer. Similarly, the target feature vector of the target image can also be generated by referring to the above method, which will not be elaborated here.
[0137] In a possible implementation, the terminal may be configured with a standard image size. The terminal can scale the image and the target image so that the image sizes of the scaled image and the target image are the same as the standard image size, that is, perform normalization processing on the image and the target image, and generate a feature vector and a target feature vector based on the normalized image and the target image.
[0138] In a possible implementation, the terminal may be configured with multiple image dimensions. Exemplarily, the number of red pixel points, the number of yellow pixel points, the distribution density of yellow pixel points, the distribution area of yellow pixel points, etc. The terminal obtains the parameter values of the above-mentioned respective image dimensions according to the pixel values of each pixel point of the image, and imports the respective parameter values into a preset vector template to generate a feature vector corresponding to the image. Similarly, the target feature vector of the target image can also be generated by referring to the above method, which will not be elaborated here.
[0139] Further, as another embodiment of the present application, Figure 12 shows a specific implementation flowchart of step 1101 provided by another embodiment of the present application. Refer to Figure 12 as shown, relative to Figure 11 the embodiment described above, in the image management method provided by the embodiment of the present application, the terminal determines the feature vector of each image specifically including step 1201 to step 1203, which are specifically described as follows:
[0140] Step 1201: The terminal divides each of the M images into multiple image regions, and determines a feature pixel value corresponding to the image region based on the pixel values of the pixel points in each of the image regions.
[0141] In this embodiment, the terminal may preset an image division rule. The image division rule may define the number of divided image regions or the size of each image region, etc. The terminal can perform an image division operation on each of the multiple images according to the image division rule to obtain multiple image regions. Each image region contains multiple pixel points.
[0142] In this embodiment, the terminal can generate a feature pixel value corresponding to the image region according to the pixel values of the pixel points included in the image region, that is, each image region corresponds to a feature pixel value. Among them, the method for calculating the above-mentioned feature pixel value may specifically be: taking the pixel mean value of each pixel point as the feature pixel value corresponding to the image region, or calculating the weighted weight corresponding to each pixel value according to the distance value between each pixel point and the center coordinate corresponding to the image region, and performing weighted superposition based on the weighted weight corresponding to each pixel value and the pixel value to obtain the above-mentioned feature pixel value.
[0143] Exemplarily, Figure 13The figure shows a schematic diagram of image partitioning provided by an embodiment of the present application. Refer to Figure 13 As shown, if the terminal defines the number of image regions as 3*3, then the existing image needs to be divided into 9 image regions. Therefore, corresponding dividing lines are generated, and the existing image is divided into 9 image regions based on each dividing line.
[0144] Step 1202: The terminal generates a downsampled image of each of the M images based on the characteristic pixel values of each of the image regions.
[0145] In this embodiment, since the terminal divides each of the multiple images into multiple image regions, and each image region contains multiple pixel points, after feature extraction, the pixel values of the multiple pixel points are combined into one characteristic pixel value, so that the downsampling operation can be performed on the image. Exemplarily, if the image is specifically an image of 256*418, that is, it contains 256*618 pixel points, the terminal divides the above image into multiple image regions, where the number of image regions can be 100*200, and each image region corresponds to one characteristic pixel value. Therefore, an image containing 256*618 pixel points can be downsampled to a downsampled image containing 100*200 characteristic pixel values.
[0146] Step 1203: The terminal generates an image feature vector of each of the M images based on the downsampled image.
[0147] In this embodiment, after the terminal obtains the downsampled image of each of the multiple images, it can generate the image feature vector of the image based on the characteristic pixel points of each image region in the downsampled image. Among them, the specific process of generating the image feature vector can refer to the above description and will not be elaborated here.
[0148] In the embodiment of the present application, by downsampling the image to obtain a downsampled image and generating an image feature vector based on the downsampled image, the amount of input data imported into the algorithm for extracting the feature vector can be reduced, thereby improving the conversion efficiency and improving the recognition efficiency of the first image.
[0149] It should be noted that the target image can also be downsampled in the above manner to generate the corresponding downsampled image of the target image, so as to obtain the corresponding target feature vector of the target image. The specific implementation process is as described above and will not be elaborated here.
[0150] In this embodiment, the terminal can determine the feature vector of an image and the target feature vector corresponding to the target image. The vector distance between the above two vectors can be used as the similarity between the two images, so as to be able to identify the first image similar to the target image. Based on this, the terminal can calculate the vector distance between the feature vector and the target feature vector through a preset vector distance algorithm. The terminal can use this vector distance as the similarity between the two images.
[0151] In a possible implementation manner, the above vector distance algorithm can specifically be an Euclidean distance calculation algorithm. Among them, the Euclidean distance calculation algorithm can specifically be:
[0152]
[0153] Among them, Dis(pic i ,pic tg ) is the vector distance between the i-th image and the target image; is the dimension value of the j-th dimension in the feature vector of the i-th image; is the dimension value of the j-th dimension in the target feature vector of the target image; n is the total number of dimensions included in the feature vector.
[0154] In a possible implementation manner, the terminal can calculate the difference between the corresponding dimensions of the feature vector and the target feature vector, stack the differences of each dimension, and use the stacked value as the vector distance.
[0155] Step 1102, the terminal determines the images in the M images whose similarity with the target image is greater than or equal to a preset threshold as the first image.
[0156] In this embodiment, if the similarity between any candidate object and the target image is greater than the above preset threshold, the candidate image can be recognized as the above first image. Specifically, if the above uses the vector distance as the similarity between the two, if the vector distance is greater than or equal to the preset distance threshold, it means that the similarity between the existing image and the target image is low, and at this time, the existing image can be recognized as a non-associated image; on the contrary, if the vector distance is less than the distance threshold, it means that the similarity between the two images is high, and at this time, the existing image can be recognized as the first image corresponding to the target image.
[0157] Exemplarily, Figure 14 shows a schematic diagram of the selection of the first image provided by an embodiment of the present application. Refer to Figure 14As shown, the terminal can determine the coordinate points of each image in a preset image coordinate system according to the feature vectors corresponding to the respective images. The terminal can use the coordinate point corresponding to the target image as the center and the above distance threshold as the radius to determine the associated range corresponding to the target image. The vector distance between each image within this associated range and the target image is less than the above distance threshold, so that the first image corresponding to the target image can be recognized.
[0158] In the embodiments of the present application, by calculating the vector distance between the feature vectors of the target image and the existing images, and identifying the first image similar to the content of the target image based on this vector feature distance, the accuracy of the first image recognition can be improved, and then the image management efficiency is improved.
[0159] Step 304: The terminal manages L target images and Y first images among M images. The Y first images include Q first images, and Y is an integer.
[0160] It should be understood that the Q first images are the images similar to the L target images displayed on the second interface. However, in actual processes, limited by the maximum number of images that can be displayed on the second interface, there may still be images similar to the target images but not displayed on the second interface, and these images are still in a marked state.
[0161] Example A, dividing image groups
[0162] In a possible embodiment, as Figure 15 shown, the method provided in the embodiments of the present application in step 304 can be implemented in the following manner:
[0163] Step 3041: The terminal receives a second operation input by the user.
[0164] Step 3042: In response to the second operation, the terminal displays a third interface, and the third interface includes L target images and Y first images.
[0165] It should be understood that the above L target images are the images manually determined by the user through the first operation, and the Y first images are the images automatically selected by the terminal according to the similarity between the M images and the target image.
[0166] For example, if the terminal detects a second operation input by the user on the control of "display all images", the terminal displays the interface shown in (g) of Figure 4 as the third interface. As shown in (g) of Figure 4 , the third interface includes all the first images among the M images that are similar to the target image.
[0167] In addition, prompt information may also be displayed on the third interface to prompt the user to input a new category name. Then, the terminal may determine the above-mentioned L target images and the label names corresponding to the Y first images according to the user's input. After that, if the user clicks Figure 4 the "Confirm" control shown in (g) in Figure 4 , it indicates that the operation of dividing the image group has been completed. If the user clicks Figure 4 the "Return" control shown in (g) in Figure 4 , the terminal may switch the display interface of the terminal from the third interface shown in (g) in
[0168] to the second interface shown in (f) in
[0169] . It should be noted that when the L target images and the Y first images are displayed on the third interface, the user may also deselect some of the images, and then the similar images will be automatically deselected. Figure 9 Based on this, combined with
[0170] Step 305: The terminal receives a third operation input by the user on the third interface. The third operation is used to deselect a third image, where the third image is an image among the Y first images and / or the third image is an image among the L target images.
[0171] In this embodiment, the third interface displayed by the terminal includes target images and first images. The user may deselect from the above two types of images, that is, remove the images that have nothing to do with the management purpose. Based on this, the terminal may receive the third operation of the user for the third image that needs to be removed. The above-mentioned third operation is specifically used to select the third image, and the third operation includes operations such as clicking, double-clicking, long-pressing, and sliding selection. Figure 22 FIG. shows a schematic diagram of the third operation provided by an embodiment of the present application. Referring to Figure 22 as shown, the user may select the third image to be deselected in the third interface. The third image may be a target image determined based on the user's first operation or a first image similar to the target image. The number of third images selected by the third operation may be one or multiple, which is not limited herein.
[0172] Step 306: In response to the third operation, the terminal displays a fourth interface. The fourth interface includes images other than a fourth image among all the images displayed on the third interface. The fourth image includes the third image and a fifth image, and the similarity between the fifth image and the third image is greater than or equal to a preset threshold.
[0173] In this embodiment, the terminal responds to a third operation initiated by the user and displays a fourth interface. Figure 16 The figure shows a schematic diagram of the fourth interface provided by an embodiment of the present application. Refer to Figure 16 As shown in (a) in the figure, this fourth interface is an interface after deleting the fourth image selected by the user from the images displayed on the third interface, and the area where the deselected images have been removed is retained (for comparison Figure 22 It can be determined that the user deselected image 38 and image 68); of course, refer to Figure 16 As shown in (b) in the figure, rearrangement can also be performed based on the remaining images after deselection. The deselected images include the third image determined based on the third operation and the fifth image similar to the third image, and the method for determining the fifth image can refer to the description of determining the first image similar to the target image in the above embodiment. Details are not described herein again.
[0174] In a possible implementation manner, if the above management operation is a batch deletion operation, that is, images need to be batch deleted from an image group or a picture library. Then the above fourth interface displays the fourth image and the images in the multiple images except the first image and the target image. Refer to Figure 16 As shown in (c) in the figure, this fourth interface is an interface after deleting the first image and the target image except the fourth image from the multiple images, and the area where the deleted images have been removed is retained; of course, refer to Figure 16 As shown in (d) in the figure, the fourth interface can also be an interface obtained after rearrangement based on the remaining images after deletion (that is, the fourth image and the images in the multiple images except the first image and the target image).
[0175] Figure 17 The figure shows a schematic diagram of an interface for creating an image group provided by an embodiment of the present application. Refer to Figure 17 As shown, Figure 17 As shown in (a) in the figure, it is a schematic diagram of the second interface. After the user selects all the images, the user can click the control of "Add New Category", and the terminal will display the display interface of the newly created image group, that is Figure 17 As shown in (b) in the figure; optionally, the terminal can also display the images included in the image group to be created and a prompt box for prompting confirmation of creation. As Figure 17 As shown in (c) in the figure, when the terminal detects that the user clicks the control for prompting confirmation of creation, the first image and the target image are added to the same image group to obtain Figure 17 As shown in (b) in the figure. Of course, the user can also select the deselected images (that is, the images that do not need to be added to the image group) in the prompt box displaying the images in the image group to be created (including the target image and the first image similar to the target image), and the terminal identifies the deselected images by the user as the images that do not need to be added. Refer to Figure 17In (d) among them, the user selects image 46 and image 68, and when receiving the control clicked and confirmed by the user to create, the first image and the target image other than the deselected images above are added to the image group. Then the terminal will finally add the other images except the above two images to the image group. See Figure 17 (e) among them.
[0176] In a possible embodiment, before the terminal displays the fourth interface, the method provided by the embodiment of the present application further includes: according to the different image types of the third image selected by the user's third operation, the way of identifying the fifth image may be different. The image type includes the first type of the target image determined by the user's first operation and the second type of the first image similar to the target image. The terminal will determine whether the selected filtered image is of the first type or the second type. The recognition processes of the fifth image corresponding to different image types are different, and specifically may include the following two situations, which are specifically described as follows:
[0177] Method 1
[0178] Step 1: If the third image is an image among the L target images, the terminal determines at least one first image from the Y first images, and at least one first image is associated with the third image.
[0179] Illustrated by way of example, in combination with Figure 4 (g) among them, if the third image is image 2, the terminal determines that at least one first image similar to image 2 is image 23, image 68, image 115, image 189, image 231, image 251, image 288, image 398, image 435, and image 477.
[0180] In this embodiment, if the user selects the image to be deselected in the third operation as the target image selected by the user in the previous first operation, the first image added to the third interface based on the target image also needs to be removed, so as to greatly reduce the removal operation of the user.
[0181] In this embodiment, the terminal can identify the target images associated with each first image in the third interface. If the first image includes an associated image list (the associated image list is used to determine the target image associated with the first image), it is judged whether the third image selected in the third operation is included in the associated object list. If the associated image list of the first image includes the above third image, it is recognized that the first image and the third image have an associated relationship, that is, the above at least one first image.
[0182] It should be noted that since the target images selected by the user all correspond to the same image group, there is a certain similarity between the target images. In this case, there will also be overlaps in the first images recognized based on the target images, that is, the first image can be similar to multiple target images. Therefore, the associated image list configured for the first image can contain multiple target images, that is, one first image can correspond to multiple target images. If the third image is included in the above-mentioned associated object list, then recognize the first image as the at least one first image, and execute the corresponding association recognition process according to the number of target images associated in the associated image list.
[0183] In this embodiment, if only the third image is included in the associated object list, that is, the first image has and only has one corresponding target image, and this target image is the third image that the user needs to select in the third operation, then perform the operation in step 2; on the contrary, if other target images other than the third image are included in the associated image list, that is, the first image corresponds to multiple target images, then perform the operations in step 3 and step 4.
[0184] Step 2: If at least one first image is only associated with the third image, the terminal determines that the at least one first image is the fourth image.
[0185] If each of the above images 23, 68, 115, 189, 231, 251, 288, 398, 435, and 477 is only associated with image 2, then the fourth image is images 23, 68, 115, 189, 231, 251, 288, 398, 435, and 477.
[0186] In this embodiment, since only the third image that the user needs to select in the third operation is included in the associated image list of the first image, it means that the first image is based on the third image by the terminal and added to the third interface. Subsequently, the third image does not conform to the management purpose (for example, the image group to be created or the image type to be deleted), so the first image selected based on the third image will also definitely not conform to the management purpose. Therefore, the first image will be recognized as the fourth image, that is, the image that needs to be selected.
[0187] Step 3: If the at least one first image is associated with other images in the L target images except the third image in addition to being associated with the third image, the terminal determines the image similarity between the at least one first image and the third image.
[0188] If each of the above-mentioned images 23, 68, and 115 is associated with images 2, 8, and 13 (where images 2, 8, and 13 are target images determined based on a first operation in a second interface), and image 2 is a third image determined based on a third operation in a third interface, the terminal needs to determine whether images 23, 68, and 115 are more similar to image 2 or to image 8. Therefore, taking image 23 as an example, images 68 and 115 can both perform the recognition operation of the fifth image in the following manner. The terminal calculates the similarity between image 23 and image 2 (i.e., the third image), which is the above-mentioned image similarity; then, the terminal calculates the first similarity between image 23 and image 8, and the second similarity between image 23 and image 13 (images 8 and 13 are other associated target images except the third image), and selects the maximum value from the first similarity and the second similarity as the maximum similarity threshold; the terminal compares the image similarity value with the maximum similarity value to determine the target image that is most similar to image 23.
[0189] In this embodiment, if the associated image list of the first image contains other target images in addition to the third image, that is, the first image is not simply added to the third interface based on the third image, but may be added to the third interface based on other target images. In this case, the terminal needs to determine which target image the first image is most similar to. If the first image is most similar to the third image, that is, the image content similarity is large, since the third image does not conform to the management purpose, then the first image probably does not conform to the management purpose either; conversely, if the first image is not most similar to the third image, since the other target image that is most similar to the first image matches the management purpose, then the first image probably matches the management purpose. Therefore, the terminal calculates the image similarity between the first image and the third image, and the image similarity between the first image and other target images to determine the target image that the first image is most similar to.
[0190] In this embodiment, the way for the terminal to determine the image similarity between two images can be determined according to the image classification labels between the above two images. Specifically, the first image and the target image can have multiple image classification labels, and each image classification label corresponds to a label weight. The label weight can be determined according to the size of the area occupied by the corresponding label content in the image. The terminal can identify the same image classification labels between the above two images and calculate the image similarity between the two images according to the label weights of each same image classification label.
[0191] In a possible implementation, when the terminal calculates the image similarity between the above two images, it can be determined based on the vector distance between the image feature vectors of the two images. The specific implementation method can be the implementation method of the above embodiment, which will not be elaborated here.
[0192] It should be noted that the implementation process of the terminal calculating the image similarity between the first image and other target images can refer to any of the above methods, which will not be elaborated here.
[0193] In this embodiment, if the image similarity between the first image and the third image is less than or equal to the maximum correlation threshold corresponding to other target images, it is recognized that the target image most similar to the first image is not the third image selected by the user's third operation, but other target images. At this time, it is not necessary to recognize the first image as the fourth image; on the contrary, if the image correlation degree between the first image and the third image is greater than the above maximum correlation threshold, the operation of S1304 is executed. The above maximum correlation threshold is specifically: calculate the image similarity between the first image and each other target image, and select the one with the largest image similarity as the above maximum similarity threshold.
[0194] Step 4: If the image similarity is greater than the maximum similarity threshold between the at least one first image and the other images, the terminal determines the at least one first image as the fourth image.
[0195] It should be noted that if an image is similar to both image a and image b, the corresponding label of the image may include the label corresponding to image a and the label corresponding to image b.
[0196] In this embodiment, if the terminal detects that the image correlation degree is greater than the above maximum correlation threshold, it is recognized that the first image is the most similar to the third image. At this time, the first image can be recognized as the fourth image.
[0197] Exemplarily, Figure 18 shows a schematic diagram for recognizing the fourth image provided by an embodiment of the present application. Refer to Figure 18As shown, the terminal can mark the coordinates corresponding to each image in the third interface on a preset image coordinate system. Among them, solid dots represent the target images selected based on the user's first operation, and hollow dots represent the first images selected based on the target images. Among them, the user selects Figure M1 as the third image from the target images. Among the associated image lists of Image P1 and Image P2, both contain Figure M1. Therefore, both Image P1 and Image P2 are recognized as the first images associated with the target image. Among them, there is only Figure M1 in the associated object list of Image P1. Therefore, the terminal recognizes Image P1 as the above at least one first image; while the associated object list of Image P2 contains other target images except Figure M1, namely Figure M2 and Figure M3. In this case, the terminal needs to calculate the image similarity between Image P2 and the above three target images, which are 1 / L1 to 1 / L3 respectively. Among them, the image similarity between the third image and the above at least one first image is 1 / L1, and the image similarity between the first image and other target images is 1 / L2 and 1 / L3. Since L3 is greater than L2, so 1 / L2 is greater than 1 / L3, that is, the image similarity between Figure M2 and Image P1 is the above maximum similarity threshold. The terminal can judge whether 1 / L1 is greater than the above 1 / L2, so as to judge that Image P2 is the fourth image. In this embodiment, 1 / L1 is greater than 1 / L2. Therefore, Image P2 is recognized as the fourth image.
[0198] In the embodiment of the present application, when the third image selected by the user is the target image, the first image most similar to the third image is selected as the fourth image, achieving the purpose of batch removing images, improving the efficiency of the removing operation, and reducing user operations.
[0199] Method 2
[0200] Step 5: If the third image is an image among the Y first images, the terminal calculates the first similarity between the third image and the sixth image, and the sixth image is the target image associated with the third image among the L target images.
[0201] If the above images 23, 68, 115, 189, 231 are associated with Image 2 (Image 2 is the target image determined based on the first operation in the first interface), and the third image determined by the third operation in the third interface is Image 23, the terminal calculates the similarity between Image 23 and Image 2 as the first similarity above. Then, the terminal determines whether the image similarity between Image 68 and Image 2 is greater than the first similarity between Image 23 and Image 2. If so, it identifies Image 68 and not the fourth image; conversely, if the image similarity between Image 68 and Image 2 is less than or equal to the first similarity between Image 23 and Image 2, the terminal identifies Image 68 as the fourth image. Images 115, 189, and 231 can all be identified in the same way as Image 68, which will not be elaborated here.
[0202] In this embodiment, if the terminal detects that the third image selected by the user's third operation is not the target image selected by the user's first operation but the first image determined based on the target image, it means that the terminal's automatic recognition of similar images does not match the management purpose. At this time, it is necessary to further identify other first images that do not match the management purpose from the first images corresponding to the sixth image according to the image similarity between the third image and its corresponding target image (i.e., the sixth image). The calculation process of the image similarity can refer to the relevant description of calculating the image similarity in the above embodiment, and the specific implementation process is the same, which will not be elaborated here.
[0203] In this embodiment, since the target image is selected based on the user's selection and the user manually judges and identifies that the target image belongs to this image group, the terminal will not identify the target image as the fourth image without the user manually selecting the target image to be removed. Therefore, in the operations of steps 5 and 6, only the first image is concerned, and the terminal will not identify whether the target image is the fourth image.
[0204] In this embodiment, since the first similarity can be used to determine the similarity degree between the third image and the sixth image, if the image similarity between the sixth image and other first images is less than the above first similarity, it is recognized that the similarity degree between this first image and the sixth image is lower than the similarity degree between the sixth image and the third image. Subsequently, the third image does not match the management purpose, and this other first image with a lower similarity degree to the sixth image will also definitely not match the management purpose, realizing the automatic recognition of the fourth image. Therefore, if the image similarity between the first image corresponding to the sixth image and the sixth image is greater than the above first similarity, there is no need to remove this first image; conversely, if the image similarity between the first image and the sixth image is less than or equal to the above first similarity, the operation of step 6 is executed.
[0205] Step 6. If the image similarity between the first image associated with the sixth image and the sixth image is less than or equal to the first similarity, the terminal determines the first image associated with the sixth image as the fourth image.
[0206] In this embodiment, if the image similarity between the first image associated with the sixth image and the sixth image is less than or equal to the first similarity, it means that the similarity between the first image and the sixth image is not higher than that between the first image and the third image. Subsequently, since the third image does not meet the management purpose, the first image with a lower similarity to the sixth image will also not meet the management purpose. Based on this, the first image that meets the above conditions will be identified as the fourth image.
[0207] Exemplarily, Figure 19 shows a schematic diagram for identifying the first image provided in another embodiment of the present application. Refer to Figure 19 As shown, the terminal can mark the coordinates corresponding to each image in the image group on a preset image coordinate system. Among them, the solid dots represent the target images selected based on the first operation, and the hollow dots represent the first images selected based on the target images. The terminal selects image P1 from the first images as the unselected third image according to the third operation. The target image corresponding to this third image is Figure M1. In addition to image P1, the first image corresponding to Figure M1 also includes image P2 and image P3. The vector distance between image P1 and Figure M1 is L1, the vector distance between image P2 and Figure M1 is L2, and the vector distance between image P3 and Figure M1 is L3, and L3 < L1 < L2. Therefore, since the vector distance between image P2 and the target image is greater than the vector distance between the target image and the third image, the corresponding similarity will be less than the first similarity, and image P2 will be identified as the fourth image. In contrast, since the vector distance between image P3 and the target image is less than the vector distance between the target image and the third image, the corresponding similarity is greater than the first correlation degree, and image P3 will be identified as an image that does not need to be removed and retained in the image group. Therefore, the terminal can determine the effective coverage range corresponding to the target image, that is, the circular area in the figure, according to the vector distance between the target image and the third image, and identify all other first images outside the circular area as the fourth images.
[0208] In the embodiment of the present application, other first images with a similarity lower than that of the third image are all identified as the fourth images, so that other images that need to be removed from the image group can be automatically identified, improving the removal efficiency, avoiding frequent selection operations by the user, and optimizing the user experience.
[0209] Step 7. Update the preset threshold corresponding to the target image based on the first similarity.
[0210] In this embodiment, the preset threshold is used to determine the first image similar to the target image among the multiple images.
[0211] In this embodiment, the terminal can adjust the preset threshold corresponding to the target image according to the first similarity. When the target image is first selected by the user, the above-mentioned preset threshold can be configured based on the default value, that is, for different target images, the preset threshold is the same. After the user selects a third image that does not match among the first images automatically selected by the terminal, the terminal can update the above-mentioned preset threshold according to the first similarity between the third image and its corresponding target image, so as to be able to configure a preset threshold that matches each different target image, thereby improving the accuracy of subsequent first image recognition. Since after a new image is added to the terminal, the target image associated with the newly added image can be recognized according to the updated preset threshold, and it can be judged whether to be automatically added to the image group based on the result of the associated recognition.
[0212] In a possible implementation manner, the preset threshold can be applicable to the image group, that is, there is a corresponding relationship between the preset threshold and the image group. If a target image contains multiple image classification labels, and each image classification label corresponds to an image group, that is, a target image can exist in multiple different image groups at the same time. In this case, the target image corresponds to different preset thresholds in different image groups.
[0213] Exemplarily, Table 1 shows an update list of the association thresholds provided in an embodiment of the present application. As shown in Table 1, the image group contains images M1 to M3. The preset thresholds pre-configured for the above three images are the same, all 60. Among them, after the terminal determines the target image and the first image, it selects the first images corresponding to M1 and M3 as the unselected images (that is, the third images). Based on this, the terminal can calculate the first similarities between the selected third images and M1 and M3, which are 70 and 65 respectively, and update the preset thresholds of the above two images based on the above first similarities. Since the first image corresponding to M2 is not selected as the third image, its corresponding association threshold remains unchanged.
[0214] Target image name Association threshold before update Association threshold after update Figure M1 60 70 Figure M2 60 60 Figure M3 60 65
[0215] Table 1
[0216] In the embodiment of the present application, dynamically adjusting the preset threshold of the corresponding target image according to the third image selected by the user can improve the accuracy of subsequent first image recognition, improve the accuracy of image management, and reduce user operations.
[0217] In a possible implementation, the above first operation may include an operation of configuring the label settings of the newly created image group, that is, configuring a label name for the image group to be created. The label name specifically configures the unique identifier of the image classification label corresponding to the created image group. Exemplarily, the label name may be "kapok", "bubble tea", etc. In a possible implementation, if the first operation includes a label name, the terminal may determine whether there is an existing image classification label in the current image library that is the same as the above label name. If not, it recognizes that the label name is valid and uses the label name as the image classification label corresponding to the subsequently created image group; otherwise, it recognizes that there is a conflict with the label name. In the case where the label name conflicts with the existing image classification label, the terminal may output a conflict prompt message so that the user can change the label name or add the target image to be classified to the image group with the existing image classification label. Optionally, the terminal may retain two identical image classification labels and create a new image group based on the label name corresponding to the first operation. Exemplarily, if the label name of the image group to be created this time is "flower", and there is already an image group about "flower" in the image library, in this case, the terminal may configure the image classification label of the image group to be created this time as "flower 1" and keep the stored image classification label unchanged; or it may configure the stored image classification label as "flower 1" and configure the image classification label of the image group to be created this time as "flower 2", so as to retain two identical image classification labels while avoiding the conflict of the image classification labels of the above two image groups.
[0218] In a possible implementation, the above first operation may not include an operation of configuring the label settings of the newly created image group, that is, no label name is configured for the newly created image group. In this case, the terminal may configure a default classification label for the image group to be created this time, such as "new image group". Similarly, consistent with the above label configuration method, it can be detected whether there is an existing image classification label in the currently existing image groups that is the same as the default configuration this time. If so, the default classification label configured this time can be adjusted. For example, if the existing image classification labels already include the image group corresponding to "new image group", the default classification label configured this time can be adjusted to "new image group 2", so as to avoid the conflict of the image classification labels of the above two image groups.
[0219] In a possible implementation, the above image classification labels may include multiple classification levels, and different levels can be distinguished by a preset delimiter. For example, "flower\kapok". In this case, the terminal can identify whether each upper-level image classification label exists. If it exists, an image group corresponding to the lower-level image classification label is created within the image group corresponding to the upper-level image classification label. For example, if there is an image group of "flower" in the image library, an image group of "kapok" can be created within the image group corresponding to "flower". If the upper-level image classification label does not exist, an image group of the upper-level image classification label can be created and an image group corresponding to the lower-level image classification label can be created within the created image group of the upper-level image classification label. For example, if there are no image groups of "flower" and "kapok" in the image library, an image group of "flower" can be created in the image library first, and then an image group of "kapok" can be created within the image group of "flower". It should be noted that the cascading relationship of the above image groups is used to define the access path of each image group. For example, when a user needs to access the image group of "kapok", they need to first access the image group of the above image classification label, that is, access the image group of "flower", and in the display interface corresponding to the image group of "flower", click the control corresponding to the image group of "kapok" to access the image group of "kapok".
[0220] In a possible implementation, the terminal may be provided with a return control in the first interface. This return button is used to exit the mode of creating a new image classification label, that is, to stop responding to the above first operation. The terminal detects that the user clicks the return control to exit the image management operation. If a new image group is created in the image library based on the first operation, the above image group is deleted. Optionally, the terminal may be configured with an exit gesture for exiting the new image management process. For example, swipe left a certain distance. If it is detected that the touch operation initiated by the user matches the above exit gesture, the mode of creating a new image classification label is exited.
[0221] In this embodiment, the above management of images includes creating an image group: after the terminal determines each target image and the first image corresponding to the target image from the image library, the above two types of images can be recognized as the same type and thus added to the same image group. This image group is created based on the management instruction initiated by the user. After being added to this image group, the terminal can configure the image classification labels of all images within the image group according to the group alias corresponding to the image group (this image classification label can be created according to the image classification instruction or can be the preset default label content). For example, if the group name of an image group is "kapok", the image classification labels of all images within this image group can be configured as "kapok". This image group contains the target images selected by the user and the first images associated with the target images selected from the images.
[0222] In a possible implementation, the terminal can generate an image group confirmation interface, in which thumbnails of the target images selected by the user and the first images corresponding to the target images can be displayed. If the terminal detects that the user clicks the confirmation control set in the image group confirmation interface, the above two types of images will be added to the created image group, and image classification labels for each image will be configured; conversely, if the user clicks the return control, it means that there are pictures of different categories in the image group, and the above target images and first images will not be added to the same image group. Optionally, the terminal can only add the target images selected by the user to the above image group.
[0223] In a possible implementation, after the terminal displays the above image group confirmation interface, a timer can be configured to determine the display duration of the confirmation interface. If the display duration is greater than the preset duration threshold and no confirmation instruction feedback from the target user is received, the first image and the target image will be added to the above created image group.
[0224] It should be noted that after the terminal adds the target image and the first image to the image group, the target image and the first image can be deleted from the original image group, or the above two types of images can be retained in the original image group. Since an image can be configured with multiple different image classification labels, that is, an image can correspond to multiple different types of shooting content. In this case, an image can be associated with different image groups at the same time. Therefore, when the terminal adds the target image and the first image to the newly created image group, it is not necessary to delete the above two types of images from the original image group.
[0225] Example B: For deleting images from the gallery or image group:
[0226] Step 1: The terminal receives the fourth operation input by the user.
[0227] Step 2: The terminal deletes L of the target images and Y of the first images.
[0228] For example, if the terminal detects that the user clicks the "Delete" control in the first interface (the control 204 shown in (b) of Figure 4 ), the image deletion mode will be entered, and the first operation for selecting L target images will be received in the first interface, and Y first images similar to the target images will be determined from M images. The method for determining the first images can refer to the relevant description in Example A and will not be elaborated here. The terminal can delete L target images and Y first images.
[0229] Figure 20 shows a schematic diagram of the interface for batch deleting images provided by an embodiment of the present application. Refer to Figure 20 as shown.Figure 20 (a) in it is a schematic diagram of the second interface. After the user selects all the images, the user can click the control of "Delete Image", and the terminal will display the images to be deleted and a prompt box for confirming deletion, such as Figure 20 shown in (b) in it. When the terminal detects that the user clicks the control for confirming deletion, the first image and the target image will be deleted from the image library or the corresponding image group, and the interface shown in (c) in Figure 20 it is obtained. Of course, the user can also select the unselected images (i.e., the images that do not need to be deleted) in the prompt box that displays the images to be deleted (including the target image and the first image similar to the target image). The terminal recognizes the unselected images by the user as images that do not need to be deleted, and when receiving the user's click on the control for confirming deletion, deletes the first image and the target image except the above unselected images. Refer to (d) in Figure 20 it. If the user unselects image 46 and image 68, then the terminal will finally delete the other images except the above two images, and the interface shown in (e) in Figure 20 it is obtained.
[0230] As can be seen from the above, a method for image management provided by an embodiment of the present application can, when image management is required, for example, when a new image group needs to be created or some images in an image group need to be removed, manually select the target image by the user, and then the terminal can select at least one first image associated with the target image from the candidate images according to the selected target image, and manage the first image and the target image selected by the user, such as dividing them into the same image group or removing the first image group, realizing the management of the image group. Compared with the existing image management technology, it can manually select a part of the images related to the target image by the user, and then select the first images related to the target image from the candidate images, realizing the fast batch management of images, realizing the creation of a new image group or the fast adjustment of an existing image group based on the existing classification model, and improving the accuracy of image management and the management efficiency of images.
[0231] Figure 21 It shows a specific implementation flowchart of a method for image management provided by the third embodiment of the present application. Refer to FIG. 21. Compared with Figure 3 the above embodiment, in a method for image management provided by this embodiment, after managing the target image and the first image according to the management instruction, it further includes: Step 2101 to Step 2102, which are specifically described in detail as follows:
[0232] Step S2101: If there is a seventh image added to the image library, determine the image similarity between the seventh image and each of the target images.
[0233] In this embodiment, the seventh image is specifically an image newly added to the image library. After the terminal creates an image group, the terminal can automatically identify whether the subsequently added image matches the image group, and if it matches, add the newly added image to the image group, realizing automatic expansion of the images in the image group.
[0234] In this embodiment, if the terminal detects that a new image (i.e., the seventh image) is added to the image library, it can calculate the image similarity between the new image and each target image in the image group. It should be noted that if there are multiple target images in the image group, it is necessary to calculate the image similarity between the new image and multiple target images respectively, and each target image corresponds to an image similarity.
[0235] In a possible implementation manner, when the terminal calculates the image similarity between the above two images, it can be determined based on the vector distance between the image feature vectors of the two images. The specific implementation manner can be the implementation manner of the above embodiment and will not be elaborated here. The terminal can calculate the image similarity between the new image and the target image based on the reciprocal of the vector distance. If the vector distance corresponding to the above two images is larger, the corresponding image similarity is smaller; conversely, if the vector distance corresponding to the above two images is smaller, the corresponding image similarity is larger.
[0236] Step 2102: If the image similarity is greater than the preset threshold of the target object corresponding to the image similarity, add the seventh image to the image group to which the target image belongs.
[0237] In this embodiment, if the image similarity between the newly added image and a certain target image is greater than the preset threshold corresponding to the target image, it means that the image content of the newly added image is highly similar to the target image and is relatively consistent with the content corresponding to the image group, and the newly added image is added to the image group; conversely, if the image similarity between the newly added image and each target image is less than or equal to the preset threshold, it is recognized that the image content of the newly added image does not match the image group, and the newly added image is not added to the above image group.
[0238] Exemplarily, Figure 22 shows a recognition schematic diagram of adding a newly added image to an image group provided by an embodiment of the present application. Refer to Figure 22As shown in the figure, the terminal can mark the coordinates corresponding to each image in the image group on a preset image coordinate system. Among them, solid dots represent the target images selected by the user, and hollow dots represent the first images selected based on the target images. Different target images can be configured with the same preset threshold or different preset thresholds. The determination of the preset threshold can be referred to the above embodiments. According to different preset thresholds, the effective coverage ranges corresponding to different target images can be determined. Among them, M1, M2, and M3 are the target images included in the image group, and P1 is a newly added image. The terminal can calculate the image similarity between the newly added image and each of the above target images (specifically, the vector distance from the newly added image to each target image in this embodiment). As can be seen from the figure, the image similarity between the image P1 and the images M1 and M2 is greater than the corresponding preset threshold, while the image similarity between the image P1 and the image M3 is less than the corresponding association threshold. Therefore, the image P1 can be added to the image group.
[0239] In the embodiment of the present application, after receiving a newly added image, the similarity between the newly added image and each target image can be recognized, and it can be determined whether to add it to the image group, realizing the automatic expansion of the image group, improving the efficiency of the classification operation, and reducing the expansion operation of the user.
[0240] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0241] Corresponding to the method for image management described in the above embodiments, Figure 23 The structural block diagram of the image management device provided by the embodiment of the present application is shown. For the sake of convenience of description, only the parts related to the embodiment of the present application are shown.
[0242] Referring to Figure 23 , the image management device includes:
[0243] The first interface display unit 231 is configured to display a first interface, where the first interface includes N images, 2 ≤ N ≤ M;
[0244] The first operation receiving unit 232 is configured to receive a first operation input by the user for L target images among the M images, 1 ≤ L;
[0245] A second interface display unit 233, configured to display a second interface in response to the first operation, where the second interface at least includes L of the target images, Q first images among the N images, and P second images among the N images. In the second interface, L of the target images and Q of the first images are in a marked state. The similarity between the first images and the target images is greater than or equal to a preset threshold, 1 ≤ Q, and Q + L + P ≤ M, 0 ≤ P, and M, N, L, Q, and P are all integers;
[0246] An image management unit 234, configured to manage L of the target images and Y of the first images among the M images, where Y of the first images include Q of the first images, and Y is an integer.
[0247] Optionally, the image management unit 234 includes:
[0248] A second operation receiving unit, configured to receive a second operation input by a user;
[0249] A third interface display unit, configured to display a third interface in response to the second operation, where the third interface includes L of the target images and Y of the first images.
[0250] Optionally, the image management device further includes:
[0251] A third operation receiving unit, configured to receive a third operation on a third image input by the user in the third interface, where the third operation is used to deselect the third image, and the third image is an image among Y of the first images and / or the third image is an image among L of the target images;
[0252] A fourth interface display unit, configured to display a fourth interface in response to the third operation, where the fourth interface includes images other than a fourth image among all the images displayed in the third interface, and the fourth image includes the third image and a fifth image, and the similarity between the fifth image and the third image is greater than or equal to a preset threshold.
[0253] Optionally, the image management device further includes:
[0254] A target image deselection unit, configured to, if the third image is an image among L of the target images, the terminal determines at least one first image from Y of the first images, and the at least one first image is associated with the third image;
[0255] A first type of image deselection unit, configured to, if the at least one first image is only associated with the third image, the terminal determines the at least one first image as the fourth image;
[0256] The second - type image deselection unit is configured to, if in addition to being associated with the third image, the at least one first image is also associated with other images among the L target images except the third image, the terminal determines the image similarity between the at least one first image and the third image.
[0257] The maximum similarity threshold comparison unit is configured to, if the image similarity is greater than the maximum similarity threshold between the at least one first image and the other images, the terminal determines the at least one first image as the fourth image.
[0258] Optionally, the image management device further includes:
[0259] The first - image deselection unit is configured to, if the third image is an image among the Y first images, the terminal calculates the first similarity between the third image and the sixth image, and the sixth image is the target image associated with the third image among the L target images.
[0260] The first - similarity comparison unit is configured to, if the image similarity between the first image associated with the sixth image and the sixth image is less than or equal to the first similarity, the terminal determines the first image associated with the sixth image as the fourth image.
[0261] Optionally, the image management device also further includes:
[0262] The threshold adjustment unit is configured to update the preset threshold corresponding to the target image based on the first similarity.
[0263] Optionally, the image management device further includes:
[0264] The similarity calculation unit is configured to determine the similarity between each of the M images and the target image.
[0265] The similarity comparison unit is configured to determine the images among the M images whose similarity with the target image is greater than or equal to the preset threshold as the first images.
[0266] Optionally, the similarity calculation unit includes:
[0267] The vector distance calculation unit is configured to determine the vector distance between the feature vector of each image and the target feature vector of the target image according to the feature vector of each image and the target feature vector of the target image.
[0268] The vector - distance conversion unit is configured to determine the similarity between each image and the target image according to the vector distance.
[0269] Optionally, the image management unit 234 includes:
[0270] A fourth operation receiving unit, configured to receive a fourth operation input by the user;
[0271] An image deletion unit, configured to delete L of the target images and Y of the first images.
[0272] Figure 24 FIG. is a schematic structural diagram of a terminal provided in an embodiment of the present application. As Figure 24 shown, the terminal 24 of this embodiment includes: at least one processor 240 ( Figure 24 only one is shown in the figure), a processor, a memory 241, and a computer program 242 stored in the memory 241 and executable on the at least one processor 240. When the processor 240 executes the computer program 242, the steps in any of the above method embodiments of image management are implemented.
[0273] The terminal 24 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal may include, but is not limited to, a processor 240 and a memory 241. Those skilled in the art can understand that Figure 24 merely examples of the terminal 24, and do not constitute a limitation on the terminal 24. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0274] The so-called processor 240 may be a central processing unit (CPU). The processor 240 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0275] The memory 241 may be an internal storage unit of the terminal 24 in some embodiments, such as a hard disk or memory of the terminal 24. The memory 241 may also be an external storage device of the terminal 24 in some other embodiments, such as a plug-in hard disk equipped on the terminal 24, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 241 may also include both the internal storage unit of the terminal 24 and external storage devices. The memory 311 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as program codes of the computer program, etc. The memory 311 may also be used to temporarily store data that has been output or is to be output.
[0276] It should be noted that, for the information interaction, execution process, etc. between the above-mentioned device / units, since they are based on the same concept as the method embodiments of the present application, for their specific functions and the technical effects brought, reference may be specifically made to the method embodiment part, and details will not be elaborated here.
[0277] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional unit and module is used for illustration. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments, and details will not be elaborated here.
[0278] An embodiment of the present application further provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and when the processor executes the computer program, the steps in any of the above method embodiments are implemented.
[0279] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments can be implemented.
[0280] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can execute to implement the steps in the above-mentioned method embodiments.
[0281] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / terminal, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0282] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0283] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0284] In the embodiments provided in the present application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.
[0285] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0286] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for image management, characterized in that, The terminal has M images, and the method includes: The terminal displays a first interface, and the first interface includes N images, where 2 ≤ N ≤ M; The terminal receives a first operation input by the user for L target images among the M images, where 1 ≤ L; In response to the first operation, the terminal displays a second interface, and the second interface includes at least L of the target images, Q first images among the N images, and P second images among the N images. In the second interface, L of the target images and Q of the first images are in a marked state, the similarity between the first images and the target images is greater than or equal to a preset threshold, 1 ≤ Q, and Q + L + P ≤ M, 0 ≤ P, and M, N, L, Q, and P are all integers; The terminal manages L of the target images and Y of the first images among the M images, and Y of the first images include Q of the first images, where Y is an integer; The terminal manages L of the target images and Y of the first images among the M images, including: The terminal receives a second operation input by the user; In response to the second operation, the terminal displays a third interface, and the third interface includes L of the target images and Y of the first images; After the terminal displays the third interface in response to the second operation, the method further includes: The terminal receives a third operation input by the user on the third interface for a third image, and the third operation is used to deselect the third image, and the third image is an image among Y of the first images and / or the third image is an image among L of the target images; In response to the third operation, the terminal displays a fourth interface, and the fourth interface includes all the images displayed in the third interface except a fourth image, and the fourth image includes the third image and a fifth image, and the similarity between the fifth image and the third image is greater than or equal to a preset threshold; Before the terminal displays the fourth interface, the method further includes: If the third image is an image among L of the target images, the terminal determines at least one first image from Y of the first images, and the at least one first image is associated with the third image; If the at least one first image is only associated with the third image, the terminal determines the at least one first image as the fourth image; If the at least one first image is associated with other images among L of the target images in addition to being associated with the third image, the terminal determines the image similarity between the at least one first image and the third image; If the image similarity is greater than the maximum similarity threshold between the at least one first image and the other images, the terminal determines the at least one first image as the fourth image.
2. The method according to claim 1, wherein Before the terminal displays the fourth interface, the method further includes: If the third image is one of the Y first images, the terminal calculates a first similarity between the third image and a sixth image, where the sixth image is a target image associated with the third image among the L target images; If an image similarity between a first image associated with the sixth image and the sixth image is less than or equal to the first similarity, the terminal determines the first image associated with the sixth image as the fourth image.
3. The method according to claim 2, wherein It further includes: Based on the first similarity, update the preset threshold corresponding to the target image.
4. The method according to any one of claims 1 to 3, characterized in that, Before displaying the second interface on the terminal, the method further includes: The terminal determines a similarity between each of the M images and the target image; The terminal determines, as the first image, an image among the M images whose similarity to the target image is greater than or equal to a preset threshold.
5. The method according to claim 4, characterized in that, The terminal determining a similarity between each of the M images and the target image includes: The terminal determines a vector distance between the feature vector of each image and the target feature vector of the target image according to the feature vector of each image and the target feature vector of the target image; The terminal determines the similarity between each image and the target image according to the vector distance.
6. The method according to any one of claims 1 to 3, characterized in that The terminal managing the L target images and the Y first images among the M images includes: The terminal receives a fourth operation input by the user; The terminal deletes the L target images and the Y first images.
7. An apparatus for image management, characterized in that, The device has M images, and the device includes: A first interface display unit for displaying a first interface, where the first interface includes N images, 2 ≤ N ≤ M; A first operation receiving unit for receiving a first operation input by the user for L target images among the M images, 1 ≤ L; A second interface display unit for, in response to the first operation, the terminal displaying a second interface, where the second interface at least includes the L target images, Q first images among the N images, and P second images among the N images. In the second interface, the L target images and the Q first images are in a marked state, and the similarity between the first image and the target image is greater than or equal to a preset threshold, 1 ≤ Q, and Q + L + P ≤ M, 0 ≤ P, and M, N, L, Q, and P are all integers; An image management unit for managing the L target images and the Y first images among the M images, where the Y first images include the Q first images, and Y is an integer; The image management unit includes: A second operation receiving unit for receiving a second operation input by the user; A third interface display unit for, in response to the second operation, the terminal displaying a third interface, where the third interface includes the L target images and the Y first images; The image management device further includes: A third operation receiving unit, configured to receive a third operation input by a user on the third interface for the third image, where the third operation is used to select the third image, and the third image is an image among the Y first images, and / or, the third image is an image among the L target images; A fourth interface display unit, configured to display a fourth interface in response to the third operation, where the fourth interface includes images other than a fourth image among all the images displayed in the third interface, and the fourth image includes the third image and a fifth image, and the similarity between the fifth image and the third image is greater than or equal to a preset threshold; The apparatus for image management further includes: A target image deselection unit, configured to if the third image is an image among the L target images, then the terminal determines at least one first image from the Y first images, and the at least one first image is associated with the third image; A first type of image deselection unit, configured to if the at least one first image is only associated with the third image, then the terminal determines the at least one first image as the fourth image; A second type of image deselection unit, configured to if the at least one first image is associated with other images among the L target images in addition to being associated with the third image, the terminal determines the image similarity between the at least one first image and the third image; A maximum similarity threshold comparison unit, configured to if the image similarity is greater than the maximum similarity threshold between the at least one first image and the other images, the terminal determines the at least one first image as the fourth image.
8. A terminal, characterized in that, Including a processor, where the processor is configured to execute a computer program or instruction stored in a memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, The computer program, when executed by the processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Photograph album management method, photograph album management apparatus and terminal equipment
CN105069016A