CN111368866A - Picture classification method, device and system - Google Patents

Picture classification method, device and system Download PDF

Info

Publication number
CN111368866A
CN111368866A CN201910189955.9A CN201910189955A CN111368866A CN 111368866 A CN111368866 A CN 111368866A CN 201910189955 A CN201910189955 A CN 201910189955A CN 111368866 A CN111368866 A CN 111368866A
Authority
CN
China
Prior art keywords
picture
pictures
classified
group
user
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.)
Withdrawn
Application number
CN201910189955.9A
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.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System Technology 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 Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN201910189955.9A priority Critical patent/CN111368866A/en
Publication of CN111368866A publication Critical patent/CN111368866A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Abstract

The invention relates to a picture classification method, a picture classification device and a picture classification system, and belongs to the field of electronic technology application. The method comprises the following steps: performing a picture verification process, the picture verification process comprising: providing a picture set for a user to select pictures meeting set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified; and determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set. The invention solves the problem of low picture classification efficiency. The invention is used for target identification.

Description

Picture classification method, device and system
Technical Field
The present invention relates to the field of electronic technology application, and in particular, to a method, an apparatus, and a system for classifying pictures.
Background
In the field of security protection, the recognition of the human face by the camera by adopting a classification model becomes an important function of the camera. And the effective classification model is obtained based on a large amount of face pictures.
At present, a supervised learning algorithm is usually adopted to train a classification model, and in the training process, a large number of sample face pictures need to be labeled manually with face features (for example, a certain face picture is labeled with features: "wearing glasses"), and then the classification model is trained by using the labeled sample face pictures to adjust parameters adopted by the classification model. The trained classification model can be used for face recognition.
However, the feature labeling of the sample face picture is performed manually in a centralized manner, so that the classification efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a picture classification method, a device and a system. The technical scheme is as follows:
according to a first aspect of the embodiments of the present invention, there is provided a picture classification method, the method including:
performing a picture verification process, the picture verification process comprising: providing a picture set for a user to select pictures meeting set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified;
and determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set.
Optionally, the determining, according to a result of the user selecting the picture in the picture set, an association relationship between the picture to be classified in the picture set and the setting feature includes:
screening a target selection result from the obtained selection results, wherein the pictures indicated by the target selection result comprise pictures conforming to the set characteristics and the pictures to be classified;
and determining the incidence relation between the picture to be classified in the picture set and the set characteristics according to the target selection result.
Optionally, the determining, according to the target selection result, an association relationship between the picture to be classified in the picture set and the setting feature includes:
determining the selected proportion of each picture to be classified based on the executed picture verification process, wherein the selected proportion of any picture to be classified is the proportion of any picture to be classified appearing in a target selection result under the condition that any picture to be classified and pictures conforming to the set characteristics appear in one picture set in the executed picture verification process;
and when the selected proportion of any picture to be classified is greater than a proportion threshold value, determining that the picture to be classified conforms to the set characteristics.
Optionally, the determining, based on the executed picture verification process, a selected proportion of each picture to be classified includes:
based on the executed picture verification process, calculating the selected proportion P of each picture to be classified by adopting a proportion calculation formulakThe proportion calculation formula comprises:
Pk=m/n;
the image k is any image to be classified, the m is the number of times that the image k and the image meeting the set characteristics appear in a target selection result together in the executed image verification process, the n is the number of times that the image k and the image meeting the set characteristics appear in one image set together in the executed image verification process, and the n is larger than or equal to 1.
Optionally, the picture set includes a picture from a first picture group and a picture from a second picture group, the picture in the first picture group conforms to the setting feature, the picture in the second picture group is a picture to be classified, and after the association relationship between the picture to be classified and the setting feature in the picture set is determined according to a selection result of the user on the picture in the picture set, the method further includes:
adding pictures in the second picture group which are determined to accord with the set characteristics to a third picture group, wherein the third picture group is used for storing the pictures in the second picture group which accord with the set characteristics;
and deleting the pictures which are determined to accord with the set characteristics in the second picture group to obtain an updated second picture group.
Optionally, after the adding the picture with the determined setting characteristic in the second picture group to a third picture group, the method further includes:
determining the accuracy of the pictures in the third picture group according with the set characteristics;
when the accuracy is lower than a specified accuracy, adding all the pictures of the third picture group to the second picture group, and clearing the third picture group;
and updating the designated parameters in the picture verification process so as to execute the picture verification process after the parameters are updated.
Optionally, the determining that the pictures in the third picture group meet the correct rate of the set feature includes:
receiving the accuracy rate of the pictures in the third picture group which are obtained by manual calculation and accord with the set characteristics;
or sampling and checking the pictures in the third picture group, and determining the accuracy of the pictures meeting the set characteristics obtained by sampling and checking as the accuracy of the pictures meeting the set characteristics in the third picture group.
Optionally, the providing a picture set includes:
selecting t1 pictures from the first picture group, wherein t1 is more than or equal to 1;
selecting t2 pictures from the second picture group, wherein t2 is more than or equal to 1;
and combining the t1 pictures and the t2 pictures into the picture set.
Optionally, the picture verification process is performed multiple times, and determining an association relationship between the picture to be classified in the picture set and the set feature according to a selection result of the user on the picture in the picture set includes:
and after the picture verification process is executed each time, determining the association relationship between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set.
Optionally, the picture set is used for performing user identity authentication on the user, and the method further includes:
and when the pictures indicated by the selection result comprise pictures conforming to the set characteristics and pictures to be classified, determining that the user passes the user identity authentication.
Optionally, the picture set is used to perform user authentication on a user, the target selection result is a selection result of the user who passes the user authentication, and when a plurality of users need to perform user authentication at the same time, the picture sets provided to the plurality of users are the same, the method further includes:
determining the proportion of the number of different selection results in the total number of all selection results based on the selection results of the plurality of users on the picture set;
and determining that the user corresponding to the selection result with the highest number of the selection results passes the user identity authentication.
According to a third aspect of the embodiments of the present invention, there is provided a picture classification apparatus, comprising:
a processing module configured to perform a picture verification process, the picture verification process comprising: providing a picture set for a user to select pictures meeting set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified;
and the first determining module is used for determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set.
Optionally, the first determining module includes:
the screening submodule is used for screening a target selection result from the obtained selection results, and the pictures indicated by the target selection result comprise pictures which accord with the set characteristics and the pictures to be classified;
and the determining submodule is used for determining the incidence relation between the picture to be classified in the picture set and the set characteristics according to the target selection result.
Optionally, the determining sub-module is configured to:
determining the selected proportion of each picture to be classified based on the executed picture verification process, wherein the selected proportion of any picture to be classified is the proportion of any picture to be classified appearing in a target selection result under the condition that any picture to be classified and pictures conforming to the set characteristics appear in one picture set in the executed picture verification process;
and when the selected proportion of any picture to be classified is greater than a proportion threshold value, determining that the picture to be classified conforms to the set characteristics.
Optionally, the determining sub-module is configured to: based on the executed picture verification process, calculating the selected proportion P of each picture to be classified by adopting a proportion calculation formulakThe proportion calculation formula comprises:
Pk=m/n;
the image k is any image to be classified, the m is the number of times that the image k and the image meeting the set characteristics appear in a target selection result together in the executed image verification process, the n is the number of times that the image k and the image meeting the set characteristics appear in one image set together in the executed image verification process, and the n is larger than or equal to 1.
Optionally, the picture set includes a picture from a first picture group and a picture from a second picture group, the picture in the first picture group conforms to the setting feature, and the picture in the second picture group is a picture to be classified, and the apparatus further includes:
a first adding module, configured to add, after determining an association relationship between a picture to be classified in the picture set and the set feature according to a selection result of a user on pictures in the picture set, a picture determined to meet the set feature in the second picture group to a third picture group, where the third picture group is used to store pictures meeting the set feature in the second picture group;
and the deleting module is used for deleting the pictures which are determined to accord with the set characteristics in the second picture group to obtain the updated second picture group.
Optionally, the apparatus further comprises:
a second determining module, configured to determine, after the picture with the determined setting feature in the second picture group is added to a third picture group, a correct rate at which pictures in the third picture group meet the setting feature;
a second adding module, configured to add all the pictures of the third group of pictures to the second group of pictures and clear the third group of pictures when the accuracy is lower than a specified accuracy;
and the updating module is used for updating the designated parameters in the picture verification process so as to execute the picture verification process after the parameters are updated.
Optionally, the second determining module is configured to:
receiving the accuracy rate of the pictures in the third picture group which are obtained by manual calculation and accord with the set characteristics;
or sampling and checking the pictures in the third picture group, and determining the accuracy of the pictures meeting the set characteristics obtained by sampling and checking as the accuracy of the pictures meeting the set characteristics in the third picture group.
Optionally, the processing module is configured to:
selecting t1 pictures from the first picture group, wherein t1 is more than or equal to 1;
selecting t2 pictures from the second picture group, wherein t2 is more than or equal to 1;
and combining the t1 pictures and the t2 pictures into the picture set.
Optionally, the picture verification process has multiple times, and the first determining module is configured to:
and after the picture verification process is executed each time, determining the association relationship between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set.
Optionally, the picture set is used for performing user identity authentication on the user, and the apparatus further includes:
and the third determining module is used for determining that the user passes the user identity authentication when the pictures indicated by the selection result comprise pictures conforming to the set characteristics and pictures to be classified.
Optionally, the picture set is used to perform user authentication on a user, the target selection result is a selection result of the user who passes the user authentication, and when a plurality of users need to perform user authentication at the same time, the picture sets provided to the plurality of users are the same, the apparatus further includes:
a fourth determining module, configured to determine, based on the selection results of the plurality of users on the picture set, a ratio of the number of different selection results to a total number of all selection results;
and the fifth determining module is used for determining that the user corresponding to the selection result with the highest number of the selection results passes the user identity authentication.
According to a third aspect of embodiments of the present invention, there is provided a computer device, comprising a processor and a memory,
wherein, the memory is used for storing computer programs;
the processor is configured to execute the program stored in the memory, and implement the image classification method according to any one of the first aspect.
According to a fourth aspect of the embodiments of the present invention, there is provided a storage medium, wherein the storage medium stores therein a computer program, and the computer program, when executed by a processor, implements the picture classification method according to any one of the first aspects.
According to a fifth aspect of the embodiments of the present invention, there is provided a picture classification system, including:
image classification equipment and terminal, image classification equipment includes aforementioned any picture classification device.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
the image classification method, the image classification device and the image classification system provided by the embodiment of the invention provide the image set for a user to select the images which accord with the set characteristics in the image set, and determine the incidence relation between the images to be classified and the set characteristics in the image set according to the selection result of the user on the images in the image set. Because the characteristic marking of the pictures to be classified is not required to be carried out in a manual centralized mode, the pictures to be classified can be classified only by carrying out selection operation by a user, the classification process is simple, and the classification efficiency is effectively improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the description of the embodiments will be briefly described below, it being apparent that the drawings in the following description are only some embodiments of the invention, and that other drawings may be derived from those drawings by a person skilled in the art without inventive effort.
Fig. 1 is a schematic diagram illustrating an implementation environment of a picture classification method according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating an implementation environment of another picture classification method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a picture classification method according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating another picture classification method according to an example embodiment.
Fig. 5 is a schematic diagram of the display effect of an exemplary picture set.
Fig. 6 is a flowchart illustrating yet another picture classification method according to an exemplary embodiment.
Fig. 7 is a block diagram illustrating another picture classification apparatus according to an exemplary embodiment.
FIG. 8 is a block diagram illustrating a first determination module in accordance with an exemplary embodiment.
Fig. 9 to 13 are block diagrams of a picture classification apparatus according to an exemplary embodiment.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. 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 invention.
Referring to fig. 1, a schematic diagram of an implementation environment related to a picture classification method provided in some embodiments of the present invention is shown. The implementation environment may include: a picture sorting device 110 and at least one terminal 10.
The image classification device 110 may be a server, a server cluster composed of several servers, or a cloud computing service center. The terminal 120 may be a smartphone, a computer, a multimedia player, an e-reader, a wearable device, or the like.
The connection between the picture classification device 110 and the terminal 120 may be established through a wired network or a wireless network. In this embodiment of the present invention, the picture classification device 110 may provide a picture set to the terminal, so that the terminal presents the picture set to the user, and the picture classification device 110 receives a result of the user selecting pictures in the picture set, which is provided by the terminal, and classifies the pictures based on the result.
In an example, the picture sorting device 110 itself has an input/output interface, and thus, in the implementation environment, there is no need to set a terminal, the picture distribution device itself presents the picture set and receives the selection result input by the user, for example, the picture distribution device has a touch display screen, and the presentation of the picture set and the reception of the selection result are performed through the touch display screen.
In another example, as shown in fig. 2, the picture classification device 110 includes a classifier 1101 and an application server 1102, that is, the implementation environment may include: a classifier 1101, an application server 1102 and at least one terminal 120.
The classifier 1101 may be a server, a server cluster composed of several servers, or a cloud computing service center. The application server 1102 may be a server, a server cluster composed of several servers, or a cloud computing service center.
The classifier 1101 and the application server 1102 may be connected through a wired network or a wireless network, the application server 1102 and the terminal 120 may be connected through a wired network or a wireless network, and the classifier 1101 and the terminal 120 may be connected through a wired network or a wireless network.
In this implementation environment, the terminal 120 is installed with a specific client belonging to a specific application platform with the application server 1102, and some key functions of the specific application platform require authentication, such as a payment function or a login function. By way of example, the designated application platform may be an instant messaging platform, a ticketing platform, a payment platform, or a shopping platform, among others.
In the embodiment of the invention, when the user specifies the application platform to be authenticated, the specified application platform needs to execute at least a primary authentication process, and the primary authentication process is used for verifying whether the user is a natural person, so that the terminal is prevented from being remotely controlled to operate the client, the safety of data in the application platform is ensured, and the privacy of the user is further protected. A typical primary authentication process is a picture authentication process, that is, a process of providing some pictures to a user and identifying the pictures by the user according to a specified manner. Further, the specified application platform may further perform an advanced authentication process, where the advanced authentication process is used to verify whether the user is a registered user (or a legal user) of the specified application platform, so as to further ensure the security of data in the application platform, and further protect the privacy of the user. For example, the advanced authentication process may be a fingerprint authentication process, a palm print authentication process, an iris authentication process, a face image authentication process, or an account password authentication process.
The classifier 1101 may provide an authentication service for the specified application platform, the authentication service may be a service corresponding to the primary authentication process, the authentication service is executed based on a plurality of pictures, and the classifier 1101 may classify the pictures based on data obtained in the authentication process.
In the embodiment of the present invention, after the classifier 1101 classifies all the specified pictures, the classification model may be trained by using all the classified pictures as sample pictures, for example, the classification model is trained by a supervised learning algorithm. The classification model after the training can be used for image recognition, such as face recognition, and particularly in the field of security and protection, the classification model after the training can be used for effectively recognizing the face. The supervised learning algorithm is used for training a classification model by using a series of samples of known types to adjust parameters of the classification model so as to achieve required performance, and is also called a supervised training algorithm or a teacher learning algorithm.
It should be noted that the application server 1102 itself may perform the above-mentioned advanced authentication process, and optionally, the advanced authentication process may also be performed by other devices, which is not limited in this embodiment of the present invention.
An embodiment of the present invention provides a method for classifying pictures, as shown in fig. 3, including:
step 201, executing a picture verification process, where the picture verification process includes: and providing a picture set for a user to select pictures meeting the set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified.
The pictures in the picture set may be pictures of the same type (or attribute), for example, animal pictures, plant pictures, vehicle pictures, or human face pictures, and accordingly, the feature to be determined is a feature that the pictures of the type conform to.
For example, the characteristics to be determined in the animal picture are animal characteristics, including: mammals, reptiles, winged or four-legged, and the like; the characteristics that need to be determined for the plant picture are plant characteristics, including, for example, legumes, ferns, flowering or fruiting, and the like; the characteristic to be determined by the vehicle picture is a vehicle characteristic, such as a two-wheel vehicle, a three-wheel vehicle, a four-wheel vehicle, an electric vehicle or a motorcycle and the like; the human face picture needs to be determined by characteristics of the human face, such as double eyelids, wearing glasses, beard, long hair, short hair, white skin or high nose bridge, and the like. For different types of pictures, the division rule of the features can be manually specified or determined according to the actual use condition. For example, the facial features may be classified based on at least one classification rule of race, gender, skin color, size of five sense organs, hair length, and hair color.
Step 202, determining the association relationship between the pictures to be classified and the set characteristics in the picture set according to the selection result of the user on the pictures in the picture set.
The incidence relation between the picture to be classified and the set characteristic refers to whether the picture to be classified is in accordance with the set characteristic or not, and when the picture to be classified is determined to be in accordance with or not in accordance with the set characteristic, the classification action of the picture to be classified is finished.
In summary, the image classification method provided in the embodiments of the present invention provides an image set for a user to select an image that meets a set feature in the image set, and determines an association relationship between an image to be classified and the set feature in the image set according to a selection result of the user on the image in the image set. Because the characteristic marking of the pictures to be classified is not required to be carried out in a manual centralized mode, the pictures to be classified can be classified only by carrying out selection operation by a user, the classification process is simple, and the classification efficiency is effectively improved.
An embodiment of the present invention provides a method for classifying pictures, which can be applied to the implementation environment shown in fig. 1 or fig. 2, where, as described above, the picture set includes at least one picture meeting the set characteristics and at least one picture to be classified. In a first example, the picture set includes a picture from a first picture group and a picture from a second picture group, the picture in the first picture group conforms to a set characteristic, and the picture in the second picture group is a picture to be classified; in a second example, pictures in a picture set may be from the same group of pictures, where the setting characteristics of some of the pictures are known and the characteristics of another part of the pictures are unknown, the embodiment of the present invention takes a first example as an example to describe the picture classification method, and a second example corresponds to a picture classification process, which may refer to the process of the first example, as shown in fig. 4, where the method includes:
step 301, executing a picture verification process, where the picture verification process includes: and providing a picture set for a user to select pictures meeting the set characteristics in the picture set.
In the embodiment of the present invention, the picture classification device may be deployed with two picture groups, which are a first picture group and a second picture group, respectively, each picture group includes multiple pictures, and when there are more pictures in the two picture groups, the two picture groups may be deployed in a server in a centralized manner, or may be deployed in different servers, respectively. In order to ensure that the pictures in the first picture group accurately accord with the setting characteristics, usually the setting characteristics of the first picture group are determined manually, the accuracy of the first picture group according with the setting characteristics is close to one hundred percent, and the pictures in the second picture group are pictures to be classified. The setting feature of the picture in the first picture group may be recorded in a preset position in the picture classification device, as long as the feature is ensured to be inquired based on the corresponding picture identifier, or may be recorded in the picture data of the corresponding picture, and when the picture is displayed, the feature may be hidden or displayed, which is not limited in the embodiment of the present invention.
As mentioned above, the picture set provided by the picture classification device may include a picture from the first group of pictures and a picture from the second group of pictures, and the picture set is used for the user to select pictures meeting the set characteristics, that is, at least to select pictures in the picture set whose characteristics from the first group of pictures are known. The picture set can be directly provided for the terminal by the picture classification device, or can be forwarded to the terminal by the server and displayed by the terminal through a specified client. When the picture set is displayed, prompt information can be presented on a corresponding display interface to prompt a user to select pictures meeting the set characteristics. The prompt message can be a voice prompt message or a text prompt message.
Optionally, step 301 may include:
step A1, selecting t1 pictures from the first picture group, wherein the t1 pictures have the same pre-marked characteristics, and t1 is more than or equal to 1.
Optionally, t1 pictures may be selected from the first group of pictures according to a first designated order, where the first designated order is a preset order, for example, the first designated order may be a random order or a chronological order (e.g., picture storage time or picture generation time).
It should be noted that, the setting features that the pictures in the first picture group conform to may be the same or different, but if t1 is greater than or equal to 2 and the conforming setting features of t1 pictures are different, the prompt information needs to prompt the user to select multiple setting features because there are multiple setting features, which increases the operation complexity of the user and reduces the user experience. Therefore, when t1 is greater than or equal to 2, the set characteristics that t1 pictures conform to are the same. Furthermore, if the setting characteristics of the pictures in the first group of pictures are different, in order to ensure that the setting characteristics of the pictures in t1 are the same, the picture classification device needs to perform a screening operation to screen out the t1 pictures, the operation cost of the picture classification device is large, therefore, in order to reduce the operation cost of the picture classification device, the matching set characteristics in the first picture group can be the same, for example, the pictures in the first picture group all conform to the set characteristics of 'wearing glasses', the picture classification device can extract the pictures from the picture group directly, or the first picture group is divided into a plurality of subsets, the pictures in each subset conform to the same setting characteristic, for example, the first picture group is divided into 3 subsets, the setting features that the pictures in the 3 subsets conform to are 'double-edged eyelid', 'wearing glasses' and 'with beard', and the picture classification device can extract the pictures from the same subset directly. In the embodiment of the invention, the setting characteristics which are accorded with the pictures which accord with the setting characteristics in one picture set are ensured to be the same, so that the operation cost in the classification process can be reduced.
Step A2, selecting t2 pictures from the second group of pictures, wherein t2 is greater than or equal to 1.
Optionally, t2 pictures may be selected from the second group of pictures according to a second designated order, where the second designated order is a preset order, for example, the second designated order may be a random order or a chronological order (e.g., picture storage time or picture generation time).
And step A3, combining t1 pictures and t2 pictures into a picture set.
Optionally, t1 pictures and t2 pictures may be grouped into a picture set according to a third designated order, for example, the third designated order may be a random order or a chronological order of time (such as picture storage time or picture generation time).
It should be noted that, in the above steps a1 and a2, the same picture is not selected repeatedly to form the same picture set, so as to reduce the operation cost of the subsequent classification.
If the number of pictures in the picture set is too many, the user experience is poor due to too many selection actions executed when the user selects, and if the number of pictures in the picture set is too few, the efficiency of subsequent picture classification is low. Thus, typically, the set of pictures may comprise 2 to 6 pictures, for example 4 pictures. Wherein t1 is 1 or 2, and t2 is more than or equal to 2.
Referring to fig. 5, fig. 5 is a schematic diagram of the display effect of an exemplary picture set, where the picture set includes 4 pictures, that is, t1+ t2 is 4, and assuming that t1 is 1 and t2 is 3, the 4 pictures are respectively pictures P1, P2, P3, and P4. The picture P1 is from the first group of pictures, i.e. it is known to be a picture meeting the setting characteristics of "wearing glasses", and the pictures P2, P3 and P4 are from the second group of pictures, i.e. all three pictures to be classified. When the picture set is displayed, text prompt information W1 is presented on the corresponding display interface W to prompt the user to select pictures according with the set characteristics. As shown in fig. 5, the prompt message may be "please select the person wearing glasses".
Step 302, determining the association relationship between the pictures to be classified and the set characteristics in the picture set according to the selection result of the user on the pictures in the picture set.
Illustratively, step 302 may include:
and A1, screening target selection results from the obtained selection results, wherein the pictures indicated by the target selection results comprise pictures conforming to the set characteristics and pictures to be classified.
As the picture set comprises a plurality of pictures, the pictures indicated by the selection results of different users can have a plurality of combination situations, for example, in the first situation, the pictures indicated by the selection results only comprise pictures meeting the set characteristics; in the second case, the pictures indicated by the selection result only include the pictures to be classified; in the third case, the pictures indicated by the selection result comprise the pictures conforming to the set characteristics and the pictures to be classified, for the first and second cases, since the picture to be classified does not appear in the same selection result as the picture conforming to the set characteristics, the picture conforming to the set characteristics cannot provide reference for the classification of the picture to be classified, the selection result in both cases does not have a substantial effect on the classification of the pictures to be classified, for the following classification action belonging to the invalid selection result, and in the third case, since the picture to be classified and the picture conforming to the set characteristics appear in the same selection result, the picture conforming to the set characteristics can provide reference for the classification of the picture to be classified, therefore, the selection result in this case plays a substantial role in classifying the picture to be classified, and belongs to an effective selection result for the subsequent classification action. In the embodiment of the invention, the target selection result comprising the picture meeting the set characteristics and the picture to be classified can be screened from the obtained selection results, so that the picture classification can be carried out based on the target selection result, and the picture classification efficiency can be improved. It should be noted that, in the embodiment of the present invention, the fact that a certain picture appears in a selection result means that the picture indicated by the selection result includes the certain picture.
And A2, determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the target selection result.
The step a2 refers to determining whether the picture to be classified conforms to the set characteristics by using the picture conforming to the set characteristics in the target selection result as a reference.
In a first example, step a2 includes: and for any target selection result, determining that the picture to be classified appearing in the any target selection result conforms to the set characteristics, wherein the set characteristics are the characteristics which are conformed to the known picture conforming to the set characteristics in the any target selection result. For example, if the target selection result includes a picture meeting the set characteristic of "wearing glasses", it is determined that the picture to be classified in the target selection result meets the set characteristic: "wear glasses".
In a second example, step a2 includes:
step A21, based on the executed picture verification process, determining the selected proportion of each picture to be classified, wherein the selected proportion of any picture to be classified is as follows: in the executed picture verification process, in the target selection result under the condition that any picture to be classified and the picture meeting the set characteristics appear in one picture set together, the proportion of the picture to be classified appearing in the target selection result is determined.
For example, based on the executed picture verification process, the process of determining the selected proportion of each picture to be classified may include: based on the executed picture verification process, calculating the selected proportion P of each picture to be classified by adopting a proportion calculation formulak
In an alternative implementation, the proportion calculation formula includes:
Pk=m/n;
the image k is any image to be classified, m is the frequency of the image k appearing in a target selection result together with the image meeting the set characteristics in the executed image verification process, n is the frequency of the image k appearing in a image set together with the image meeting the set characteristics in the executed image verification process, and n is larger than or equal to 1. Wherein n is more than or equal to 1, the picture k and the target picture appear in a picture set together at least once in the process of multiple picture verification. Optionally, n is more than or equal to 2 or more than or equal to 3.
For example, assuming that the setting feature is "beard", the picture conforming to the setting feature is the target picture PX, the number of times that the picture k1 appears in one selection result together with the target picture PX in the multi-pass picture verification process is 5, and the number of times that the picture k1 appears in one picture set together with the target picture in the multi-pass picture verification process is 10, the ratio P of the selected pictures k1 is the ratio P of the setting feature of "beard"k15/10-50%. For another example, assuming that the setting feature is "wearing glasses", the picture conforming to the setting feature is the target picture PY, the number of times that the picture k2 appears together with the target picture PY in one selection result in the multi-picture verification process is 10, and the number of times that the picture k2 appears together with the target picture PY in one picture set in the multi-picture verification process is 10, the setting feature of "wearing glasses" is such that the proportion P of the selected picture k2 is Pk2=10/10=100%。
In another alternative implementation, the proportion calculation formula includes:
when n is 0, Pk=0;
When n ≠ 0, Pk=m/n;
Wherein, the picture k is any picture to be classified, m is the number of times that the picture k appears in the target selection result together with the picture meeting the set characteristics in the executed picture verification process, n is the number of times that the picture k appears in one picture set together with the picture meeting the set characteristics in the executed picture verification process, and it should be noted that when n is 0, it is described that the picture k has been verified in the executed pictureIf the pictures meeting the set characteristics never appear together in a picture set, P isk=0。
It should be noted that the number of times in the two optional implementation manners may be counted by a counter, or may be counted by a software manner, which is not limited in the embodiment of the present invention.
Step A22, when the selected proportion of any picture to be classified is larger than the proportion threshold value, determining that the picture to be classified conforms to the set characteristics.
For example, assuming that the ratio threshold is 95%, referring to the foregoing example, for the setting feature of "has a beard", the ratio of the picture k1 selected is 50%, which is less than 95%, and it is determined that the picture k1 does not conform to the setting feature of "has a beard"; for the set feature of "wearing glasses", the picture k2 is selected in a proportion of 100%, and if it is greater than 95%, it is consistent with the set feature "wearing glasses" for the picture k 2.
It should be noted that, the step a22 may be replaced by: and when the times that any picture to be classified and pictures meeting the set characteristics appear in one picture set together in the process of verifying the pictures for multiple times are larger than the first time threshold value, and the selected proportion is larger than the specified proportion threshold value, determining that the picture to be classified meets the set characteristics. For example, if the proportion threshold is 95%, the first time threshold is 100, and for the set feature "beard", the number of times that the picture k1 appears in a picture set together with the target picture in the multiple picture verification processes is 10 and less than 100, and the selected proportion is 50% and less than 95%, it is determined that the picture k1 does not conform to the set feature "beard"; for the setting feature "wear glasses", the picture k2 is selected in a proportion of 100%, which is greater than 95%, but the number of times of co-occurrence with the target picture in a picture set in the multiple picture verification process is 10, which is less than 100, and it is determined that the picture k2 does not conform to the setting feature "wear glasses".
Alternatively, the step a22 may be replaced by: and when the number of times that any picture to be classified and pictures meeting the set characteristics appear in a primary selection result in the process of verifying the pictures for multiple times is larger than a second secondary threshold value, and the selected proportion is larger than a specified proportion threshold value, determining that the picture to be classified meets the set characteristics.
For example, assuming that the proportion threshold is 95%, the second time threshold is 8, and for the set feature of "beard", the number of times that the picture k1 is selected in one selection result together with the target picture in the multiple picture verification processes is 5 and is less than 8, and the selected proportion is 50% and is less than 95%, it is determined that the picture k1 does not conform to the set feature of "beard"; for the characteristic of wearing glasses, the picture k2 is selected for 10 times and more than 8 times in one selection result together with the target picture in the multiple picture verification processes, and the selected proportion is 100 percent and more than 95 percent, so that the picture k2 is determined to be in accordance with the set characteristic of wearing glasses.
In the foregoing first example of the step a2, since some target selection results have certain artificial errors, which easily results in low accuracy of classification results, with the method in the second example of the step a2, since the pictures to be classified in the target selection results are screened under certain conditions, the accuracy of classification results is improved.
It should be noted that, the picture verification process is usually performed multiple times, so that the precision of picture classification can be further improved. In the embodiment of the present invention, step 302 may be performed periodically or aperiodically.
When step 302 is performed aperiodically, step 302 may be triggered to be performed based on a specified trigger operation, which may include: and after the trigger operation is detected, determining the incidence relation between the pictures to be classified and the set characteristics in the picture set based on multiple executed picture verification processes. The triggering operation may be executed by a designated device or may be executed manually, which is not limited in the embodiment of the present invention.
When step 302 is performed periodically, step 302 may include:
after every d times of the image verification processes are executed, determining the incidence relation between the images to be classified in the image set and the set characteristics according to the selection results of the user on the images in the image set based on the executed multiple times of the image verification processes, wherein d is a positive integer. Optionally, d is 1. Namely, after the picture verification process is executed for 1 time, namely based on the executed picture verification processes, the association relation between the picture to be classified and the set characteristics in the picture set is determined according to the selection result of the user on the pictures in the picture set. Therefore, real-time classification of the pictures can be realized, and the classification effectiveness is improved.
The picture classification device may further deploy a third picture group, where the third picture group is used to store pictures in the second picture group that have been determined to meet the set characteristics, and when there are many pictures in the third picture group, the third picture group may be deployed in one server, and the server may be located in the same server as the first picture group or the second picture group, or may be located in a different server. When the step 302 is executed periodically, after determining the association relationship between the picture to be classified and the setting feature in the picture set each time, an update process of the picture group and a correction process of the parameter may also be executed, which includes the following steps 303 to 307.
Step 303, adding the picture in the second picture group determined to meet the set characteristic to a third picture group, where the third picture group is used to store the picture in the second picture group meeting the set characteristic.
And step 304, deleting the pictures which are determined to accord with the set characteristics in the second picture group to obtain an updated second picture group.
The above steps 303 and 304 are the update process of the picture group, that is, the transfer process of the picture in the second picture group determined to meet the setting characteristics. For example, the second group of pictures includes 200 pictures, and the third group of pictures includes 0 picture, wherein after the above steps 301 to 302, it is determined that 10 pictures of the second group of pictures meet the setting characteristics, the 10 pictures are transferred from the second group of pictures to the third group of pictures through steps 303 and 304, and the third group of pictures includes 10 pictures, and the updated second group of pictures includes 190 pictures.
It should be noted that, when the number of the updated pictures in the second group of pictures is 0, which indicates that all the pictures in the second group of pictures are classified, in actual implementation, there may be pictures in the second group of pictures that do not conform to any set feature in the first group of pictures, and the pictures cannot be classified, so that if the ratio of the selected picture in the second group of pictures is continuously smaller than the specified ratio threshold value after multiple (e.g., preset multiple) computations, it is determined that the selected picture does not conform to any set feature in the first group of pictures, and the classification of the pictures may be stopped. The picture is deleted from the second group of pictures.
And 305, determining the accuracy of the pictures in the third picture group according with the set characteristics.
The pictures in the third group of pictures are the pictures in the second group of pictures determined to meet the set characteristics, namely the classified pictures, the pictures in the third group of pictures can be used as sample pictures, a supervised learning algorithm is adopted to train a classification model, and the classification model can be a neural network model, a decision tree model, a logistic regression model or a naive Bayes model and the like. Since the accuracy of the pictures in the third group of pictures determines the accuracy of the training of the classification model as the sample pictures, it is necessary to determine the accuracy of the pictures in the third group of pictures. In one example, the correctness of each picture may be determined manually. That is, the picture classification device may receive the accuracy rate of the picture in the third picture group that is obtained through manual calculation and meets the set characteristics, so as to determine the correctness of the picture.
However, since the order of the pictures in the third group of pictures is usually higher, there may be hundreds of thousands or millions of pictures, if the correctness of all the pictures in the third group of pictures is determined manually, the cost is higher, and the detection efficiency is lower.
In the embodiment of the present invention, the accuracy of the pictures in the third picture group may be determined in a spot check manner. Therefore, the labor cost can be effectively reduced, and the detection efficiency is improved.
In another example, sampling inspection is performed on the pictures in the third picture group, and the accuracy of the pictures meeting the set characteristics obtained by the sampling inspection is determined as the accuracy of the pictures in the third picture group meeting the set characteristics.
Optionally, r times of sampling inspection processes may be performed, where r is greater than or equal to 1, and each time of sampling inspection process includes: extracting f pictures in a third picture group according to a specified extraction mode, identifying whether each set characteristic is accurate, and calculating the accuracy rate u, u-f 1/f of the pictures in the f pictures based on the identification result of each picture, wherein f is more than or equal to 1, the specified extraction mode can be random extraction or extraction according to the sequence of storage time, and f1 is the number of the pictures which accord with the set characteristic in the f pictures; the accuracy o of the set feature in the third picture group is calculated based on the accuracy obtained in the r times of the sampling process, and for example, o may be equal to the average of the accuracy obtained in the r times of the sampling process, or a weighted average.
Step 306, when the accuracy is lower than the specified accuracy, adding all the pictures of the third group of pictures to the second group of pictures, and clearing the third group of pictures.
When the accuracy determined in step 306 is low, it is determined that the classification in the third group of pictures is unreliable, and in order to avoid that the subsequent training precision on the classification model is too low and the pictures in the third group of pictures need to be classified again, the pictures in the third group of pictures are transferred to the second group of pictures again to classify the pictures again. It should be noted that, when it is determined that a picture meeting the setting characteristics in the second picture group is transferred to the third picture group, the setting characteristics may be labeled, that is, the setting characteristics are associated with and recorded in the corresponding picture, for example, the setting characteristics are recorded in a preset position in the picture classification device or in picture data of the corresponding picture, and before the picture in the third picture group is transferred to the second picture group again, the labeled characteristics of the picture in the third picture group need to be removed, that is, when the characteristic is recorded in a preset position in the classifier, the characteristic recorded in the preset position is removed; and when the characteristics are recorded in the picture data of the corresponding picture, deleting the characteristics in the picture data.
Optionally, when the correctness determined in step 305 is not lower than the specified correctness, it indicates that the correctness of the picture in the third group of pictures is higher, and the third group of pictures can be used for training the classification model, and then the picture in the third group of pictures is directly extracted for training.
And 307, updating the designated parameters in the picture verification process to execute the picture verification process after the parameters are updated.
The specified parameters are parameters related to the above steps 301 to 302 in the picture classification process. For example, the number t1 of the first group of picture selection pictures in the step 301, the number t2 of the second group of picture selection pictures and/or the period d for performing the scale determination in the step 302 are not limited in the embodiment of the present invention.
The above steps 305 to 307 are the parameter calibration process. After the specified parameter update, the picture classification apparatus may execute step 301 again to execute the picture verification process after the parameter update, i.e., loop through steps 301 to 307. By updating the parameters, the accuracy of the set features in the third picture group can be adjusted, and the step 307 is stopped when the accuracy of the set features in the third picture group is higher than the specified accuracy, and the pictures in the third picture group at this time can be used for training the classification model.
It should be noted that, in the above embodiment, the setting features that need to be determined for executing one round of steps 301 to 307 (that is, one picture classification cycle) are the same setting feature, in practical implementation, the picture classification apparatus may determine different setting features of different pictures to be classified in one picture classification cycle, or determine different setting features of the same picture to be classified, and for each setting feature, the corresponding picture classification process may refer to the picture classification process in the previous picture classification cycle, which is not limited in the embodiment of the present invention.
In summary, the image classification method provided in the embodiments of the present invention provides an image set for a user to select an image that meets a set feature in the image set, and determines an association relationship between an image to be classified and the set feature in the image set according to a selection result of the user on the image in the image set. Because the characteristic marking of the pictures to be classified is not required to be carried out in a manual centralized mode, the pictures to be classified can be classified only by carrying out selection operation by a user, the classification process is simple, and the classification efficiency is effectively improved.
Further, in the embodiment of the present invention, the picture set may be used to perform user authentication on a user, where the picture authentication process is one of the primary authentication processes, in the application environment shown in fig. 1, the picture authentication process may be executed by a picture classification device, and in the application environment shown in fig. 2, the picture authentication process may be executed by a classifier in the picture classification device. For example, the picture selection may be performed by prompting the user to select a picture that meets a set characteristic, which is a characteristic that has been determined in advance. Accordingly, as shown in fig. 6, fig. 6 provides another picture classification method, which includes:
step 401, when the user identity authentication is required, the classifier executes a picture authentication process.
Referring to fig. 2, an application server 1102 may serve a plurality of terminals, each of which is installed with a designated client corresponding to the application server 1102. Therefore, for each terminal, when the user uses the specified client, if the user needs to perform authentication, the classifier performs a picture authentication process.
Optionally, in the embodiment of the present invention, the picture verification process includes: providing a collection of pictures, the picture verification process comprising: and providing a picture set for a user to select pictures meeting the set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified. The process may refer to step 301, which is not described in detail in this embodiment of the present invention.
Step 402, the classifier determines whether the user authentication is passed based on the selection result.
In the embodiment of the invention, the classifier can determine the selection result based on the selection instruction of the user. For example, if the user selects a certain picture, the classifier receives a selection instruction for the certain picture, and confirms that the selection result of the user indicates the certain picture.
In an optional manner, since the setting characteristics of the pictures in the first picture group are known, if the picture from the first picture group is selected by the selection instruction of the user, which indicates that the user selects the picture meeting the setting characteristics, the user can be considered as a natural person, and the authentication of the user can be passed. This step 402 may include the following verification scenario: when the pictures indicated by the selection result comprise pictures conforming to the set characteristics and pictures to be classified, determining that the user passes the user identity authentication; when the picture indicated by the selection result only comprises the picture which accords with the set characteristics, determining that the user passes the user identity authentication; and when the pictures indicated by the selection result only comprise the pictures to be classified, determining that the user fails the user authentication.
When there are 1 picture from the first group of pictures, please continue to refer to fig. 5, suppose picture P1 is from the first group of pictures, labeled "wearing glasses", pictures P2, P3, and P4 are from the second group of pictures. If the user selects the picture P1, the classifier determines that the user passes the user authentication after receiving a selection instruction for the picture P1; if the user selects the picture P1 and at least one of the pictures P2, P3 and P4, for example, the user selects the pictures P1 and P3, the classifier determines that the user passes the user authentication after receiving the corresponding selection instruction; if the user does not select the picture P1, the classifier determines that the user does not pass the user authentication after receiving the corresponding selection instruction. Optionally, the selection instruction is an instruction generated by the terminal after receiving a selection operation on a user interface of the terminal, and the terminal transmits the selection instruction to the classifier directly or indirectly through the server. Alternatively, the classifier may also interact directly with the user.
When there are a plurality of pictures from the first group of pictures, in the above verification situation, the pictures from the first group of pictures may be at least one picture from the first group of pictures in the picture set, or may be all pictures from the first group of pictures in the picture set, and generally, the more pictures in the picture set that conform to the known setting feature, the higher the accuracy of the final authentication is, and therefore, when the pictures from the first group of pictures are all pictures in the picture set that conform to the same setting feature, the higher the accuracy of the authentication is. With continued reference to fig. 5, assume that both picture P1 and picture P2 are from the first group of pictures, labeled "male," and that pictures P3 and P4 are from the second group of pictures. When the picture from the first group of pictures is at least one picture from the first group of pictures in the picture set, if the user selects the pictures P1 and P3, the classifier determines that the user passes the user authentication after receiving a selection instruction for the pictures P1 and P3. When the pictures from the first group of pictures are all the pictures from the first group of pictures in the picture set, if the user selects the pictures P1 and P3, since the user does not have an exhaustive selection of the pictures in the first group of pictures in the picture set, the classifier determines that the user does not pass the user authentication after receiving the selection instruction for the pictures P1 and P3.
In another alternative, authentication may be performed through associations between natural persons.
When a plurality of users (the plurality of users refers to at least two users, for example, 5 or 10 users) need to perform authentication (for example, in a high-concurrency scenario) exist at the same time, the classifier provides the same picture set to the plurality of users, and then the classifier may determine a selection result which is the highest in all the selection results based on the selection results of the plurality of users on the picture set; and determining that the user corresponding to the selection result with the highest percentage passes the user identity authentication. Where, at the same time, it means within a specified time period, the specified time period is usually less than a specified time threshold, and the user can hardly perceive the time delay, for example, the specified time period is several milliseconds.
Assuming that the picture sets provided for the users are sets as shown in fig. 5, and the users are 5 users, based on the selection results of the 5 users, it is known that the users who simultaneously select the pictures P1 and P3 account for 3, the users who only select the picture P1 account for 1, the users who only select the picture P2 account for 1, and obviously, the selection result with the highest proportion is the corresponding selection result when the pictures P1 and P3 are simultaneously selected, it is determined that the 3 users who simultaneously select the pictures P1 and P3 pass the user authentication. Optionally, when there are a plurality of selection results with the highest percentage, it is determined that all users corresponding to the plurality of selection results with the highest percentage pass user authentication. Further, in order to improve the accuracy of the identity authentication, if the proportions of the plurality of selection results with the highest proportion are all greater than a preset proportion threshold, it is determined that all users corresponding to the selection results with the highest proportion pass the user identity authentication; and if the proportion of the selection results with the highest occupation ratios is not greater than the preset occupation ratio threshold, determining that the users corresponding to the selection results with the highest occupation ratios do not pass the user identity authentication.
Since the same selection result selected by the majority of people is more accurate than the same selection result selected by the minority of people in general, the identity verification method adopts the principle of crowdsourcing, namely, the selection result with the highest percentage is determined as the correct selection result, so that the user corresponding to the correct selection result passes the identity verification, errors of the selection result caused by some human factors can be eliminated, and the probability that the user passing the identity verification is a natural person is improved.
And step 403, determining the association relationship between the pictures to be classified and the set characteristics in the picture set by the classifier according to the selection result of the user on the pictures in the picture set.
Step 403 may refer to step 302, which is not described in detail in the embodiment of the present invention.
It should be noted that, as described in the foregoing step 302, the association relationship between the picture to be classified and the set feature in the picture set may be determined by screening the target selection result and based on the target selection result, in the embodiment of the present invention, the target selection result may be a selection result of the user who passes the user identity authentication, and particularly when the identity authentication method provided in another optional manner in the foregoing step 402 is adopted, since the accuracy of the identity authentication is higher in this manner, the target selection result is a selection result of the user who passes the user identity authentication, which may ensure the accuracy of the determined association relationship and improve the reliability of classification.
In step 404, the classifier adds the picture in the second group of pictures determined to meet the set characteristics to a third group of pictures, where the third group of pictures is used to store the pictures in the second group of pictures meeting the set characteristics.
Step 405, the classifier deletes the pictures in the second group of pictures determined to meet the set characteristics, and obtains an updated second group of pictures.
The above steps 404 and 405 are the update process of the group of pictures, i.e. the transfer process of the pictures conforming to the set characteristics. Which may be referred to in the foregoing with reference to steps 303 and 304.
In step 406, the classifier determines the accuracy of the pictures in the third group of pictures meeting the set characteristics.
Step 407, when the accuracy is lower than the specified accuracy, the classifier adds all the pictures of the third group of pictures to the second group of pictures, and clears the third group of pictures.
Step 408, the classifier updates the designated parameters in the picture verification process.
The above steps 406 to 408 are the calibration process of the parameters. Reference may be made to steps 305 to 307, respectively, above.
It should be noted that, the order of the steps of the image classification method provided in the embodiment of the present invention may be appropriately adjusted, and the steps may also be increased or decreased according to the circumstances, for example, the above steps 303 to 304, or the steps 404 to 405 may be deleted according to the specific circumstances. For example, the classifier may divide a specified set in the second group of pictures without deploying the third group of pictures, and store pictures in the second group of pictures that are determined to meet the set characteristics with the specified set. The third group of pictures in steps 404 to 408 above may be replaced by the specified set.
Optionally, the embodiment of the present invention further describes the above steps 301 to 303, or 401 to 404 with the following examples. Suppose that the classifier is deployed with 3 picture groups, which are a first picture group, a second picture group and a third picture group, respectively, where the first picture group includes 100 pictures known to meet the set characteristics, the first picture group includes 2 sets, which are a first subset and a second subset, each subset includes 50 pictures, the set characteristics met by the 50 pictures of the first subset are the same and are all "beard", the set characteristics met by the 50 pictures of the second subset are the same and are all "wear glasses", the second picture group includes 10000 pictures to be classified, and the third picture group includes 0 picture.
Setting characteristics q corresponding to the first subset: for example, "there is a mustache" and it is assumed that the pictures in the picture set that meet the set characteristics are from the pictures in the first subset, step 403 is performed periodically, and the period is a picture verification process, that is, d is 1, the specified ratio threshold is P, for any picture k in the second picture group, n is initialized to 0, m is 0, n is the number of times that the picture k appears in one picture set together with the pictures that meet the set characteristics in the performed picture verification process, and m is the number of times that the picture k appears in one target selection result together with the pictures that meet the set characteristics in the performed picture verification process. The following process is performed:
in step B1, after the picture verification process is performed once, it is detected whether the picture k appears in a single picture set together with the picture k conforming to the setting characteristics, and step B2 is performed.
Step B2, when the picture k and the picture matching the set feature appear in one picture set, updating n so that the updated n is n +1, and executing step B3; when the picture k and the picture conforming to the setting feature do not co-appear in one picture set, keeping n unchanged, step B1 is performed.
In step B3, when the picture k appears together with the picture matching the set feature in the primary selection result for the current picture set, m is updated so that m becomes m +1 after the update, and step B4 is executed. When the picture k and the picture conforming to the set feature do not appear together in the one-time selection result for the current picture set, keeping m unchanged, executing step B4 or executing step B1.
Step B4, calculating the probability P of the selected picture k by adopting a proportion calculation formulak(ii) a Step B5 is performed.
Step B4 may refer to step 302 above.
Step B5, when P iskIf the number of the pictures k is larger than P, the picture k is determined to accord with the set characteristic q, and the picture k is transferred to a third picture group.
Step B6, when P iskNot greater than P, performing steps B1-B6 again until PkIs greater than P.
The above steps B1 to B6 may be performed for each picture in the second group of pictures, and when all the pictures in the second group of pictures are classified completely, that is, all the pictures in the second group of pictures are transferred to the third group of pictures, the classification process is stopped. In practice, if some pictures in the second group of pictures still do not satisfy P after performing steps B1-B6 for multiple times (e.g. predetermined times)kIf P is greater than P, the pictures may be considered to be out of compliance with the setting feature q: "has mustache", the set feature q may be updated to a second set of features: "wear glasses", the above steps B1 to B6 are performed on the pictures for further classification, and the embodiment of the present invention is not repeated herein.
Finally, based on the above process, it is assumed that 10000 pictures in the second picture group are finally determined to have 7000 pictures conforming to the setting characteristic "with a beard", 3000 pictures conforming to the setting characteristic "with glasses", and the 10000 pictures are finally stored in two subsets or two third picture groups respectively in the third picture group (thus, it is ensured that pictures with the same setting characteristic are stored together to ensure the accuracy of the training). Under the condition, 10000 pictures can be classified by taking 100 pictures of the first picture group as reference, so that the picture classification efficiency is effectively improved.
It should be noted that the above steps B1 to B6 are only one exemplary implementation of steps 301 to 303, or steps 401 to 404, and other implementations are also within the scope of the embodiments of the present invention.
In summary, the image classification method provided in the embodiments of the present invention provides an image set for a user to select an image that meets a set feature in the image set, and determines an association relationship between an image to be classified and the set feature in the image set according to a selection result of the user on the image in the image set. Because the characteristic marking of the pictures to be classified is not required to be carried out in a manual centralized mode, the pictures to be classified can be classified only by carrying out selection operation by a user, the classification process is simple, and the classification efficiency is effectively improved.
Further, the image classification method executes an image verification process when performing identity verification, and classifies the unclassified images based on the executed image verification process. The identity authentication and picture classification processes are combined, the verified user selects the picture in the picture authentication process, and feature labeling of the unclassified picture is not needed to be carried out manually and intensively, so that the classification efficiency is effectively improved, and the flexibility of picture classification is improved.
The image classification method provided by the embodiment of the invention is combined with the identity verification function of the appointed application platform and is combined with knowledge such as big data, statistics and the like to automatically classify the images. The pictures which are adopted by the picture set and accord with the set characteristics can be only hundreds or thousands of pictures, and tens of thousands of pictures to be classified can be classified. For example, the first group of pictures may only include hundreds or thousands of pictures, that is, tens of thousands of pictures in the second group of pictures may be classified. For large-scale pictures, a large amount of manpower is not required to be consumed for feature labeling. If the number of users of the appointed application platform is enough, the whole huge work can be reduced to zero, the labeling efficiency is improved, the labor cost is saved, the classifier is used for automatically calculating and counting, the classification efficiency is exponentially improved, and the classification work which can not be finished in the traditional mode is finished.
The embodiment of the invention supports the classification of various pictures, such as animal pictures, plant pictures, vehicle pictures or human face pictures, and the like, and has wide application range and high universality. The image classification method is not only suitable for the security field, but also can be applied to other fields, such as the intelligent teaching field, the intelligent automobile network or the Internet of things.
It should be noted that, in the above steps 401 to 408, only the classifier is used to execute the above-mentioned picture classification method as an example, the above-mentioned picture classification method may also be executed by a picture classification device, and the picture classification device has functions of both the classifier and an application server, which is not limited in this embodiment of the present invention.
An embodiment of the present invention provides an image classification apparatus 50, as shown in fig. 7, the apparatus 50 includes: a processing module 501, configured to execute a picture verification process, where the picture verification process includes: providing a picture set for a user to select pictures meeting set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified; the first determining module 502 is configured to determine, according to a selection result of a user on a picture in the picture set, an association relationship between a picture to be classified in the picture set and the setting feature.
In summary, in the image classification device provided in the embodiment of the present invention, the processing module provides the image set for the user to select the image meeting the set feature in the image set, and the first determining module determines the association relationship between the image to be classified and the set feature in the image set according to the selection result of the user on the image in the image set. Because the characteristic marking of the pictures to be classified is not required to be carried out in a manual centralized mode, the pictures to be classified can be classified only by carrying out selection operation by a user, the classification process is simple, and the classification efficiency is effectively improved.
Optionally, as shown in fig. 8, the first determining module 502 includes: the screening submodule 5021 is used for screening a target selection result from the obtained selection results, wherein the pictures indicated by the target selection result comprise pictures meeting set characteristics and pictures to be classified; the determining submodule 5022 is used for determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the target selection result.
Optionally, the determining sub-module 5022 is configured to: determining the selected proportion of each picture to be classified based on the executed picture verification process, wherein the selected proportion of any picture to be classified is the proportion of any picture to be classified appearing in the target selection result under the condition that any picture to be classified and pictures conforming to the set characteristics appear in one picture set together in the executed picture verification process;
and when the selected proportion of any picture to be classified is greater than the proportion threshold value, determining that any picture to be classified conforms to the set characteristics.
Optionally, the determining sub-module 5022 is configured to: based on the executed picture verification process, calculating the selected proportion P of each picture to be classified by adopting a proportion calculation formulakThe proportion calculation formula comprises: pk=m/n;
The image k is any image to be classified, m is the frequency of the image k appearing in a target selection result together with the image meeting the set characteristics in the executed image verification process, n is the frequency of the image k appearing in a image set together with the image meeting the set characteristics in the executed image verification process, and n is larger than or equal to 1.
Optionally, the picture set includes a picture from a first picture group and a picture from a second picture group, the picture in the first picture group conforms to the setting characteristic, and the picture in the second picture group is a picture to be classified, as shown in fig. 9, the apparatus 50 further includes:
the first adding module 503 is configured to, after determining an association relationship between a picture to be classified and a set feature in the picture set according to a selection result of a user on a picture in the picture set, add a picture determined to meet the set feature in the second picture group to a third picture group, where the third picture group is used to store pictures meeting the set feature in the second picture group;
the deleting module 504 is configured to delete the picture in the second picture group that is determined to meet the setting characteristic, so as to obtain an updated second picture group.
Optionally, as shown in fig. 10, the apparatus 50 further includes: a second determining module 505, configured to determine, after adding the picture in the second group of pictures for which the setting characteristic has been determined to a third group of pictures, a correct rate at which the pictures in the third group of pictures meet the setting characteristic;
a second adding module 506, configured to add all the pictures of the third group of pictures to the second group of pictures and clear the third group of pictures when the accuracy is lower than the specified accuracy;
the updating module 507 is configured to update the specified parameters in the picture verification process, so as to execute the picture verification process after the parameters are updated.
Optionally, the second determining module 505 is configured to: receiving the accuracy rate of the pictures in the third picture group which are obtained by manual calculation and accord with the set characteristics;
or sampling and checking the pictures in the third picture group, and determining the accuracy of the pictures meeting the set characteristics obtained by sampling and checking as the accuracy of the pictures meeting the set characteristics in the third picture group.
Optionally, the processing module 501 is configured to: selecting t1 pictures in the first picture group, wherein t1 is more than or equal to 1; selecting t2 pictures in the second picture group, wherein t2 is more than or equal to 1;
and combining the t1 pictures and the t2 pictures into a picture set.
Optionally, the picture verification process has multiple times, and the first determining module 502 is configured to:
and after the picture verification process is executed each time, determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set.
Optionally, the picture set is used for user authentication of the user, as shown in fig. 11, the apparatus 50 further includes: and a third determining module 508, configured to determine that the user passes the user identity authentication when the pictures indicated by the selection result include a picture meeting the set characteristics and a picture to be classified.
Optionally, the picture set is used to perform user authentication on the user, the target selection result is a selection result of the user who passes the user authentication, and when there are multiple users at the same time and the user authentication needs to be performed, the picture sets provided to the multiple users are the same, as shown in fig. 12, the apparatus 50 further includes:
a fourth determining module 509, configured to determine, based on the selection results of the plurality of users on the picture set, a ratio of the number of different selection results to the total number of all selection results;
a fifth determining module 510, configured to determine that the user corresponding to the selection result with the highest number of the selections passes the user authentication.
An embodiment of the present invention provides a computer device, which may be the image classification apparatus described above, as shown in fig. 13, the computer device 01 includes: including a processor 12 and a memory 16,
the memory 16 is used for storing computer programs;
the processor 12 is configured to execute the program stored in the memory 16 to implement the image classification method according to the foregoing embodiment.
In particular, processor 12 includes one or more processing cores. The processor 12 executes various functional applications and data processing by running a computer program stored in the memory 16, which includes software programs and units.
The computer programs stored by the memory 16 include software programs and units. In particular, memory 16 may store an operating system 162, an application unit 164 required for at least one function. Operating system 162 may be a Real Time eXceptive (RTX) operating system, such as LINUX, UNIX, WINDOWS, or OS X. Wherein the application unit 164 may comprise a processing unit 164a and a determination unit 164 b.
The processing unit 164a has the same or similar functions as the processing module 501.
The determination unit 164b has the same or similar functions as the first determination module 502.
An embodiment of the present invention provides a storage medium, which may be a non-volatile computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the computer program implements any one of the image classification methods provided in the foregoing embodiments.
The embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the image classification method provided by the above method embodiment.
The embodiment of the invention provides a picture classification system, which comprises:
the image classification device comprises the image classification device shown in any one of the figures 7, 9 and 12. The architecture of the picture classification system can refer to the architecture in the implementation environment shown in fig. 1 or fig. 2.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method for classifying pictures, the method comprising:
performing a picture verification process, the picture verification process comprising: providing a picture set for a user to select pictures meeting set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified;
and determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set.
2. The method according to claim 1, wherein the determining the association relationship between the picture to be classified in the picture set and the setting feature according to the selection result of the user on the picture in the picture set comprises:
screening a target selection result from the obtained selection results, wherein the pictures indicated by the target selection result comprise pictures conforming to the set characteristics and the pictures to be classified;
and determining the incidence relation between the picture to be classified in the picture set and the set characteristics according to the target selection result.
3. The method according to claim 2, wherein the determining the association relationship between the picture to be classified in the picture set and the setting feature according to the target selection result comprises:
determining the selected proportion of each picture to be classified based on the executed picture verification process, wherein the selected proportion of any picture to be classified is the proportion of any picture to be classified appearing in a target selection result under the condition that any picture to be classified and pictures conforming to the set characteristics appear in one picture set in the executed picture verification process;
and when the selected proportion of any picture to be classified is greater than a proportion threshold value, determining that the picture to be classified conforms to the set characteristics.
4. The method according to claim 3, wherein the determining a proportion of each of the pictures to be classified that are selected based on the picture verification process that has been performed comprises:
based on the executed picture verification process, calculating the selected proportion P of each picture to be classified by adopting a proportion calculation formulakThe proportion calculation formula comprises:
Pk=m/n;
the image k is any image to be classified, the m is the number of times that the image k and the image meeting the set characteristics appear in a target selection result together in the executed image verification process, the n is the number of times that the image k and the image meeting the set characteristics appear in one image set together in the executed image verification process, and the n is larger than or equal to 1.
5. The method according to any one of claims 1 to 4, wherein the picture set includes a picture from a first picture group and a picture from a second picture group, the picture in the first picture group conforms to the setting feature, the picture in the second picture group is a picture to be classified, and after the association relationship between the picture to be classified in the picture set and the setting feature is determined according to the selection result of the user on the picture in the picture set, the method further includes:
adding pictures in the second picture group which are determined to accord with the set characteristics to a third picture group, wherein the third picture group is used for storing the pictures in the second picture group which accord with the set characteristics;
and deleting the pictures which are determined to accord with the set characteristics in the second picture group to obtain an updated second picture group.
6. The method according to claim 5, wherein after the adding the picture of which the setting characteristic is determined in the second picture group to a third picture group, the method further comprises:
determining the accuracy of the pictures in the third picture group according with the set characteristics;
when the accuracy is lower than a specified accuracy, adding all the pictures of the third picture group to the second picture group, and clearing the third picture group;
and updating the designated parameters in the picture verification process so as to execute the picture verification process after the parameters are updated.
7. An apparatus for classifying pictures, the apparatus comprising:
a processing module configured to perform a picture verification process, the picture verification process comprising: providing a picture set for a user to select pictures meeting set characteristics in the picture set, wherein the picture set comprises at least one picture meeting the set characteristics and at least one picture to be classified;
and the first determining module is used for determining the incidence relation between the pictures to be classified in the picture set and the set characteristics according to the selection result of the user on the pictures in the picture set.
8. A computer device comprising a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor is configured to execute the program stored in the memory to implement the image classification method according to any one of claims 1 to 12.
9. A storage medium, in which a computer program is stored, which, when executed by a processor, implements the picture classification method according to any one of claims 1 to 6.
10. A picture classification system, comprising:
an image classification device and a terminal, the image classification device comprising the picture classification apparatus of claim 7.
CN201910189955.9A 2019-03-13 2019-03-13 Picture classification method, device and system Withdrawn CN111368866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910189955.9A CN111368866A (en) 2019-03-13 2019-03-13 Picture classification method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910189955.9A CN111368866A (en) 2019-03-13 2019-03-13 Picture classification method, device and system

