CN112732961A - Image classification method and device - Google Patents

Image classification method and device Download PDF

Info

Publication number
CN112732961A
CN112732961A CN202110010035.3A CN202110010035A CN112732961A CN 112732961 A CN112732961 A CN 112732961A CN 202110010035 A CN202110010035 A CN 202110010035A CN 112732961 A CN112732961 A CN 112732961A
Authority
CN
China
Prior art keywords
category
label
labels
class
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110010035.3A
Other languages
Chinese (zh)
Inventor
陈虎
沈松杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110010035.3A priority Critical patent/CN112732961A/en
Publication of CN112732961A publication Critical patent/CN112732961A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

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

Abstract

The application discloses an image classification method and device, and belongs to the technical field of communication. The image classification method comprises the following steps: receiving a first input of a user; responding to a first input, displaying N category labels corresponding to a target image, wherein N is an integer greater than or equal to 2; receiving a second input of the user for a target category label, wherein the target category label is one of N category labels; and responding to the second input, and saving the target image to a target category album corresponding to the target category label. According to the technical scheme, the target images can be stored in the corresponding target category photo album, the target images can be accurately classified and the user requirements can be met, and meanwhile the classification diversification can be guaranteed.

Description

Image classification method and device
Technical Field
The application belongs to the technical field of communication, and particularly relates to an image classification method and device.
Background
Along with the continuous upgrading of electronic equipment hardware, the shooting function of electronic equipment is continuously promoted, the image effect obtained by shooting with electronic equipment is better and better, the album function of storing shot images is also continuously improved, and more users select to shoot with electronic equipment. With the increasing content stored in the photo albums of electronic devices, classifying images becomes a preferred way for facilitating effective management of images.
In the prior art, when image classification is performed, image content is generally identified based on an intelligent classification algorithm, and images are summarized into corresponding categories according to identification results. However, in general, a single image may have multiple element labels, and when the image is classified according to content identification, multiple categories may be determined, and at this time, the category with the highest association degree with the image is usually determined as the image category by the intelligent classification algorithm.
Disclosure of Invention
The embodiment of the application aims to provide an image classification method and device, which can solve the problem of inaccurate classification in an image classification mode in the prior art to a certain extent.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an image classification method, including:
receiving a first input of a user;
responding to the first input, and displaying N category labels corresponding to the target image, wherein N is an integer greater than or equal to 2;
receiving a second input of a user for a target category label, wherein the target category label is one of the N category labels;
and responding to the second input, and saving the target image to a target category photo album corresponding to the target category label.
In a second aspect, an embodiment of the present application provides an image classification apparatus, including:
the first receiving module is used for receiving a first input of a user;
the display module is used for responding to the first input and displaying N category labels corresponding to the target image, wherein N is an integer greater than or equal to 2;
a second receiving module, configured to receive a second input of a user for a target category tag, where the target category tag is one of the N category tags;
and the storage module is used for responding to a second input and storing the target image to a target category photo album corresponding to the target category label.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a program or instructions stored on the memory and executable on the processor, which when executed by the processor, implement the steps in the image classification method according to the first aspect.
In a fourth aspect, the present application provides a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the image classification method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the image classification method according to the first aspect.
In the embodiment of the application, by displaying the N category labels for the target image, at least two category labels can be provided for a user to select, the user determines the target category label from the N category labels, the target image is stored in the target category album corresponding to the target category label, accurate classification of the target image and personalized classification requirements of the user can be met through simple operation, and meanwhile, due to the fact that the at least two category labels are provided, classification diversification can be achieved.
Drawings
Fig. 1 is a schematic flowchart of an image classification method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating a classification control displayed on a shooting interface according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a control object class label highlighting provided by an embodiment of the present application;
FIG. 4 is a schematic diagram showing first category labels and second category labels provided by an embodiment of the present application;
FIG. 5a is a schematic diagram illustrating a rotation operation performed on a sort control according to an embodiment of the present application;
FIG. 5b is a diagram illustrating an updated classification control provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a lock target class tag provided by an embodiment of the present application;
fig. 7 is a flowchart of an example of determining a target category label from N first category labels and classifying and saving a target image according to an embodiment of the present application;
fig. 8 is a flowchart of an example of determining a target category label from a first category label and a second category label and classifying and saving a target image according to an embodiment of the present application;
fig. 9 is a block diagram of an image classification apparatus provided in an embodiment of the present application;
FIG. 10 is a block diagram of an electronic device provided by an embodiment of the application;
fig. 11 is a second schematic block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in other sequences than those illustrated or otherwise described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense to distinguish one object from another, and not necessarily to limit the number of objects, e.g., the first object may be one or more. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The image classification method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
An embodiment of the present application provides an image classification method, as shown in fig. 1, including:
step 101, the electronic device receives a first input of a user.
The image classification method provided by the embodiment of the application is applied to an electronic device, wherein the electronic device may first receive a first input performed by a user, where the first input may be a first input for a target image or an input for a display interface corresponding to the target image, and the first input includes, but is not limited to, a click input, a press input, and a slide input.
And 102, the electronic equipment responds to the first input, and displays N category labels corresponding to the target image, wherein N is an integer greater than or equal to 2.
The electronic device, after receiving the first input, may display at least two category labels for the target image in response to the first input. The target image may be an image photographed in real time, or may be an image stored in the local image database without classification. For the image shot in real time, after the shooting is completed, the N category labels may be displayed according to a first input of the user, and the N category labels are displayed through the category control, where the first input may be a first input performed on a shooting key or a first input for a target image obtained by shooting. Specifically, after the shooting is completed, displaying a blank classification control, and displaying N class labels corresponding to the target image through the classification control according to a first input of a user; after shooting is completed, a classification control including a class label corresponding to a previous image is displayed, and the class label in the classification control is updated according to a first input of a user, that is, N class labels corresponding to a target image are displayed through the classification control. Optionally, the classification control (which may be a blank classification control or a classification control including a class label corresponding to a previous image) may also be displayed after the shooting is completed, and if no input for the current display interface is detected within the first duration, N class labels corresponding to the target image are triggered to be displayed through the classification control. For an unclassified image stored in the local image database, a classification control including N category labels corresponding to a target image may be displayed according to a first input of a user on a selected image (target image), and before the first input is not performed on the target image, a blank classification control or a classification control including a category label corresponding to a previous image may be displayed.
The form of the classification control is not particularly limited, and may be annular, rectangular, and the like. The classification control can display at least two class labels, wherein the class labels are associated with the target images and are the class information of the target images acquired through the correlation processing.
In the case that the target image is an image shot in real time, the display of the classification control including the N classification labels corresponding to the target image is triggered after the shooting is completed, so that the realization of rapid classification can be ensured. For example, referring to fig. 2, after the target image is captured and acquired, the captured target image is displayed on the capture interface, at this time, display of a classification control including N class labels corresponding to the target image may be triggered (e.g., triggered according to a first input of a user), a concentric ring-shaped classification control emerges centering on a capture key, and a place class label, a sky class label, a travel class label, and a landscape class label are displayed on the ring, so that a guarantee is provided for fast classification.
For the situation that the target image is an unclassified image in the local image database, when the user browses the local image database, the display of the classification control comprising the N class labels corresponding to the target image can be triggered after the user selects the target image, so that the classification of the stored image is realized.
Step 103, the electronic device receives a second input of the user for a target category label, where the target category label is one of the N category labels.
After displaying the N category labels corresponding to the target image, a second input of the target category label in the N category labels by the user may be received, and the second input includes, but is not limited to, clicking, pressing, selecting, and sliding inputs.
After receiving a second input of the target category label by the user, the target category label may be controlled to be displayed in a display style different from that of other category labels, for example, the target category label is controlled to be highlighted, enlarged, bolded, and the like, so that the user may quickly identify the target category label. Referring to fig. 3, according to the sliding input of the user to the position of the sky category label, the sky category label is determined to be the target category label, and the sky category label is controlled to be displayed in a bold manner.
And step 104, the electronic equipment responds to the second input, and the target image is stored in a target category photo album corresponding to the target category label.
After receiving the second input performed by the user, an image category of the target image (an image category corresponding to the target category tag) may be determined in response to the second input by the user. After the image category of the target image is determined, the target image can be saved in a target category album corresponding to the target category label, so that classified storage of the target image is realized.
For example, in response to a user's selection input of a certain category label of the N category labels, the selected category label is determined as a target category label, an image category corresponding to the target category label is further determined as an image category of the target image, and the target image is saved to a corresponding position according to the determined image category. Or, in response to a sliding input of a user to a position where a certain category label is located, determining that the category label is a target category label, further determining an image category corresponding to the target category label as an image category of the target image, and storing the target image to the corresponding position.
Optionally, click input executed by a user on a specific position of the classification control may be received, different category labels are selected one by one, when the user stops clicking, the selected category label is determined as a target category label, and then an image category corresponding to the target category label is determined as an image category of the target image.
In the embodiment of the application, by displaying the N category labels for the target image, at least two category labels can be provided for a user to select, the user determines the target category label from the N category labels, the target image is stored in the target category album corresponding to the target category label, accurate classification of the target image and personalized classification requirements of the user can be met through simple operation, and meanwhile, due to the fact that the at least two category labels are provided, classification diversification can be achieved.
In an optional embodiment of the present application, the N category labels are determined according to at least one of a preset category classification manner and an image category matching manner;
the displaying of the N category labels corresponding to the target image includes one of the following steps:
displaying N first category labels corresponding to the target image through a classification control;
displaying N second category labels corresponding to the target image through a classification control;
displaying a classification control comprising a first sub-control and a second sub-control, wherein the first sub-control corresponds to a first category label, the second sub-control corresponds to a second category label, and the sum of the number of the first category labels and the number of the second category labels is N;
the first class label is a class label determined according to the preset class dividing mode, and the second class label is a class label determined according to the image class matching mode.
The N category labels displayed in the embodiment of the application may be determined according to a preset category classification manner, may also be determined according to an image category matching manner, and may also be determined according to a preset category classification manner and an image category matching manner. The image classification method comprises the steps of determining a classification label according to a preset classification mode, wherein the classification label determined according to the preset classification mode is a first classification label, and the classification label determined according to the image classification matching mode is a second classification label. When displaying the N category labels, N first category labels corresponding to the target image may be displayed through the classification control, N second category labels corresponding to the target image may be displayed through the classification control, and the first category labels and the second category labels corresponding to the target image may be displayed through the classification control, where the sum of the number of the first category labels and the number of the second category labels is N.
For the case that the first category label and the second category label corresponding to the target image are displayed through the classification control, the classification control may include a first sub-control and a second sub-control, where the first sub-control correspondingly displays the first category label and the second sub-control correspondingly displays the second category label. For example, referring to fig. 4, a left half area of the annular classification control is a first sub-control, a right half area of the annular classification control is a second sub-control, a first category label (a landscape category label and a travel category label) determined according to a preset category classification manner is displayed on the first sub-control, and a second category label (a portrait category label and an emoticon category label) determined according to an image category matching manner is displayed on the second sub-control. The first category label determined based on the preset category dividing mode and the second category label determined based on the image category matching mode may have the same category label, but before the first category label and the second category label are displayed, the same category label needs to be filtered, and only one category label is reserved, so that the situation that the two same category labels are displayed by the classification control is avoided.
According to the condition that the first class labels are displayed through the classification control, the target class labels can be conveniently selected from the N first class labels by a user according to requirements by displaying the first class labels determined according to a preset class dividing mode; for the condition that the second category labels are displayed through the classification control, the target category labels can be conveniently selected from the N second category labels by a user according to requirements by displaying the second category labels determined according to the image category matching mode; aiming at the condition that a first category label and a second category label corresponding to a target image are displayed through a classification control, the first category label determined according to a preset category dividing mode and the second category label determined according to an image category matching mode are displayed, so that the category labels in the classification control are enriched, and a user can conveniently and reasonably select the category labels according to the requirement.
In the embodiment of the application, the classification control corresponding to the first class label, the classification control corresponding to the second class label or the classification controls corresponding to the first class label and the second class label can be displayed, and the display content of the classification control is enriched.
In an optional embodiment of the present application, before displaying the N category labels corresponding to the target image, the method further includes:
performing content identification on the target image to obtain an identification result;
and acquiring the N category labels according to the identification result.
Before displaying the N category labels corresponding to the target image, content identification may be performed on the target image to obtain a corresponding identification result, and after obtaining the identification result, the N category labels may be obtained based on the obtained identification result, so as to be displayed through the classification control. The recognition result corresponding to the target image may include at least one object. When the N category labels are acquired according to the identification result, the method comprises one of the following steps:
determining the category corresponding to the identification result according to the preset category dividing mode, acquiring N first category labels according to the category corresponding to the identification result, and determining the display priority of each first category label;
similarity matching is carried out on the recognition result and a preset image category, N second category labels are determined according to the similarity matching result, and the display priority of each second category label is determined;
determining a first number of first category labels corresponding to the identification result according to the preset category dividing mode, determining a second number of second category labels according to a similarity matching result of the identification result and a preset image category, and acquiring the N category labels according to the first number of first category labels and the second number of second category labels, wherein the display priority of each first category label is determined when the first number of first category labels is determined, and the display priority of each second category label is determined when the second number of second category labels is determined.
When the N category labels are obtained according to the recognition result, the corresponding category may be determined based on the attribute feature corresponding to the at least one object for the recognition result including the at least one object according to a preset category classification manner. After the categories are obtained, the corresponding N first category labels may be obtained according to the categories. When the N first-class tags are acquired, the display priority corresponding to each first-class tag can be determined based on the proportion of the object in the image, the proportion is positively correlated with the display priority, and the higher the proportion is, the higher the priority is. Of course, determining the display priority based on the specific gravity is only one implementation, and other manners (such as setting the display priority according to the importance level of the object, setting the display priority according to the category of the object, etc.) may also be adopted, and will not be set forth herein.
The following describes the above process by way of example, if the content of the target image is identified to obtain the identification result including the person object, the grass object, and the house object, and the proportion of the person object is 60%, the proportion of the grass object is 25%, and the proportion of the house object is 15%, the person category may be determined from the person object, the scenery category may be determined from the grass object, the building category may be determined from the house object, and then N first category tags (the person category tag, the scenery category tag, and the building category tag) may be obtained. Alternatively, after the content of the target image is identified, the identification result including the person object is obtained, N first category tags may be determined according to the related features of the person object, such as determining a female category according to the gender of the person object, determining an adult category according to the age of the person object, determining a short hair category according to the hair style of the person object, and then obtaining N first category tags (female category tag, adult category tag, short hair category tag). Wherein, the gender, age and the attention (importance level) of the hairstyle are determined to be sequentially decreased according to a preset rule, so that the female category label is determined as the highest display priority, the adult category label is determined as the second display priority, and the short hair category label is determined as the lowest display priority.
In the process, the N first-class labels are obtained according to the preset class dividing mode, the display priority of each first-class label is determined, the first-class labels can be displayed on the classification control according to the display priority, and the display order is guaranteed.
When the N category labels are obtained according to the identification result, similarity matching can be performed between the identification result and a preset image category (the preset image category is each image category corresponding to the local album of the electronic device) according to an image category matching mode, a similarity matching result is obtained, the N second category labels are determined according to the obtained similarity matching result, and when the N second category labels are determined, a corresponding display priority can be determined for each second category label. The display priority can be determined based on the similarity, the similarity is positively correlated with the display priority, and the priority is higher if the similarity is higher. Of course, determining the display priority based on the similarity is only one implementation, and other ways (such as setting the display priority according to the importance level of the image category) can also be adopted, and will not be set forth herein.
The following description will be given by way of example, where after content recognition is performed on a target image, a recognition result including a face object and a pool object is obtained, the recognition result is subjected to similarity matching with local image categories (an expression bag category, a tree category, a pet category, and a scenery spot category), where the similarity between the recognition result and the expression bag category is 60% and the similarity between the recognition result and the scenery spot category is 30%, N second category labels (an expression bag category label and a scenery spot category label) are obtained, and since the similarity between the recognition result and the expression bag category is greater than the similarity between the recognition result and the scenery spot category, it is determined that the display priority of the expression bag category label is higher than the scenery spot category label.
It should be noted that, when determining the N second category tags based on the image category matching method, a frequency coefficient corresponding to the shooting frequency may be considered, where the frequency coefficient is determined according to the shooting time interval, and if the image a is shot first, the image B is shot at an interval of 10s, and the image C is shot at an interval of 2s later, the frequency coefficient corresponding to the shooting frequency of the image B associated with the image a may be determined according to 10s, and the frequency coefficient corresponding to the shooting frequency of the image C associated with the image B may be determined based on 2 s. And the shooting time interval is inversely related to the frequency coefficient, i.e. the shorter the shooting time interval is, the larger the frequency coefficient is.
Then, determining N second category labels and the display priority of each second category label according to the frequency coefficient corresponding to the shooting frequency and the similarity matching result between the recognition result and each image category, specifically: when the recognition result is subjected to similarity matching with each image category, corresponding frequency coefficients (frequency coefficients corresponding to time intervals between shooting time corresponding to the last stored image of each image category and current target image shooting time) are determined for each image category, products of the frequency coefficients and first weights and products of similarity matching results and second weights are calculated, the sum of the two products is accumulated to obtain a first numerical value, the first numerical values are sorted from high to low, the first numerical value before sorting is screened out (the first numerical value which is smaller than a set value can be filtered out), then N second category labels are determined, and the display priority from high to low of the N second category labels is determined according to the sequence from high to low of the N first numerical values.
The shooting time interval is considered, the method is specific to a scene continuously shot by a user, for example, the user continuously shoots a plurality of images aiming at the same scene, and the plurality of images need to be classified into a new category, after a first image is stored into the new category, when a classification control is displayed aiming at a subsequent image, a second category label is provided based on the similarity and the shooting interval, and the classification accuracy can be ensured.
The following explains the process by way of example, the local image categories include a person category, a tree category and a scenery spot category, the shooting time of the current target image is 10 points and 30 points, and is cut off to 10 points and 30 points, the shooting time corresponding to the image a stored for the last time in the tree category is 10 points and 29 points, the shooting time corresponding to the image B stored for the last time in the scenery spot category is 10 points and 28 points, and the shooting time corresponding to the image C stored for the last time in the person category is 10 points and 25 points. The frequency coefficient associated with the target image and the image a is 0.9, the frequency coefficient associated with the image B is 0.8, the frequency coefficient associated with the image C is 0.5, the similarity matching result between the target image and the tree category is 60%, the similarity matching result between the target image and the scenery spot category is 50%, and the similarity matching result between the target image and the person category is 80%. In the case where the first weight is 0.4 and the second weight is 0.6, the tree category corresponds to a first numerical value (0.4 × 0.9+0.6 × 60% ═ 0.72), the attraction category corresponds to a first numerical value (0.4 × 0.8+0.6 × 50% ═ 0.62), and the character category corresponds to a first numerical value (0.4 × 0.5+0.6 × 80%: 0.68), and since all of the three first numerical values are greater than the set value (0.5), three second category labels (tree category label, character category label, and attraction category label) and display priorities of the three second category labels can be determined: the display priority of the tree category label, the character category label and the scenery spot category label is reduced in sequence.
In the process, the N second category labels are obtained according to the image category matching mode, the display priority of each second category label is determined, the second category labels can be displayed on the classification control according to the display priority, the display order is guaranteed, meanwhile, the second category labels are screened and sorted based on the shooting time interval and the similarity matching result, and the accuracy of determining the second category labels and the reasonability of the display priority sorting can be guaranteed.
When the N category labels are obtained according to the recognition result, the corresponding category may be determined based on the attribute feature corresponding to the at least one object for the recognition result including the at least one object according to a preset category classification manner. After obtaining the category, a first number of first category labels may be obtained according to the category. When the first number of first category labels is obtained, the display priority corresponding to each first category label can be determined. The identification result and each local image category of the electronic device can be subjected to similarity matching to obtain a similarity matching result, then a second number of second category labels are determined based on the obtained similarity matching result, and when the second number of second category labels are determined, corresponding display priority can be determined for each second category label. When the second category label is acquired, the shooting time interval may be considered for the continuous shooting scene, and specific reference to the above process is not described in detail here.
After the first number of first category labels and the second number of second category labels are obtained, the first number of first category labels and the second number of second category labels may be combined to obtain N number of category labels, and when the first number of first category labels and the second number of second category labels are combined, only one category label is retained for filtering the category labels with the same content. Or according to the display priority, the first category labels with higher display priority are screened out from the first number of first category labels, the second category labels with higher display priority are screened out from the second number of second category labels, the same category labels are filtered, and then the N category labels are obtained through combination. The first number and the second number may be the same or different, and are not particularly limited herein.
According to the process, the category labels are determined according to the two modes, so that the category labels in the classification control are enriched, and a user can conveniently and reasonably select the category labels according to the requirement.
In the embodiment of the application, the N category labels are obtained according to at least one of the image category matching mode and the preset category dividing mode, and the display priority of each category label is determined, so that the display content of the classification control is enriched, and the display order can be ensured.
In an optional embodiment of the present application, the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one first category label, and when M is smaller than N, the displaying, by the classification control, N first category labels corresponding to the target image includes:
displaying M first category labels through the sort control;
under the condition that a triggering condition is monitored, updating at least one first class label in the M first class labels according to the hidden first class label;
wherein the display priority of the hidden first category label is lower than the display priority of the displayed first category label.
The classification control can correspond to M sub-regions, wherein the sizes of the M sub-regions can be the same or different, and for the condition that the sizes of the M sub-regions are the same, the regularity of display can be ensured, the visual experience of a user is improved, and for the condition that the sizes of the M sub-regions are different, a proper sub-region can be selected to display according to the content length of the category label, so that the waste of the region is avoided.
For the case that the category label in the classification control is the first category label and M is smaller than N, when the first category label is displayed through the classification control, M first category labels can be displayed, that is, M priority labels are screened out from the N first category labels. After the M first category tags are displayed, if a user does not select any one of the first category tags, the trigger condition may be monitored, and when the trigger condition is monitored, at least one of the M first category tags that has been displayed is updated according to at least one of the N-M first category tags that is in a hidden state.
The trigger condition may be a third input, such as a click or a slide input, performed by the user on the classification control, or the trigger condition may be determined to be monitored when no input to the current display interface is detected within the second duration, and at this time, at least one first-class label of the M first-class labels may be automatically updated.
The display priority of the N-M first-class labels in the hidden state is lower than that of the M displayed first-class labels, each first-class label in the N first-class labels can respectively correspond to a display priority, and when the M first-class labels are displayed, the M first-class labels can be sequentially displayed in the classification control according to a certain direction from high to low display priorities. When at least one of the M first-class tags is updated according to at least one of the N-M first-class tags, at least a portion of the M first-class tags may be updated according to a sequence from a high display priority to a low display priority for the N-M first-class tags, and when the M first-class tags are updated, the first-class tag having a highest or lowest display priority may be preferentially updated.
It should be noted that after the M first category tags are updated, the display of the M first category tags may also be restored. The display priority corresponding to each first-class label in the N first-class labels may be determined by the electronic device when displaying according to a preset policy, or may be directly determined when determining the first-class label, where such a case corresponds to the above process of obtaining the N first-class labels according to the identification result and determining the display priority.
The above process is explained by a specific example, referring to fig. 5a, the ring classification control corresponds to 4 sub-regions, and 4 sub-regions respectively display a landscape category label, a place category label, a sky category label, and a travel category label, wherein the value of N is 5, the 5 first class labels are respectively a landscape class label, a place class label, a sky class label, a travel class label and a night scene class label according to the sequence from high display priority to low display priority, and the displayed landscape category label, the place category label, the sky category label and the travel category label are displayed in turn in a counterclockwise direction, when the rotation operation of the user in the clockwise direction is received, as shown in fig. 5b, the scenery category label is hidden, and the night scene category label is displayed, at this time, the place category label, the sky category label, the travel category label, and the night scene category label are sequentially displayed in the counterclockwise direction.
In the embodiment of the application, by displaying the M first category labels with high priority, when the first category labels required by a user do not exist in the M first category labels, the display of the first category labels is updated according to the trigger condition, so that different first category labels can be presented in batches, a user can conveniently select from the N first category labels, and the rate of determining the target category labels can be improved by preferentially displaying the first category labels with high priority.
In an optional embodiment of the present application, the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one second category label, and in a case where M is smaller than N, the displaying, by the classification control, N second category labels corresponding to the target image includes:
displaying, by the sort control, the M second category labels;
under the condition that a trigger condition is monitored, updating at least one second-class label in M second-class labels according to the hidden second-class label;
wherein the display priority of the hidden second category label is lower than the display priority of the displayed second category label.
The classification control may correspond to M sub-regions, each sub-region corresponding to a second category label, and for a case where M is smaller than N, M second category labels may be displayed. After the M second category tags are displayed, if the user does not select any one of the second category tags, the trigger condition may be monitored, and when the trigger condition is monitored, at least one of the M second category tags that has been displayed may be updated according to at least one of the N-M second category tags that is in a hidden state.
The display priority of the N-M second category labels in the hidden state is lower than that of the M displayed second category labels, each of the N second category labels may correspond to a display priority, and when the M second category labels are displayed, the M second category labels may be sequentially displayed in the sorting control according to a certain direction from a high display priority to a low display priority. At least part of the M second category tags may be updated according to the order of the display priority from high to low for the N-M second category tags when performing display update, and the second category tag with the highest or lowest display priority may be updated preferentially when updating the M second category tags.
It should be noted that the display priority corresponding to each second category tag in the N second category tags may be determined by the electronic device when displaying according to a preset policy, or may be directly determined when determining the second category tag, where this case corresponds to the above process of obtaining the N second category tags according to the identification result and determining the display priority.
In the embodiment of the application, by displaying the M second category labels with high priority, when there is no second category label required by the user in the M second category labels, the display of the second category labels is updated according to the trigger condition, so that different second category labels can be presented in batches, the user can conveniently select from the N second category labels, and by preferentially displaying the second category labels with high priority, the rate of determining the target category label can be improved.
In an optional embodiment of the present application, the classification control corresponds to M sub-regions, each sub-region corresponds to one of the first category labels or one of the second category labels, and in a case that M is smaller than N, the displaying the classification control including the first sub-control and the second sub-control includes:
displaying the first sub-control corresponding to K first category labels and the second sub-control corresponding to L second category labels, wherein K is an integer greater than or equal to 1, L is an integer greater than or equal to 1, and the sum of K and L is equal to M;
under the condition that a trigger condition is monitored, updating at least one first class label in K first class labels according to the hidden first class label, and/or updating at least one second class label in L second class labels according to the hidden second class label;
wherein the display priority of the hidden first category label is lower than that of the displayed first category label, and the display priority of the hidden second category label is lower than that of the displayed second category label.
The classification control of the target image can correspond to M sub-regions, each sub-region correspondingly displays a first category label or a second category label, when M is smaller than N, a first sub-control corresponding to K first category labels and a second sub-control corresponding to L second category labels can be displayed, wherein the sum of K and L is equal to M, and K and L can be equal to or different from each other, and when K and L are equal to each other, half of the sub-regions in the M sub-regions can display the first category labels, and the other half of the sub-regions display the second category controls. The N category labels comprise E first category labels and F second category labels, the value of E is greater than or equal to K, and the value of F is greater than or equal to L.
The displayed K first category labels are the first category labels with higher display priority (i.e., K first category labels are selected from the E first category labels according to the display priority from high to low), and the displayed L second category labels are the second category labels with higher display priority from the F second category labels (i.e., L second category labels are selected from the F second category labels according to the display priority from high to low).
After the K first category tags and the L second category tags are displayed, if a user does not select any one of the category tags, the trigger condition may be monitored, and when the trigger condition is monitored, at least one of the K first category tags that has been displayed is updated according to at least one of the E-K first category tags that is in a hidden state. Or updating at least one of the L second class labels which are already displayed according to at least one of the F-L second class labels in the hidden state. Or updating at least one of the displayed K first class labels according to at least one of the E-K first class labels in the hidden state, and updating at least one of the displayed L second class labels according to at least one of the F-L second class labels in the hidden state.
The display priority of the E-K first-class labels in the hidden state is lower than that of the displayed K first-class labels, each first-class label in the E first-class labels can respectively correspond to a display priority, and when the K first-class labels are displayed, the K first-class labels can be sequentially displayed in the first sub-control according to the sequence from high display priority to low display priority in a certain direction. When at least one of the K first category tags is updated according to at least one of the E-K first category tags, at least a portion of the K first category tags may be updated according to a sequence from a high display priority to a low display priority for the E-K first category tags, and when the K first category tags are updated, the first category tag having a highest or lowest display priority may be preferentially updated.
Correspondingly, the display priority of the F-L second category labels in the hidden state is lower than the priority of the L displayed second category labels, each of the F second category labels may respectively correspond to a display priority, and when the L second category labels are displayed, the L second category labels may be sequentially displayed in the second sub-control according to a certain direction from high to low in display priority. When at least one of the L second category labels is updated according to at least one of the F-L second category labels, at least a part of the L second category labels may be updated according to the order of the display priority from high to low with respect to the F-L second category labels, and when the L second category labels are updated, the second category label having the highest or lowest display priority may be preferentially updated.
In the embodiment of the application, by displaying the first sub-control corresponding to the first category label and the second sub-control corresponding to the second category label, when the category label required by a user does not exist in the displayed category labels, the display of the first category label and/or the second category label is updated according to the trigger condition, so that different first category labels and different second category labels can be presented in batches, the user can conveniently select from E first category labels and F second category labels, and the rate of determining the target category label can be increased by preferentially displaying the category label with high priority.
In an optional embodiment of the present application, when the target image is saved to the target category album corresponding to the target category label, the target category label may be set to the locked state according to a second input of the user, and the target image is saved to the target category album corresponding to the target category label.
Before receiving a second input of the user, the target category tag may be selected to set the target category tag to be in a locked state, where the target category tag in the locked state may be highlighted, and then according to a second input (e.g., a click) performed by the user on the target category tag, the target image may be saved to a target category album corresponding to the target category tag, and for a subsequent target image, the target image may also be directly saved to the target category album according to the locked state of the target category tag.
The target category tag is set to be in a locked state, so that the method can be applied to scenes continuously shot for a certain scene, and can also be applied to scenes for classifying a plurality of images corresponding to the same scene in the local image database.
When the target category label is in a locked state, a user does not need to select the target category label for each shot image (or each image to be classified), and accurate and convenient image classification storage can be rapidly realized.
For example, if a user captures a landscape in a certain area and wants to store all captured images in the same folder, a certain category label may be locked for a certain period of time, and all captured images may be stored in the same album (which may be a new album). Referring to fig. 6, before or after the user takes a picture, the user can slide from the shooting key to a certain category label (in the figure, a landscape category label) and continue to slide to the outside of the concentric circle, and at this time, the category label is locked, so that the image can be automatically stored in the corresponding album, and a quick and convenient classification effect is realized. And the images shot subsequently can be automatically saved in the photo album corresponding to the category label. When the user needs to cancel the locking, the user only needs to operate in the reverse direction and slide from the outer side to the inner side of the concentric circle, so that the locking state of the target type label can be released.
In the embodiment of the application, the target category labels are locked, the target category albums corresponding to the target category labels are stored for the target images, accurate and convenient image classification storage can be achieved, a user does not need to select among the target category labels, and the image storage rapidity is guaranteed.
Taking a target image as an image shot in real time as an example, a process of determining a target category label from N first category labels and classifying and storing the target image according to the present application is described below by way of example, and as shown in fig. 7, the process includes:
and 701, receiving the click of the user on a shooting key on a shooting interface, and displaying a shot target image.
Step 702, a concentric blank classification control in a ring shape is displayed by taking a shooting key as a center.
And 703, the electronic equipment identifies the content of the target image to obtain an identification result, determines N first class labels corresponding to the identification result according to a preset class division mode, and displays M first class labels on the classification control according to the triggering of a user, wherein M is smaller than N.
Step 704, detecting whether the user selects the target category label from the M first category labels, if so, executing step 707, otherwise, executing step 705. The selection may be that the user slides directly onto a category label, which is determined to be the target category label.
Step 705, receiving a clockwise rotation operation of the user on the classification control, displaying the remaining first class labels, displaying the previous first class labels according to the counterclockwise rotation operation of the user on the classification control, and then executing step 706.
And step 706, receiving selection operation of the user in the N first category labels to determine a target category label.
And step 707, storing the target image to a target category album corresponding to the target category label.
In the implementation process, the M first category labels are displayed in the classification control by displaying the classification control corresponding to the target image, and when the category labels required by the user do not exist in the M first category labels, the category labels are updated and displayed, so that the N first category labels can be provided for the user to select, and the user can conveniently and accurately classify the target image.
Taking the target image as an image shot in real time as an example, a process of determining the target category label in the first category label and the second category label and classifying and storing the target image according to the present application is described below by way of example, and as shown in fig. 8, the process includes:
step 801, receiving a click of a shooting key by a user on a shooting interface, and displaying a shot target image.
Step 802, according to the triggering of the user on the target image, a concentric annular classification control is displayed by taking the shooting key as the center, and the classification control displays a first classification label.
And 803, displaying the second category label in the right half area of the classification control according to the input of the user to the right half area of the classification control, and displaying the first category label in the left half area of the classification control. The second category label can be updated by rotating the right half area, the first category label can be updated by rotating the left half area, and the previous display can be restored by rotating in the opposite direction, the second category label is a category label determined based on an image category matching mode, and the first category label is a category label determined based on a preset category dividing mode.
Step 804, detecting whether a user selects a target category label from the currently displayed first category label and the second category label, if so, executing step 807, otherwise, executing step 805.
And 805, receiving a clockwise rotation operation of the right half area of the classification control by the user, and displaying the remaining second category labels, and/or receiving a clockwise rotation operation of the left half area of the classification control by the user, and displaying the remaining first category labels.
Step 806, receiving the selection operation of the user to determine the target category label.
Step 807, the target image is saved to the target category album corresponding to the target category label.
In the implementation process, the classification control corresponding to the target image is displayed, the first class label is displayed in the classification control, and when the class label required by the user does not exist in the first class label, the first class label and the second class label are displayed, so that more choices can be provided for the user, and the target image can be classified accurately.
In the implementation process of the image classification method provided by the embodiment of the application, by displaying N category labels for the target image, at least two category labels can be provided for the user to select, the user determines the target category label from the N category labels, and stores the target image into the target category album corresponding to the target category label, so that the target image can be accurately classified through simple operation and the personalized classification requirement of the user can be met, and meanwhile, due to the provision of the at least two category labels, the classification diversification can be realized.
Furthermore, the display content of the classification control is enriched by displaying the first class label and/or the second class label; the display order is ensured by determining the display priority of each category of label; the complete category labels can be presented in batches by updating the category labels, so that the user can select the category labels conveniently; by preferentially displaying the category labels with high priority, the rate of determining the target category labels can be improved; by locking the category labels, accurate, convenient and quick image classification storage of a plurality of target images can be realized.
It should be noted that, in the image classification method provided in the embodiment of the present application, the execution subject may be an image classification device, or a control module in the image classification device for executing the image classification method. In the embodiment of the present application, an image classification method executed by an image classification apparatus is taken as an example, and the image classification apparatus provided in the embodiment of the present application is described.
Fig. 9 is a schematic block diagram of an image classification apparatus provided in an embodiment of the present application, where the image classification apparatus is applied to an electronic device.
As shown in fig. 9, the image classification apparatus includes:
a first receiving module 901, configured to receive a first input of a user;
a display module 902, configured to, in response to the first input, display N category labels corresponding to a target image, where N is an integer greater than or equal to 2;
a second receiving module 903, configured to receive a second input of the user for a target category label, where the target category label is one of the N category labels;
a saving module 904, configured to, in response to a second input, save the target image to a target category album corresponding to the target category label.
Optionally, the N category labels are determined according to at least one of a preset category dividing manner and an image category matching manner;
the display module comprises one of the following sub-modules:
the first display sub-module is used for displaying N first category labels corresponding to the target image through a classification control;
the second display sub-module is used for displaying N second category labels corresponding to the target image through a classification control;
the third display sub-module is used for displaying a classification control comprising a first sub-control and a second sub-control, the first sub-control corresponds to a first category label, the second sub-control corresponds to a second category label, and the sum of the number of the first category label and the number of the second category label is N;
the first class label is a class label determined according to the preset class dividing mode, and the second class label is a class label determined according to the image class matching mode.
Optionally, the apparatus further comprises:
the identification module is used for identifying the content of the target image before the display module displays the N category labels corresponding to the target image to obtain an identification result;
and the acquisition module is used for acquiring the N category labels according to the identification result.
Optionally, the obtaining module includes one of the following sub-modules:
the first processing submodule is used for determining the category corresponding to the identification result according to the preset category dividing mode, acquiring N first category labels according to the category corresponding to the identification result and determining the display priority of each first category label;
the second processing submodule is used for carrying out similarity matching on the recognition result and a preset image category, determining N second category labels according to the similarity matching result and determining the display priority of each second category label;
a third processing sub-module, configured to determine a first number of the first category tags corresponding to the identification result according to the preset category dividing manner, determine a second number of the second category tags according to a similarity matching result between the identification result and a preset image category, and obtain the N category tags according to the first number of the first category tags and the second number of the second category tags, where a display priority of each first category tag is determined when the first number of the first category tags is determined, and a display priority of each second category tag is determined when the second number of the second category tags is determined.
Optionally, the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one first category label, and when M is smaller than N, the first display sub-module includes:
the first display unit is used for displaying the M first category labels through the classification control;
the first updating unit is used for updating at least one first-class label in the M first-class labels according to the hidden first-class label under the condition that a triggering condition is monitored;
wherein the display priority of the hidden first category label is lower than the display priority of the displayed first category label.
Optionally, the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one second category label, and when M is smaller than N, the second display sub-module includes:
the second display unit is used for displaying the M second category labels through the classification control;
the second updating unit is used for updating at least one second-class label in the M second-class labels according to the hidden second-class label under the condition that the triggering condition is monitored;
wherein the display priority of the hidden second category label is lower than the display priority of the displayed second category label.
Optionally, the sorting control corresponds to M sub-regions, each sub-region corresponds to one of the first category labels or one of the second category labels, and when M is smaller than N, the third display sub-module includes:
a third display unit, configured to display the first sub-control corresponding to K first category labels and the second sub-control corresponding to L second category labels, where K is an integer greater than or equal to 1, L is an integer greater than or equal to 1, and a sum of K and L is equal to M;
a third updating unit, configured to update at least one of the K first class tags according to the hidden first class tag and/or update at least one of the L second class tags according to the hidden second class tag when a trigger condition is monitored;
wherein the display priority of the hidden first category label is lower than that of the displayed first category label, and the display priority of the hidden second category label is lower than that of the displayed second category label.
The image classification device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The image classification device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The image classification device provided in the embodiment of the present application can implement each process implemented by the image classification method embodiment shown in fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 10, an electronic device 1000 is further provided in this embodiment of the present application, and includes a processor 1001, a memory 1002, and a program or an instruction stored in the memory 1002 and executable on the processor 1001, where the program or the instruction is executed by the processor 1001 to implement each process of the above-mentioned embodiment of the image classification method, and can achieve the same technical effect, and in order to avoid repetition, it is not described here again.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 1100 includes, but is not limited to: radio frequency unit 1101, network module 1102, audio output unit 1103, input unit 1104, sensor 1105, display unit 1106, user input unit 1107, interface unit 1108, memory 1109, processor 1110, and the like.
Those skilled in the art will appreciate that the electronic device 1100 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 1110 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 11 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.
Wherein, the user input unit 1107 is configured to: receiving a first input of a user; the display unit 1106 is used for: responding to a first input, displaying N category labels corresponding to a target image, wherein N is an integer greater than or equal to 2; the user input unit 1107 is also used to: receiving a second input of a user for a target category label, wherein the target category label is one of the N category labels; processor 1110 is configured to: and responding to the second input, and saving the target image to a target category photo album corresponding to the target category label.
Optionally, determining the N category labels according to at least one of a preset category classification manner and an image category matching manner; the display unit 1106 is further configured to display the N category labels by one of:
displaying N first category labels corresponding to the target image through a classification control;
displaying N second category labels corresponding to the target image through a classification control;
displaying a classification control comprising a first sub-control and a second sub-control, wherein the first sub-control corresponds to a first category label, the second sub-control corresponds to a second category label, and the sum of the number of the first category labels and the number of the second category labels is N;
the first class label is a class label determined according to the preset class dividing mode, and the second class label is a class label determined according to the image class matching mode.
Optionally, before the display unit 1106 displays the N category labels corresponding to the target image, the processor 1110 is further configured to: performing content identification on the target image to obtain an identification result; and acquiring the N category labels according to the identification result.
Optionally, the processor 1110 is further configured to: determining the category corresponding to the identification result according to the preset category dividing mode, acquiring N first category labels according to the category corresponding to the identification result, and determining the display priority of each first category label; or
Similarity matching is carried out on the recognition result and a preset image category, N second category labels are determined according to the similarity matching result, and the display priority of each second category label is determined; or
Determining a first number of first category labels corresponding to the identification result according to the preset category dividing mode, determining a second number of second category labels according to a similarity matching result of the identification result and a preset image category, and acquiring the N category labels according to the first number of first category labels and the second number of second category labels, wherein the display priority of each first category label is determined when the first number of first category labels is determined, and the display priority of each second category label is determined when the second number of second category labels is determined.
Optionally, the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one first class label, and in a case that M is smaller than N, the display unit 1106 is further configured to: displaying M first category labels through the sort control; processor 1110 is further configured to: under the condition that a triggering condition is monitored, updating at least one first class label in the M first class labels according to the hidden first class label; wherein the display priority of the hidden first category label is lower than the display priority of the displayed first category label.
Optionally, the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one second category label, and in a case that M is smaller than N, the display unit 1106 is further configured to: displaying, by the sort control, the M second category labels; processor 1110 is further configured to: under the condition that a trigger condition is monitored, updating at least one second-class label in M second-class labels according to the hidden second-class label; wherein the display priority of the hidden second category label is lower than the display priority of the displayed second category label.
Optionally, the classification control corresponds to M sub-regions, each sub-region corresponds to one of the first category labels or one of the second category labels, and in a case that M is smaller than N, the display unit 1106 is further configured to: displaying the first sub-control corresponding to K first category labels and the second sub-control corresponding to L second category labels, wherein K is an integer greater than or equal to 1, L is an integer greater than or equal to 1, and the sum of K and L is equal to M; processor 1110 is further configured to: under the condition that a trigger condition is monitored, updating at least one first class label in K first class labels according to the hidden first class label, and/or updating at least one second class label in L second class labels according to the hidden second class label; wherein the display priority of the hidden first category label is lower than that of the displayed first category label, and the display priority of the hidden second category label is lower than that of the displayed second category label.
In the embodiment of the application, by displaying the N category labels for the target image, at least two category labels can be provided for a user to select, the user determines the target category label from the N category labels, the target image is stored in the target category album corresponding to the target category label, accurate classification of the target image and personalized classification requirements of the user can be met through simple operation, and meanwhile, due to the fact that the at least two category labels are provided, classification diversification can be achieved.
Furthermore, the display content of the classification control is enriched by displaying the first class label and/or the second class label; the display order is ensured by determining the display priority of each category of label; the complete category labels can be presented in batches by updating the category labels, so that the user can select the category labels conveniently; by preferentially displaying the category labels with high priority, the rate of determining the target category labels can be improved.
It should be understood that in the embodiment of the present application, the input Unit 1104 may include a Graphics Processing Unit (GPU) 11041 and a microphone 11042, and the Graphics processor 11041 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1107 includes a touch panel 11071 and other input devices 11072. A touch panel 11071, also called a touch screen. The touch panel 11071 may include two portions of a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 1109 may be used for storing software programs and various data including, but not limited to, application programs and an operating system. Processor 1110 may integrate an application processor that handles primarily operating systems, user interfaces, applications, etc. and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1110.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the embodiment of the image classification method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the embodiment of the image classification method, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (14)

