Disclosure of Invention
The embodiment of the invention provides a pet color value scoring method, a pet color value scoring device, a pet color value scoring storage medium and pet color value scoring equipment, which can quantitatively score the color value of a pet according to the fine granularity category of the pet and key point information.
According to an embodiment of the invention, a pet color value scoring method is provided, which comprises the following steps:
performing fine-grained analysis based on the obtained pet image to obtain a fine-grained category of the pet;
detecting the face in the image based on the fine-grained category to obtain a face image of the pet;
analyzing the face image to obtain key point information in the face image;
calculating according to the key point information to obtain a group of judgment parameter sets, wherein a plurality of judgment parameters are arranged in the judgment parameter sets;
and carrying out weighted comparison on the calculated evaluation parameters and the standard parameters corresponding to the fine-grained categories to obtain the color value score of the pet to be detected.
Further, before performing a fine-grained analysis based on the obtained pet image to obtain a fine-grained category of the pet, the method further includes:
and acquiring an image of the pet to be detected.
Further, the weighting comparison of the calculated evaluation parameters and the standard parameters corresponding to the fine-grained categories is performed, and the obtaining of the color value score of the pet to be detected comprises:
calculating the color value score of the pet by a color value scoring formula;
the face score formula is:
S=λ1×m1+λ2×m2+...+λn×mn
wherein S is the color score, λ1,λ2,..,λnAre each a weight number, m, of from 0 to 11,m2,..,mnThe evaluation parameters are respectively in the evaluation parameter group.
A pet color value scoring device comprising:
the fine-grained classification model is used for carrying out fine-grained analysis on the basis of the obtained pet image to obtain the fine-grained category of the pet;
the target detection model is used for detecting the face in the image based on the fine-grained category to obtain the face image of the pet;
the key point detection model is used for analyzing the face image to obtain key point information in the face image;
the parameter calculation module is used for calculating according to the key point information to obtain a group of judgment parameter sets, and a plurality of judgment parameters are arranged in the judgment parameter sets;
and the color value scoring module is used for carrying out weighted comparison on the calculated judging parameters and standard parameters corresponding to the fine-grained categories to obtain the color value score of the pet to be detected.
Further, the apparatus comprises:
and the image acquisition module is used for acquiring the image of the pet to be detected.
Further, the color value scoring module comprises:
the calculating unit is used for calculating the color value score of the pet through a color value scoring formula;
the face score formula is:
S=λ1×m1+λ2×m2+...+λn×mn
wherein S is the color score, λ1,λ2,..,λnAre each a weight number, m, of from 0 to 11,m2,..,mnThe evaluation parameters are respectively in the evaluation parameter group.
A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the pet color value scoring method as in any one of the above.
A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes the connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps of any of the pet color value scoring methods described above.
In the pet color value scoring method, the pet color value scoring device, the storage medium and the pet color value scoring equipment in the embodiment of the invention, the method comprises the following steps: performing fine-grained analysis based on the obtained pet image to obtain a fine-grained category of the pet; detecting the face in the image based on the fine-grained category to obtain a face image of the pet; analyzing the face image to obtain key point information in the face image; calculating according to the key point information to obtain a group of judgment parameter sets, wherein a plurality of judgment parameters are arranged in the judgment parameter sets; and carrying out weighted comparison on the calculated evaluation parameters and standard parameters corresponding to the fine-grained categories to obtain the color value score of the pet to be detected. Based on the obtained fine-grained category of the pet, a facial image of the pet is obtained according to the fine-grained category, the facial image is analyzed to obtain key point information in the facial image, a plurality of judgment parameters are obtained through calculation according to the key point information, the judgment parameters are subjected to weighted comparison with standard parameters corresponding to the fine-grained category, and a color value score of the pet to be detected is obtained; the method and the device can quantitatively score the color value of the pet according to the fine granularity category of the pet and the key point information.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and 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.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the present invention, a pet color value scoring method is provided, referring to fig. 1 and 2, including the following steps:
s101: performing fine-grained analysis based on the obtained pet image to obtain a fine-grained category of the pet;
s102: detecting the face in the image based on the fine-grained category to obtain a face image of the pet;
s103: analyzing the face image to obtain key point information in the face image;
s104: calculating according to the key point information to obtain a group of judgment parameter sets, wherein a plurality of judgment parameters are arranged in the judgment parameter sets;
s105: and carrying out weighted comparison on the calculated evaluation parameters and the standard parameters corresponding to the fine-grained categories to obtain the color value score of the pet to be detected.
Based on the obtained fine-grained category of the pet, a facial image of the pet is obtained according to the fine-grained category, the facial image is analyzed to obtain key point information in the facial image, a plurality of judgment parameters are obtained through calculation according to the key point information, the judgment parameters are subjected to weighted comparison with standard parameters corresponding to the fine-grained category, and a color value score of the pet to be detected is obtained; the method and the device can quantitatively score the color value of the pet according to the fine granularity category of the pet and the key point information.
In an embodiment, before performing a fine-grained analysis based on the obtained pet image to obtain a fine-grained category of the pet, the method further includes:
and acquiring an image of the pet to be detected.
The pet scoring method and the pet scoring system have the advantages that the pet to be scored is photographed through the camera, and the photographed image is used for scoring.
In the embodiment, the weighting comparison of the calculated evaluation parameter and the standard parameter corresponding to the fine-grained category is performed to obtain the color value score of the pet to be detected, which comprises:
calculating the color value score of the pet by a color value scoring formula;
the face score formula is:
S=λ1×m1+λ2×m2+...+λn×mn
wherein S is the color score, λ1,λ2,..,λnAre each a weight number, m, of from 0 to 11,m2,..,mnThe evaluation parameters are respectively in the evaluation parameter group.
The calculated evaluation parameters are compared with the standard evaluation parameters corresponding to the pet categories in a weighted mode, the weights are dynamically adjusted according to the specific categories, and finally the color score is obtained.
Specifically, the color value scoring formula is:
color value of lambda1X parameter1+λ2X parameter2+......+λnX parametern
λ1,λ2,..,λnThe weights between 0 and 1 are different according to the specific fine-grained classes.
The method and the device can be used for scoring the color values of various pets, for example, the color value of a cat is scored when an image of the cat is acquired, and the color value of a dog is scored when an image of a pet dog is acquired.
The pet color value scoring method of the present invention is described in detail below with reference to a specific example of a cat:
the method comprises the following steps: an image of the pet cat is obtained.
Step two: and inputting the acquired image into a cat fine-grained classification model to obtain the cat fine-grained classification.
Specifically, for example, the fine-grained categories of cats are obtained as bose cats, puppet cats, siamese cats, and the like.
Step three: and inputting the image of the cat into the cat face detection model to obtain a cat face image.
Step four: and obtaining the positions of a plurality of cat face key points of the cat face image through a cat face key point detection model, and calculating a group of judgment parameter sets by utilizing the position information of the key points.
Specifically, the cat face joint point may be a predetermined characteristic of the cat face, such as the cat's eyes, ears, nose, mouth, and cat's hair, including the color, length, color, smoothness, etc. of the hair; the number of acquisitions may be chosen, and fifteen key points on the cat face are chosen for calculation in this embodiment.
Step five: and carrying out weighted comparison on the calculated evaluation parameters and the standard evaluation parameters corresponding to the cat categories, and dynamically adjusting the weight according to the specific categories to finally obtain the color score.
Specifically, calculating the color value score of the pet by a color value scoring formula;
the face score formula is:
S=λ1×m1+λ2×m2+...+λn×mn
wherein S is the color score, λ1,λ2,..,λnAre each a weight number, m, of from 0 to 11,m2,..,mnThe evaluation parameters are respectively in the evaluation parameter group.
Specifically, if the pet dog needs to be scored, the scoring step is carried out on the image of the pet dog according to the steps.
Specifically, the training steps of the cat fine-grained classification model are as follows:
the first step is as follows: the characteristics of various cats are preset.
The second step is that: images of a large number of various types of cats are input.
The third step: and identifying the features in all the images, and comparing the acquired features in each image with the features of the preset cat.
The fourth step: and (3) determining the cat of the category as the cat of the high similarity between the features acquired from the images and the features of the preset cat through an algorithm until the categories of the cats in all the images are classified, and finishing the fine-grained classification model.
In particular, for other pets, such as dogs, a fine-grained classification model of the dog is generated.
According to another embodiment of the present invention, there is provided a pet color value scoring device, referring to fig. 2, including:
the fine-grained classification model 100 is used for performing fine-grained analysis on the basis of the acquired pet image to obtain a fine-grained category of the pet;
the target detection model 200 is used for detecting the face in the image based on the fine-grained category to obtain the face image of the pet;
the key point detection model 300 is used for analyzing the face image to obtain key point information in the face image;
the parameter calculation module 400 is configured to calculate according to the key point information to obtain a group of judgment parameter sets, where each judgment parameter set includes a plurality of judgment parameters;
and the color value scoring module 500 is configured to perform weighted comparison on the calculated evaluation parameter with the standard parameter corresponding to the fine-grained category to obtain a color value score of the pet to be detected.
Based on the obtained fine-grained category of the pet, a facial image of the pet is obtained according to the fine-grained category, the facial image is analyzed to obtain key point information in the facial image, a plurality of judgment parameters are obtained through calculation according to the key point information, the judgment parameters are subjected to weighted comparison with standard parameters corresponding to the fine-grained category, and a color value score of the pet to be detected is obtained; the method and the device can quantitatively score the color value of the pet according to the fine granularity category of the pet and the key point information.
The pet color value scoring method of the present invention is described in detail below with reference to a specific example of a cat:
the method comprises the following steps: an image of the pet cat is obtained.
Step two: and inputting the acquired image into a cat fine-grained classification model to obtain the cat fine-grained classification.
Specifically, for example, the fine-grained categories of cats are obtained as bose cats, puppet cats, siamese cats, and the like.
Step three: and inputting the image of the cat into the cat face detection model to obtain a cat face image.
Step four: and obtaining the positions of a plurality of cat face key points of the cat face image through a cat face key point detection model, and calculating a group of judgment parameter sets by utilizing the position information of the key points.
Specifically, the cat face joint point may be a predetermined characteristic of the cat face, such as the cat's eyes, ears, nose, mouth, and cat's hair, including the color, length, color, smoothness, etc. of the hair; the number of acquisitions may be chosen, and fifteen key points on the cat face are chosen for calculation in this embodiment.
Step five: and carrying out weighted comparison on the calculated evaluation parameters and the standard evaluation parameters corresponding to the cat categories, and dynamically adjusting the weight according to the specific categories to finally obtain the color score.
In an embodiment, an apparatus comprises:
and the image acquisition module is used for acquiring the image of the pet to be detected.
For example, the image is acquired by a camera.
In an embodiment, the face score module comprises:
the calculating unit is used for calculating the color value score of the pet through a color value scoring formula;
the face score formula is:
S=λ1×m1+λ2×m2+...+λn×mn
wherein S is the color score, λ1,λ2,..,λnAre each a weight number, m, of from 0 to 11,m2,..,mnThe evaluation parameters are respectively in the evaluation parameter group.
Based on the pet color value scoring method, the present embodiment provides a computer-readable storage medium storing one or more programs, which may be executed by one or more processors to implement the steps in the pet color value scoring method according to the above embodiment.
Based on the pet color value scoring method, the present application further provides a terminal device, as shown in fig. 3, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory)22, and may further include a communication Interface (Communications Interface)23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logic instructions in the memory 22 to perform the methods in the embodiments described above.
Furthermore, the logic instructions in the memory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes the functional application and data processing, i.e. implements the method in the above-described embodiments, by executing the software program, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like.
Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.
In addition, the specific processes loaded and executed by the storage medium and the instruction processors in the terminal device are described in detail in the method, and are not stated herein.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.