Publications (1)

Publication Number Publication Date
CN111368866A true CN111368866A (en) 2020-07-03

Family

ID=71206178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910189955.9A Withdrawn CN111368866A (en) 2019-03-13 2019-03-13 Picture classification method, device and system

Country Status (1)

Country Link
CN (1) CN111368866A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112163485A (en) * 2020-09-18 2021-01-01 杭州海康威视系统技术有限公司 Data processing method and device, database system and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034029A (en) * 2015-03-20 2016-10-19 阿里巴巴集团控股有限公司 Verification method and apparatus based on image verification codes
US20170161477A1 (en) * 2015-12-03 2017-06-08 Google Inc. Image Based CAPTCHA Challenges
CN107908641A (en) * 2017-09-27 2018-04-13 百度在线网络技术(北京)有限公司 A kind of method and system for obtaining picture labeled data
CN108062377A (en) * 2017-12-12 2018-05-22 百度在线网络技术(北京)有限公司 The foundation of label picture collection, definite method, apparatus, equipment and the medium of label

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034029A (en) * 2015-03-20 2016-10-19 阿里巴巴集团控股有限公司 Verification method and apparatus based on image verification codes
US20170161477A1 (en) * 2015-12-03 2017-06-08 Google Inc. Image Based CAPTCHA Challenges
CN107908641A (en) * 2017-09-27 2018-04-13 百度在线网络技术(北京)有限公司 A kind of method and system for obtaining picture labeled data
CN108062377A (en) * 2017-12-12 2018-05-22 百度在线网络技术(北京)有限公司 The foundation of label picture collection, definite method, apparatus, equipment and the medium of label

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112163485A (en) * 2020-09-18 2021-01-01 杭州海康威视系统技术有限公司 Data processing method and device, database system and electronic equipment
CN112163485B (en) * 2020-09-18 2023-11-24 杭州海康威视系统技术有限公司 Data processing method and device, database system and electronic equipment

Similar Documents

Publication Publication Date Title
WO2019119505A1 (en) Face recognition method and device, computer device and storage medium
CN109509021B (en) Behavior track-based anomaly identification method and device, server and storage medium
US20180308107A1 (en) Living-body detection based anti-cheating online research method, device and system
TW202123052A (en) Coding model training method and device for preventing private data leakage
JP6994588B2 (en) Face feature extraction model training method, face feature extraction method, equipment, equipment and storage medium
CN111783505A (en) Method and device for identifying forged faces and computer-readable storage medium
US11126827B2 (en) Method and system for image identification
CN111626371A (en) Image classification method, device and equipment and readable storage medium
WO2022105118A1 (en) Image-based health status identification method and apparatus, device and storage medium
CN109903053B (en) Anti-fraud method for behavior recognition based on sensor data
CN110909195A (en) Picture labeling method and device based on block chain, storage medium and server
CN111291773A (en) Feature identification method and device
RU2381553C1 (en) Method and system for recognising faces based on list of people not subject to verification
CN111144369A (en) Face attribute identification method and device
CN111368866A (en) Picture classification method, device and system
US20230281462A1 (en) Data processing method and apparatus, device, and medium
CN113762019B (en) Training method of feature extraction network, face recognition method and device
CN109859011A (en) Based on the information push method in store, system and its storage medium in jewellery wire
WO2022089220A1 (en) Image data processing method and apparatus, device, storage medium, and product
CN109460485A (en) A kind of image library method for building up, device and storage medium
CN114170484A (en) Picture attribute prediction method and device, electronic equipment and storage medium
CN110956098B (en) Image processing method and related equipment
CN113591603A (en) Certificate verification method and device, electronic equipment and storage medium
CN115708135A (en) Face recognition model processing method, face recognition method and device
CN112560880A (en) Object classification method, object classification apparatus, and computer-readable storage medium

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200703

WW01 Invention patent application withdrawn after publication