1. An image classification method, comprising:
receiving a first input of a user;
responding to the first input, and displaying N category labels corresponding to the target image, wherein N is an integer greater than or equal to 2;
receiving a second input of a user for a target category label, wherein the target category label is one of the N category labels;
and responding to the second input, and saving the target image to a target category photo album corresponding to the target category label.
2. The image classification method according to claim 1, wherein the N class labels are determined according to at least one of a preset class classification manner and an image class matching manner;
the displaying of the N category labels corresponding to the target image includes one of the following steps:
displaying N first category labels corresponding to the target image through a classification control;
displaying N second category labels corresponding to the target image through a classification control;
displaying a classification control comprising a first sub-control and a second sub-control, wherein the first sub-control corresponds to a first category label, the second sub-control corresponds to a second category label, and the sum of the number of the first category labels and the number of the second category labels is N;
the first class label is a class label determined according to the preset class dividing mode, and the second class label is a class label determined according to the image class matching mode.
3. The image classification method according to claim 2, wherein before displaying the N category labels corresponding to the target image, the method further comprises:
performing content identification on the target image to obtain an identification result;
and acquiring the N category labels according to the identification result.
4. The image classification method according to claim 3, wherein the obtaining of the N class labels according to the recognition result comprises one of the following steps:
determining the category corresponding to the identification result according to the preset category dividing mode, acquiring N first category labels according to the category corresponding to the identification result, and determining the display priority of each first category label;
similarity matching is carried out on the recognition result and a preset image category, N second category labels are determined according to the similarity matching result, and the display priority of each second category label is determined;
determining a first number of first category labels corresponding to the identification result according to the preset category dividing mode, determining a second number of second category labels according to a similarity matching result of the identification result and a preset image category, and acquiring the N category labels according to the first number of first category labels and the second number of second category labels, wherein the display priority of each first category label is determined when the first number of first category labels is determined, and the display priority of each second category label is determined when the second number of second category labels is determined.
5. The image classification method according to claim 2 or 4, wherein the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one first category label, and in a case where M is smaller than N, the displaying, by the classification control, N first category labels corresponding to the target image includes:
displaying M first category labels through the sort control;
under the condition that a triggering condition is monitored, updating at least one first class label in the M first class labels according to the hidden first class label;
wherein the display priority of the hidden first category label is lower than the display priority of the displayed first category label.
6. The image classification method according to claim 2 or 4, wherein the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one second category label, and in a case where M is less than N, the displaying, by the classification control, N second category labels corresponding to the target image includes:
displaying, by the sort control, the M second category labels;
under the condition that a trigger condition is monitored, updating at least one second-class label in M second-class labels according to the hidden second-class label;
wherein the display priority of the hidden second category label is lower than the display priority of the displayed second category label.
7. The image classification method according to claim 2 or 4, wherein the classification control corresponds to M sub-regions, each sub-region corresponds to one of the first category label and the second category label, and in the case that M is less than N, the displaying the classification control including the first sub-control and the second sub-control includes:
displaying the first sub-control corresponding to K first category labels and the second sub-control corresponding to L second category labels, wherein K is an integer greater than or equal to 1, L is an integer greater than or equal to 1, and the sum of K and L is equal to M;
under the condition that a trigger condition is monitored, updating at least one first class label in K first class labels according to the hidden first class label, and/or updating at least one second class label in L second class labels according to the hidden second class label;
wherein the display priority of the hidden first category label is lower than that of the displayed first category label, and the display priority of the hidden second category label is lower than that of the displayed second category label.
8. An image classification apparatus, comprising:
the first receiving module is used for receiving a first input of a user;
the display module is used for responding to the first input and displaying N category labels corresponding to the target image, wherein N is an integer greater than or equal to 2;
a second receiving module, configured to receive a second input of a user for a target category tag, where the target category tag is one of the N category tags;
and the storage module is used for responding to a second input and storing the target image to a target category photo album corresponding to the target category label.
9. The image classification device according to claim 8, wherein the N class labels are determined according to at least one of a preset class division manner and an image class matching manner;
the display module comprises one of the following sub-modules:
the first display sub-module is used for displaying N first category labels corresponding to the target image through a classification control;
the second display sub-module is used for displaying N second category labels corresponding to the target image through a classification control;
the third display sub-module is used for displaying a classification control comprising a first sub-control and a second sub-control, the first sub-control corresponds to a first category label, the second sub-control corresponds to a second category label, and the sum of the number of the first category label and the number of the second category label is N;
the first class label is a class label determined according to the preset class dividing mode, and the second class label is a class label determined according to the image class matching mode.
10. The image classification apparatus according to claim 9, characterized in that the apparatus further comprises:
the identification module is used for identifying the content of the target image before the display module displays the N category labels corresponding to the target image to obtain an identification result;
and the acquisition module is used for acquiring the N category labels according to the identification result.
11. The image classification device of claim 10, wherein the acquisition module comprises one of the following sub-modules:
the first processing submodule is used for determining the category corresponding to the identification result according to the preset category dividing mode, acquiring N first category labels according to the category corresponding to the identification result and determining the display priority of each first category label;
the second processing submodule is used for carrying out similarity matching on the recognition result and a preset image category, determining N second category labels according to the similarity matching result and determining the display priority of each second category label;
a third processing sub-module, configured to determine a first number of the first category tags corresponding to the identification result according to the preset category dividing manner, determine a second number of the second category tags according to a similarity matching result between the identification result and a preset image category, and obtain the N category tags according to the first number of the first category tags and the second number of the second category tags, where a display priority of each first category tag is determined when the first number of the first category tags is determined, and a display priority of each second category tag is determined when the second number of the second category tags is determined.
12. The image classification device according to claim 9 or 11, wherein the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one of the first category labels, and in the case where M is smaller than N, the first display sub-module includes:
the first display unit is used for displaying the M first category labels through the classification control;
the first updating unit is used for updating at least one first-class label in the M first-class labels according to the hidden first-class label under the condition that a triggering condition is monitored;
wherein the display priority of the hidden first category label is lower than the display priority of the displayed first category label.
13. The image classification device according to claim 9 or 11, wherein the classification control corresponds to M sub-regions, where M is an integer greater than or equal to 1, each sub-region corresponds to one of the second category labels, and in the case where M is less than N, the second display sub-module includes:
the second display unit is used for displaying the M second category labels through the classification control;
the second updating unit is used for updating at least one second-class label in the M second-class labels according to the hidden second-class label under the condition that the triggering condition is monitored;
wherein the display priority of the hidden second category label is lower than the display priority of the displayed second category label.
14. The image classification device according to claim 9 or 11, wherein the classification control corresponds to M sub-regions, each sub-region corresponding to one of the first category labels or one of the second category labels, and in a case where M is smaller than N, the third display sub-module includes:
a third display unit, configured to display the first sub-control corresponding to K first category labels and the second sub-control corresponding to L second category labels, where K is an integer greater than or equal to 1, L is an integer greater than or equal to 1, and a sum of K and L is equal to M;
a third updating unit, configured to update at least one of the K first class tags according to the hidden first class tag and/or update at least one of the L second class tags according to the hidden second class tag when a trigger condition is monitored;
wherein the display priority of the hidden first category label is lower than that of the displayed first category label, and the display priority of the hidden second category label is lower than that of the displayed second category label.
CN202110010035.3A 2021-01-05 2021-01-05 Image classification method and device Pending CN112732961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110010035.3A CN112732961A (en) 2021-01-05 2021-01-05 Image classification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110010035.3A CN112732961A (en) 2021-01-05 2021-01-05 Image classification method and device

Publications (1)

Publication Number Publication Date
CN112732961A true CN112732961A (en) 2021-04-30

Family

ID=75589802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110010035.3A Pending CN112732961A (en) 2021-01-05 2021-01-05 Image classification method and device

Country Status (1)

Country Link
CN (1) CN112732961A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473195A (en) * 2021-05-31 2021-10-01 青岛海尔科技有限公司 Multimedia data storage method and system, storage medium and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0947937A2 (en) * 1998-04-02 1999-10-06 Canon Kabushiki Kaisha Image search apparatus and method
CN103226575A (en) * 2013-04-01 2013-07-31 北京小米科技有限责任公司 Image processing method and device
CN107734142A (en) * 2017-09-15 2018-02-23 维沃移动通信有限公司 A kind of photographic method, mobile terminal and server
CN108984657A (en) * 2018-06-28 2018-12-11 Oppo广东移动通信有限公司 Image recommendation method and apparatus, terminal, readable storage medium storing program for executing
CN109815354A (en) * 2019-01-25 2019-05-28 维沃移动通信有限公司 Picture management method, mobile terminal
WO2020037576A1 (en) * 2018-08-22 2020-02-27 深圳市欢太科技有限公司 Shorthand method and device, terminal, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0947937A2 (en) * 1998-04-02 1999-10-06 Canon Kabushiki Kaisha Image search apparatus and method
CN103226575A (en) * 2013-04-01 2013-07-31 北京小米科技有限责任公司 Image processing method and device
CN107734142A (en) * 2017-09-15 2018-02-23 维沃移动通信有限公司 A kind of photographic method, mobile terminal and server
CN108984657A (en) * 2018-06-28 2018-12-11 Oppo广东移动通信有限公司 Image recommendation method and apparatus, terminal, readable storage medium storing program for executing
WO2020037576A1 (en) * 2018-08-22 2020-02-27 深圳市欢太科技有限公司 Shorthand method and device, terminal, and storage medium
CN109815354A (en) * 2019-01-25 2019-05-28 维沃移动通信有限公司 Picture management method, mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473195A (en) * 2021-05-31 2021-10-01 青岛海尔科技有限公司 Multimedia data storage method and system, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN112954210B (en) Photographing method and device, electronic equipment and medium
CN107146082B (en) Transaction record information acquisition method and device and computer readable storage medium
CN112135046B (en) Video shooting method, video shooting device and electronic equipment
CN111866392B (en) Shooting prompting method and device, storage medium and electronic equipment
CN107256485B (en) Transaction record information acquisition method and device and computer readable storage medium
CN115176456B (en) Content operation method, device, terminal and storage medium
CN112714257B (en) Display control method, display control device, electronic device, and medium
CN111813284B (en) Application program interaction method and device
CN112698775B (en) Image display method and device and electronic equipment
CN112698761A (en) Image display method and device and electronic equipment
CN113873166A (en) Video shooting method and device, electronic equipment and readable storage medium
CN112083854A (en) Application program running method and device
CN112437231A (en) Image shooting method and device, electronic equipment and storage medium
CN112287141A (en) Photo album processing method and device, electronic equipment and storage medium
CN117194697A (en) Label generation method and device and electronic equipment
CN113271378B (en) Image processing method and device and electronic equipment
CN113194256B (en) Shooting method, shooting device, electronic equipment and storage medium
CN115223076A (en) Behavior warning method, behavior warning device, behavior warning equipment and storage medium
CN112732961A (en) Image classification method and device
CN112330728A (en) Image processing method, image processing device, electronic equipment and readable storage medium
CN113010738A (en) Video processing method and device, electronic equipment and readable storage medium
CN111930281A (en) Reminding message creating method and device and electronic equipment
CN113271379B (en) Image processing method and device and electronic equipment
CN113360684A (en) Picture management method and device and electronic equipment
CN112084151A (en) File processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination