CN111445439A - Image analysis method, image analysis device, electronic device, and medium - Google Patents

Image analysis method, image analysis device, electronic device, and medium Download PDF

Info

Publication number
CN111445439A
CN111445439A CN202010121619.3A CN202010121619A CN111445439A CN 111445439 A CN111445439 A CN 111445439A CN 202010121619 A CN202010121619 A CN 202010121619A CN 111445439 A CN111445439 A CN 111445439A
Authority
CN
China
Prior art keywords
image
target image
analysis result
background area
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010121619.3A
Other languages
Chinese (zh)
Inventor
谢文珍
黄恺
冯富森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dami Future Technology Co ltd
Original Assignee
Beijing Dami Future 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 Beijing Dami Future Technology Co ltd filed Critical Beijing Dami Future Technology Co ltd
Priority to CN202010121619.3A priority Critical patent/CN111445439A/en
Publication of CN111445439A publication Critical patent/CN111445439A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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/161Detection; Localisation; Normalisation
    • 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/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Abstract

The application discloses an image analysis method, an image analysis device, electronic equipment and a medium. In the application, at least one target image can be selected based on a face recognition result of at least one original image, the target image comprises a human body region, semantic segmentation is performed on the target image, a background region in the target image is extracted, a first feature corresponding to the background region is extracted, and a first analysis result of the background region is calculated based on the first feature. By applying the technical scheme of the application, at least one target image containing a human body region can be selected from a plurality of original images, the target image is subjected to semantic segmentation, first features corresponding to a background region in the target image are extracted, and the first features are analyzed to obtain a first analysis result, so that the accuracy and the practicability of image background evaluation in the related technology are improved.

Description

Image analysis method, image analysis device, electronic device, and medium
Technical Field
The present invention relates to image processing technologies, and in particular, to an image analysis method, an image analysis apparatus, an electronic device, and a medium.
Background
With the development of the internet, online education is popular with more and more people, online education scientific research is not limited by time and places for flexible learning, and learners can fully improve their skills conveniently. Compared with the traditional fixed classroom, the mobile classroom is more mobile and convenient, and the visual classroom has more visualization and more attractive in pictures and audio. In the related art, the background image of the online classroom may be evaluated and analyzed by detecting the background image of the online classroom through video image random selection and manual screening or video frame-by-frame detection full-image method. However, the inventors have found that when the background image of the online classroom is evaluated and analyzed by the above-described technique, there are problems of inaccuracy in evaluation of the background image and low practicality.
Disclosure of Invention
The embodiment of the application provides an image analysis method, an image analysis device, electronic equipment and a medium.
According to an aspect of an embodiment of the present application, there is provided an image analysis method, including:
selecting at least one target image based on a face recognition result of at least one original image, wherein the target image comprises a human body region;
performing semantic segmentation on the target image, and extracting a background area in the target image;
and extracting a first feature corresponding to the background area, and calculating a first analysis result of the background area based on the first feature.
Optionally, in another embodiment based on the foregoing method of the present application, the method further includes:
identifying at least one object in the target image, and determining a second analysis result of the object based on the identification result;
determining a third analysis result of the target image based on the first analysis result and the second analysis result.
Optionally, in another embodiment based on the foregoing method of the present application, the identifying at least one object in the target image, and determining a second analysis result of the object based on the identification result includes:
extracting at least one object region in the target image;
extracting second features corresponding to the object region, and determining type information and/or attribute information of the object based on the second features;
determining the second analysis result based on the type information and/or the attribute information.
Optionally, in another embodiment based on the above method of the present application, the selecting at least one target image based on a face recognition result of at least one original image includes:
detecting whether the original image contains a face image or not by using a preset face recognition model;
when the original image is determined to contain a face image, acquiring the size ratio of the face image to the corresponding original image and the position of the face image in the original image;
and screening the original image which meets the preset condition as the target image based on the size ratio and the position.
Optionally, in another embodiment based on the method of the present application, the calculating a first analysis result of the background region based on the first feature includes:
determining the color type and the color number corresponding to the background area based on the first characteristic;
determining the first analysis result based on the color type and the number of colors.
Optionally, in another embodiment based on the method of the present application, the calculating a first analysis result of the background region based on the first feature includes:
calculating the matching degree of the first feature and a third feature corresponding to the human body region;
determining the first analysis result based on the matching degree.
According to another aspect of the embodiments of the present application, there is provided an apparatus for selecting an image, including:
the system comprises a selection module, a face recognition module and a display module, wherein the selection module is used for selecting at least one target image based on a face recognition result of at least one original image, and the target image comprises a human body region;
the extraction module is used for performing semantic segmentation on the target image and extracting a background area in the target image;
and the calculation module is used for extracting a first feature corresponding to the background area and calculating a first analysis result of the background area based on the first feature.
According to another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
a display for displaying with the memory to execute the executable instructions to perform the operations of any of the image analysis methods described above.
According to yet another aspect of the embodiments of the present application, there is provided a computer-readable storage medium for storing computer-readable instructions, which when executed, perform the operations of any one of the image analysis methods described above.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
when the scheme of the embodiment of the application is executed, the face recognition is carried out on an original image, at least one target image is selected based on the face recognition result of the at least one original image, the target image comprises a human body area, the semantic segmentation is carried out on the target image, namely, a foreground area and a background area of the target image are separated, the background area of the target image is extracted, then a first feature corresponding to the background area is extracted, and a first analysis result corresponding to the background area is calculated based on the first feature. According to the method and the device, at least one target image can be selected from a plurality of original images, the background area is extracted from the target image, the first characteristic corresponding to the background area is calculated, the first analysis result is obtained, and the accuracy and the practicability of evaluation on the image background in the related technology are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a system architecture of an image analysis method according to the present application;
fig. 2 is a schematic flow chart of an image analysis method proposed in the present application;
fig. 3 is a schematic flow chart of an image analysis method proposed in the present application;
fig. 4 is a schematic flow chart of an image analysis method proposed in the present application;
FIG. 5 is a schematic structural diagram of an image analysis apparatus according to the present application;
fig. 6 is a schematic view of an electronic device according to the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual size scale relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In addition, technical solutions between the various embodiments of the present application may be combined with each other, but it must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should be considered to be absent and not within the protection scope of the present application.
It should be noted that all the directional indicators (such as upper, lower, left, right, front and rear … …) in the embodiment of the present application are only used to explain the relative position relationship between the components, the motion situation, etc. in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly.
A method for performing image analysis according to an exemplary embodiment of the present application is described below in conjunction with fig. 1-3. It should be noted that the following application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
Fig. 1 shows a schematic diagram of an exemplary system architecture 100 to which the image analysis method or the image analysis apparatus of the embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
The terminal apparatuses 101, 102, 103 in the present application may be terminal apparatuses that provide various services. For example, a user selects at least one target image based on a face recognition result of at least one original image through the terminal device 103 (which may also be the terminal device 101 or 102), wherein the target image includes a human body region; performing semantic segmentation on the target image, and extracting a background area in the target image; and extracting a first feature corresponding to the background area, and calculating a first analysis result of the background area based on the first feature.
It should be noted that the image analysis method provided in the embodiments of the present application may be executed by one or more of the terminal devices 101, 102, and 103, and/or the server 105, and accordingly, the image analysis apparatus provided in the embodiments of the present application is generally disposed in the corresponding terminal device, and/or the server 105, but the present application is not limited thereto.
The application also provides an image analysis method, an image analysis device, a target terminal and a medium.
Fig. 2 schematically shows a flow diagram of an image analysis method according to an embodiment of the present application. As shown in fig. 2, the method includes:
s201, selecting at least one target image based on a face recognition result of at least one original image, wherein the target image comprises a human body region.
The smart device may be a PC (Personal Computer), a smart phone, a tablet Computer, an e-book reader, an MP3(Moving Picture Experts Group Audio L layer iii, motion Picture Experts compression standard Audio layer 3) image selector, an MP4(Moving Picture Experts Group Audio L layer IV, motion Picture Experts compression standard Audio layer 4) image selector, a portable Computer, and other portable terminal devices with a display function.
Optionally, the original image is not specifically limited in this application, that is, the original image in this application may be any image information. In a preferred embodiment, the original image may be an image containing a human body region or the like.
In addition, the number of the original images is not particularly limited, and may be, for example, one or ten.
Further, after the original images are obtained, in order to ensure that the image quality of the finally selected target image meets the requirements, the definition parameters and the brightness parameters corresponding to each original image can be detected.
It is understood that the present application may calculate the sharpness value of each image based on the corresponding pixel neighborhood parameter of each image. The pixel neighborhood parameter in the present application may be a parameter reflecting a pixel neighborhood difference of an image. It is understood that the higher the pixel neighborhood difference corresponding to an image, the higher the resolution it reflects. Therefore, the corresponding threshold value can be generated based on the pixel neighborhood parameters, so that the original image with the image definition lower than the preset threshold value can be eliminated, and the residual original image meeting the definition standard can be used as a candidate image of the determined target image.
In addition, in order to ensure the definition of the target image selected from the original images, the brightness parameter of each image to be selected can be detected, and the image brightness of each original image is determined through the brightness parameter.
The image brightness is the brightness of the screen, and is expressed in candela per square meter (cd/m 2). Image brightness is a perceived continuum from a white surface to a black surface, determined by the reflection coefficient. In addition, brightness refers to the degree of brightness of light irradiated on a subject or an image. When the brightness of the image is increased, the image will appear bright or dazzling, and when the brightness is lower, the image will appear dark.
Further, after the original image is processed, an original image to be processed is obtained, the original image to be processed is identified by using a face identification technology, and at least one target image is selected from the original image to be processed according to an identification result of the face identification technology, wherein the target image comprises a human body area.
S202, performing semantic segmentation on the target image, and extracting a background area in the target image.
The background region of the extracted target image can be obtained at the pixel level, and the background region can be extracted according to image segmentation algorithms, such as a threshold segmentation algorithm, an edge-based segmentation algorithm, a region expansion algorithm, a watershed algorithm and the like, which are only applicable to the condition that the image is relatively simple and an ideal segmentation result is difficult to obtain for the image with complex colors.
Furthermore, the original image can be segmented by using the preset segmentation condition, and the segmentation threshold value is adjusted according to the gray value and the number of the image pixels, so that the background area in the target image is determined, and the automatic extraction of the background area is further realized.
S203, extracting a first feature corresponding to the background area, and calculating a first analysis result of the background area based on the first feature.
The first characteristic comprises image parameters such as color parameters and definition parameters. The first analysis result is used for judging whether the original image corresponding to the background area meets the target image.
Taking the online education industry as an example, the initial interaction of a teacher and a student often starts with an avatar photo of a party user. For example, a standard and clear picture of a teacher can attract many students to give lessons, but at the present stage, the problem of uploading the picture by the teacher is many. Including image quality, image layout, image background, etc. Furthermore, in terms of image quality, the problems of too small picture, insufficient resolution and irregular picture shape often exist; in the aspect of image layout, the problems of too large and too small human faces, non-centered photo figures, non-frontal faces and the like may exist. And aiming at the image background, the problems that the background is too simple, the picture background is too disordered, and a person embraces a pet and the like exist. In addition, there is a problem that the emotion of the person in the image is too serious.
Furthermore, the existing auditing schemes in the prior art have three schemes of machine simple auditing, manual auditing and combination of the simple auditing and the manual auditing, which have respective disadvantages. For example, for machine simple review, the pictures are primarily screened by using simple image identification dimensions, such as picture size, resolution, definition and other indexes. And the manual review means that the pictures are distinguished and scored manually. The combination of machine and manual review means that the machine is used for giving approximate scores, and dimension detection of pictures with abnormal scores given by the machine is manually rechecked.
In addition, for the online education field, when a teacher develops teaching activities, it is essential to arrange a warm and comfortable teaching environment, but it is also a difficult index to quantify to detect and evaluate whether the arrangement of the classroom is proper and comfortable. Therefore, how to select an image with good background characters from a plurality of original images. Which is a problem to be solved by the person skilled in the art.
It should be noted that after the background region corresponding to the original image is obtained, a first analysis result of the background region may be calculated based on the first features of each background region, such as the color parameter and the sharpness parameter.
When the scheme of the embodiment of the application is executed, the face recognition is carried out on an original image, at least one target image is selected based on the face recognition result of the at least one original image, the target image comprises a human body area, the semantic segmentation is carried out on the target image, namely, a foreground area and a background area of the target image are separated, the background area of the target image is extracted, then a first feature corresponding to the background area is extracted, and a first analysis result corresponding to the background area is calculated based on the first feature. According to the method and the device, at least one target image can be selected from a plurality of original images, the background area is extracted from the target image, the first characteristic corresponding to the background area is calculated, the first analysis result is obtained, and the accuracy and the practicability of evaluation on the image background in the related technology are improved.
Fig. 3 schematically shows a flow diagram of an image analysis method according to an embodiment of the present application. As shown in fig. 3, the method includes:
s301, detecting whether the original image contains a face image or not by using a preset face recognition model.
S302, when the original image is determined to contain the face image, the size ratio of the face image to the corresponding original image and the position of the face image in the original image are obtained.
It can be understood that, the present application may further define whether the original image contains a facial image of the user. For example, in the case of an avatar picture, the original image in which the number of face images is not one in each original image can be limited to be removed.
And S303, screening the original image which meets the preset condition as the target image based on the size ratio and the position.
Further, in order to determine whether the original image is an original image meeting a preset condition, the target image may be determined according to the size ratio of the face image corresponding to each original image to the corresponding original image in each original image, and the position of the face image in the original image.
It will be appreciated that the criteria for the user's image to select may be determined from whether the face is clearly revealed when the image was taken, and whether the face location is in the central region of the image. Therefore, the method and the device for determining the face image size can further acquire the face image corresponding to the user, and determine whether the corresponding image meets the requirements or not according to the size of the face image.
According to the method and the device, whether each original image is the target image or not can be determined according to whether the size ratio is within a preset standard interval or not. The standard interval is not specifically limited in the present application, and may be, for example, an interval of 70% to 80%, an interval of 75% to 85%, or the like.
S304, performing semantic segmentation on the target image, and extracting a background area in the target image.
Specifically, see S202 in fig. 2, which is not described herein again.
S305, extracting a first feature corresponding to the background area, and determining the color type and the color number corresponding to the background area based on the first feature.
S306, determining a first analysis result based on the color type and the number of the colors.
The first characteristic is a first color parameter, and the color type and the color number corresponding to each background area are determined according to the first color parameter. Further, for an original image containing a human face image, too many color components in the background area, too bright or too dim color components may affect the aesthetic appearance of the image. Therefore, the present application may determine, based on the color type and the number of colors corresponding to each background area, whether the first analysis result, that is, the background area, satisfies the condition of the background area of the target image.
Further, the present application may detect whether the number of colors included in the background exceeds a predetermined number, and whether a predetermined color type is included in the color type, when detecting the color type and the number information included in the background region. And determining whether the first analysis result, namely the original image corresponding to the background area meets the standard of the target image or not according to the detection result.
It should be noted that, in the present application, the color type and the number of colors in the background region are not specifically limited, for example, after detecting that the background region includes a white color type and a black color type, the first analysis result may be that the corresponding background region does not conform to the background region of the target image. After the number of the detected colors in the background area exceeds 3 colors, the original image corresponding to the background area is judged to be not in accordance with the standard of the target image according to the first analysis result.
S307, at least one object region in the target image is extracted.
S308, extracting second features corresponding to the object region, and determining the type information and/or attribute information of the object based on the second features.
S309, determining a second analysis result based on the type information and/or the attribute information.
S310, determining a third analysis result of the target image based on the first analysis result and the second analysis result.
And the second characteristic is an object parameter, the object parameter corresponding to the object region in each background region is extracted based on a preset neural network image detection model, and the type information and/or attribute information of the object is determined based on the object parameter.
In one possible implementation, the type information of each object is determined based on the object parameters, and the second analysis result is determined based on the type information of each object.
Further, the method and the device can extract object characteristic parameters corresponding to the object region based on a preset neural network image detection model, and determine whether the object is included. It can be understood that after the object region is determined to be included, the second analysis result, that is, whether the original image corresponding to the object region matches the target image is determined according to the type information of the object.
Further, the neural network image detection model in the present application may be a convolutional neural network. Among them, Convolutional Neural Networks (CNN) are a kind of feed forward Neural Networks (fed forward Neural Networks) containing convolution calculation and having a deep structure, and are one of the representative algorithms of deep learning. The convolutional neural network has a representation learning (representation learning) capability, and can perform translation invariant classification on input information according to a hierarchical structure of the convolutional neural network. The CNN (convolutional neural network) has remarkable effects in the fields of image classification, target detection, semantic segmentation and the like due to the powerful feature characterization capability of the CNN on the image.
It should be noted that, before extracting object feature parameters corresponding to an object region by using a neural network image detection model, the organ detection network architecture may be defined by using a deep convolutional neural network based on a cascaded region suggestion network, a region regression network, and a key point regression network structure. In the adopted deep convolution neural network, the input of the region suggestion network is 16 × 3 image data, the network is composed of a full convolution architecture, and the output is the confidence coefficient and the rough vertex position of the object region suggestion frame; the regional regression network inputs 32 × 3 image data, the network is composed of a convolution and a full-connection framework, and the output is the confidence coefficient and the accurate vertex position of the background region; the input of the key point regression network is 64 × 3 image data, the network is composed of a convolution and a full-connection framework, and the output is the confidence coefficient and the position of the object shape information.
It should be noted that, in the present application, a manner of determining the second analysis result based on the type information of each object image is not specifically limited. For example, the present application can correspondingly divide each object into a teaching object and a non-teaching object. It is understood that the teaching objects may include books, blackboards, tables and chairs, computers, etc. And for non-teaching objects, bowls and chopsticks, game machines, water cups and the like can be included.
Further, when the teaching-type object is detected to be included in the object region, the second analysis result is determined that the corresponding background region of the second analysis result conforms to the background region of the target image. And when the object region is detected to include the non-teaching object, determining that the second analysis result is that the original image corresponding to the object region does not meet the standard of the target image.
In a possible implementation, attribute information of each object is determined based on object parameters, the attribute information includes at least one of color information, quantity information and size information, and a second analysis result, that is, whether an original image corresponding to the object region meets the criteria of the target image is determined based on the type information and the attribute information of each object.
Further, the method and the device can extract object characteristic parameters of each object area based on a preset neural network image detection model, and determine whether the object is included. It can be understood that after the object is determined to be included, the second analysis result, that is, the original image corresponding to the object region meets the standard of the target image, is determined according to the attribute information of the object.
It should be noted that, in the present application, a manner of determining the second analysis result based on the attribute information of each object is not specifically limited. The attribute information may be information reflecting color, quantity, and size of the object. It can be understood that, for an original image containing a human body region, too many color components, too many objects placed in the background region, or too large objects may affect the aesthetic appearance of the image. Therefore, the second analysis result can be comprehensively determined based on the three parameters, namely, the original image corresponding to the object region meets the standard of the target image.
Further, the method and the device can detect whether the color composition of the object exceeds a first quantity, whether the quantity of the object exceeds a second quantity, and whether the size of the object exceeds a preset proportion of the corresponding background image when the object region is detected to include at least one of color information, quantity information and size information. And if the corresponding conditions are met, determining a second analysis result, namely that the original image corresponding to the object region meets the standard of the target image.
Further, based on the first analysis result and the second analysis result, that is, according to the background region and the object region of the original image, a third analysis result is obtained, that is, whether the original image meets the standard of the target image is judged.
When the scheme of the embodiment of the application is executed, the face recognition is carried out on an original image, at least one target image is selected based on the face recognition result of the at least one original image, the target image comprises a human body area, the semantic segmentation is carried out on the target image, namely, a foreground area and a background area of the target image are separated, the background area of the target image is extracted, then a first feature corresponding to the background area is extracted, and a first analysis result corresponding to the background area is calculated based on the first feature. According to the method and the device, at least one target image can be selected from a plurality of original images, the background area is extracted from the target image, the first characteristic corresponding to the background area is calculated, the first analysis result is obtained, and the accuracy and the practicability of evaluation on the image background in the related technology are improved.
Fig. 4 schematically shows a flow diagram of an image analysis method according to an embodiment of the present application. As shown in fig. 4, the method includes:
s401, detecting whether the original image contains a face image or not by using a preset face recognition model.
S402, when the original image is determined to contain the face image, the size ratio of the face image to the corresponding original image and the position of the face image in the original image are obtained.
And S403, screening the original image which meets the preset condition as the target image based on the size ratio and the position.
S404, performing semantic segmentation on the target image, and extracting a background area in the target image.
Generally, S401 to S404 can refer to 301 to S304 in fig. 3, and are not described herein again.
S405, extracting a first feature corresponding to a background area, and calculating the matching degree of the first feature and a third feature corresponding to the human body area.
S406, determining the first analysis result based on the matching degree.
And determining the color type and the color number corresponding to the human body area according to the second color parameter. Furthermore, in order to ensure the beauty of the target image, the second color parameter corresponding to the human body region in the original image can be further determined. And determining a first analysis result based on the color matching degree of the color of the human body region and the background image, wherein the first analysis result is used for determining whether the original image corresponding to the background region meets the standard of the target image.
It can be understood that, when the user is wearing a piece of gorgeous clothes, the corresponding background image should also correspond to a background with rich color information. When the user is wearing relatively plain clothes, the corresponding background image also corresponds to the background with relatively simple color information.
S407, at least one object region in the target image is extracted.
S408, extracting second features corresponding to the object region, and determining the type information and/or attribute information of the object based on the second features.
S409, determining a second analysis result based on the type information and/or the attribute information.
And S410, determining a third analysis result of the target image based on the first analysis result and the second analysis result.
Generally, reference may be made to 307 to S310 in fig. 3 for S47 to S410, which are not described herein again.
When the scheme of the embodiment of the application is executed, the face recognition is carried out on an original image, at least one target image is selected based on the face recognition result of the at least one original image, the target image comprises a human body area, the semantic segmentation is carried out on the target image, namely, a foreground area and a background area of the target image are separated, the background area of the target image is extracted, then a first feature corresponding to the background area is extracted, and a first analysis result corresponding to the background area is calculated based on the first feature. According to the method and the device, at least one target image can be selected from a plurality of original images, the background area is extracted from the target image, the first characteristic corresponding to the background area is calculated, the first analysis result is obtained, and the accuracy and the practicability of evaluation on the image background in the related technology are improved.
In another embodiment of the present application, as shown in fig. 5, the present application further provides an image analysis apparatus. The device comprises a selection module 501, an extraction module 502 and a calculation module 503, wherein:
a selecting module 501, configured to select at least one target image based on a face recognition result of at least one original image, where the target image includes a human body region;
an extracting module 502, configured to perform semantic segmentation on the target image and extract a background region in the target image;
the calculating module 503 is configured to extract a first feature corresponding to the background region, and calculate a first analysis result of the background region based on the first feature.
Optionally, the apparatus further comprises:
a second module 504, configured to identify at least one object in the target image, and determine a second analysis result of the object based on the identification result;
a third module 505, configured to determine a third analysis result of the target image based on the first analysis result and the second analysis result.
Optionally, the second module 504 includes:
a first unit configured to extract at least one object region in the target image;
a second unit, configured to extract a second feature corresponding to the object region, and determine type information and/or attribute information of the object based on the second feature;
a third unit, configured to determine the second analysis result based on the type information and/or the attribute information.
Optionally, the calculation module 503 includes:
a fourth unit, configured to determine, based on the first feature, a color type and a color number corresponding to the background area;
a fifth unit for determining the first analysis result based on the color type and the number of colors.
Optionally, the calculation module 503 includes:
the calculating unit is used for calculating the matching degree of the first feature and a third feature corresponding to the human body region;
a determining unit, configured to determine the first analysis result based on the matching degree.
Optionally, the selecting module 501 comprises:
the detection unit is used for detecting whether the original image contains a face image or not by using a preset face recognition model;
the position determining unit is used for acquiring the size ratio of the face image to the corresponding original image and the position of the face image in the original image when the original image is determined to contain the face image;
and the screening unit is used for screening the original image which meets the preset condition as the target image based on the size ratio and the position.
When the scheme of the embodiment of the application is executed, the face recognition is carried out on an original image, at least one target image is selected based on the face recognition result of the at least one original image, the target image comprises a human body area, the semantic segmentation is carried out on the target image, namely, a foreground area and a background area of the target image are separated, the background area of the target image is extracted, then a first feature corresponding to the background area is extracted, and a first analysis result corresponding to the background area is calculated based on the first feature. According to the method and the device, at least one target image can be selected from a plurality of original images, the background area is extracted from the target image, the first characteristic corresponding to the background area is calculated, the first analysis result is obtained, and the accuracy and the practicability of evaluation on the image background in the related technology are improved.
FIG. 6 is a block diagram illustrating a logical structure of an electronic device in accordance with an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 600 may include one or more of the following components: a processor 601 and a memory 602.
Processor 601 may include one or more Processing cores, such as a 4-core processor, an 8-core processor, etc. processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a P L a (Programmable logic Array), processor 601 may also include a main processor and a coprocessor, the main processor being a processor for Processing data in a wake-up state, also known as a CPU (Central Processing Unit), the coprocessor being a low-power processor for Processing data in a standby state, in some embodiments, processor 601 may be integrated with a GPU (Graphics Processing Unit) for rendering and rendering content for display, in some embodiments, processor 601 may also include an intelligent processor for learning about AI operations of the AI processor.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 602 is configured to store at least one instruction for execution by the processor 601 to implement the interactive special effect calibration method provided by the method embodiments of the present application.
In some embodiments, the electronic device 600 may further optionally include: a peripheral interface 603 and at least one peripheral. The processor 601, memory 602, and peripheral interface 603 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a touch screen display 605, a camera 606, an audio circuit 607, a positioning component 608, and a power supply 609.
The peripheral interface 603 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, memory 602, and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 604 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 604 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 604 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 604 may further include NFC (near field Communication) related circuits, which are not limited in this application.
The Display 605 is used to Display a UI (User Interface) that may include graphics, text, icons, video, and any combination thereof, when the Display 605 is a touch Display, the Display 605 also has the ability to capture touch signals on or over the surface of the Display 605. the touch signals may be input to the processor 601 for processing as control signals, at which time the Display 605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard.
The camera assembly 606 is used to capture images or video. Optionally, camera assembly 606 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 607 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 601 for processing or inputting the electric signals to the radio frequency circuit 604 to realize voice communication. For stereo capture or noise reduction purposes, the microphones may be multiple and disposed at different locations of the electronic device 600. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 607 may also include a headphone jack.
The positioning component 608 is used to locate the current geographic location of the electronic device 600 to implement navigation or L BS (L geographic based Service.) the positioning component 608 can be a positioning component based on the united states GPS (global positioning System), the beidou System of china, the graves System of russia, or the galileo System of the european union.
The power supply 609 is used to supply power to various components in the electronic device 600. The power supply 609 may be ac, dc, disposable or rechargeable. When the power supply 609 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 600 also includes one or more sensors 610. The one or more sensors 610 include, but are not limited to: acceleration sensor 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 615, and proximity sensor 616.
The acceleration sensor 611 may detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the electronic device 600. For example, the acceleration sensor 611 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 601 may control the touch screen display 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 612 may detect a body direction and a rotation angle of the electronic device 600, and the gyro sensor 612 and the acceleration sensor 611 may cooperate to acquire a 3D motion of the user on the electronic device 600. The processor 601 may implement the following functions according to the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 613 may be disposed on a side bezel of the electronic device 600 and/or on an underlying layer of the touch display screen 605. When the pressure sensor 613 is disposed on a side frame of the electronic device 600, a user's holding signal of the electronic device 600 can be detected, and the processor 601 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed at the lower layer of the touch display screen 605, the processor 601 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 605. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 614 is used for collecting a fingerprint of a user, and the processor 601 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the identity of the user according to the collected fingerprint, when the identity of the user is identified as a credible identity, the processor 601 authorizes the user to perform relevant sensitive operations, wherein the sensitive operations comprise screen unlocking, encrypted information viewing, software downloading, payment, setting change and the like, the fingerprint sensor 614 can be arranged on the front side, the back side or the side of the electronic device 600, and when a physical key or a manufacturer L ogo is arranged on the electronic device 600, the fingerprint sensor 614 can be integrated with the physical key or the manufacturer L ogo.
The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, processor 601 may control the display brightness of touch display 605 based on the ambient light intensity collected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 605 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is turned down. In another embodiment, the processor 601 may also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
Proximity sensor 616, also referred to as a distance sensor, is typically disposed on the front panel of electronic device 600. The proximity sensor 616 is used to capture the distance between the user and the front of the electronic device 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front face of the electronic device 600 gradually decreases, the processor 601 controls the touch display screen 605 to switch from the bright screen state to the dark screen state; when the proximity sensor 616 detects that the distance between the user and the front surface of the electronic device 600 gradually becomes larger, the processor 601 controls the touch display screen 605 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 6 does not constitute a limitation of the electronic device 600, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium, such as the memory 604, comprising instructions executable by the processor 620 of the electronic device 600 to perform the above-described method of selecting an image, the method comprising: extracting a background area image in an image to be selected, wherein the image to be selected comprises a user image and the background area image; screening a first background image which meets a first preset condition in the background area image based on a first color parameter and a definition parameter; screening a second background image which meets a second preset condition in each first background image based on an object image contained in each first background image; and taking the image to be selected corresponding to the second background image as a target image. Optionally, the instructions may also be executable by the processor 620 of the electronic device 600 to perform other steps involved in the exemplary embodiments described above. Optionally, the instructions may also be executable by the processor 620 of the electronic device 600 to perform other steps involved in the exemplary embodiments described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided an application/computer program product comprising one or more instructions executable by the processor 620 of the electronic device 600 to perform the image analysis method described above, the method comprising: selecting at least one target image based on a face recognition result of at least one original image, wherein the target image comprises a human body region; performing semantic segmentation on the target image, and extracting a background area in the target image; and extracting a first feature corresponding to the background area, and calculating a first analysis result of the background area based on the first feature. Optionally, the instructions may also be executable by the processor 620 of the electronic device 600 to perform other steps involved in the exemplary embodiments described above. Other embodiments of the present application 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 application 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 application being indicated by the following claims.
It will be understood that the present application 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 application is limited only by the appended claims.

Claims (10)

1. A method of image analysis, the method comprising:
selecting at least one target image based on a face recognition result of at least one original image, wherein the target image comprises a human body region;
performing semantic segmentation on the target image, and extracting a background area in the target image;
and extracting a first feature corresponding to the background area, and calculating a first analysis result of the background area based on the first feature.
2. The method of claim 1, wherein the method further comprises:
identifying at least one object in the target image, and determining a second analysis result of the object based on the identification result;
determining a third analysis result of the target image based on the first analysis result and the second analysis result.
3. The method of claim 2, wherein the identifying at least one object in the target image, determining a second analysis result of the object based on the identification result, comprises:
extracting at least one object region in the target image;
extracting second features corresponding to the object region, and determining type information and/or attribute information of the object based on the second features;
determining the second analysis result based on the type information and/or the attribute information.
4. The method of claim 3, wherein the attribute information includes at least one of color information, quantity information, and size information.
5. The method of claim 1, wherein said computing a first analysis result for the background region based on the first feature comprises:
determining the color type and the color number corresponding to the background area based on the first characteristic;
determining the first analysis result based on the color type and the number of colors.
6. The method of claim 1, wherein said computing a first analysis result for the background region based on the first feature comprises:
calculating the matching degree of the first feature and a third feature corresponding to the human body region;
determining the first analysis result based on the matching degree.
7. The method of claim 1, wherein selecting at least one target image based on the face recognition result of at least one original image comprises:
detecting whether the original image contains a face image or not by using a preset face recognition model;
when the original image is determined to contain a face image, acquiring the size ratio of the face image to the corresponding original image and the position of the face image in the original image;
and screening the original image which meets the preset condition as the target image based on the size ratio and the position.
8. An image analysis apparatus, characterized in that the apparatus comprises:
the recognition module is used for selecting at least one target image based on a face recognition result of at least one original image, wherein the target image comprises a human body region;
the extraction module is used for performing semantic segmentation on the target image and extracting a background area in the target image;
and the calculation module is used for extracting a first feature corresponding to the background area and calculating a first analysis result of the background area based on the first feature.
9. An electronic device, comprising:
a memory for storing executable instructions; and the number of the first and second groups,
a processor for display with the memory to execute the executable instructions to perform the operations of the method of selecting an image of any of claims 1-7.
10. A computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the image analysis method of any of claims 1-7.
CN202010121619.3A 2020-02-26 2020-02-26 Image analysis method, image analysis device, electronic device, and medium Pending CN111445439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010121619.3A CN111445439A (en) 2020-02-26 2020-02-26 Image analysis method, image analysis device, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010121619.3A CN111445439A (en) 2020-02-26 2020-02-26 Image analysis method, image analysis device, electronic device, and medium

Publications (1)

Publication Number Publication Date
CN111445439A true CN111445439A (en) 2020-07-24

Family

ID=71648814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010121619.3A Pending CN111445439A (en) 2020-02-26 2020-02-26 Image analysis method, image analysis device, electronic device, and medium

Country Status (1)

Country Link
CN (1) CN111445439A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113269141A (en) * 2021-06-18 2021-08-17 浙江机电职业技术学院 Image processing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887518A (en) * 2010-06-17 2010-11-17 北京交通大学 Human detecting device and method
CN103973977A (en) * 2014-04-15 2014-08-06 联想(北京)有限公司 Blurring processing method and device for preview interface and electronic equipment
CN105894458A (en) * 2015-12-08 2016-08-24 乐视移动智能信息技术(北京)有限公司 Processing method and device of image with human face
CN105981368A (en) * 2014-02-13 2016-09-28 谷歌公司 Photo composition and position guidance in an imaging device
CN106331492A (en) * 2016-08-29 2017-01-11 广东欧珀移动通信有限公司 Image processing method and terminal
CN107590461A (en) * 2017-09-12 2018-01-16 广东欧珀移动通信有限公司 Face identification method and Related product
CN108616689A (en) * 2018-04-12 2018-10-02 Oppo广东移动通信有限公司 High-dynamic-range image acquisition method, device based on portrait and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887518A (en) * 2010-06-17 2010-11-17 北京交通大学 Human detecting device and method
CN105981368A (en) * 2014-02-13 2016-09-28 谷歌公司 Photo composition and position guidance in an imaging device
CN103973977A (en) * 2014-04-15 2014-08-06 联想(北京)有限公司 Blurring processing method and device for preview interface and electronic equipment
CN105894458A (en) * 2015-12-08 2016-08-24 乐视移动智能信息技术(北京)有限公司 Processing method and device of image with human face
CN106331492A (en) * 2016-08-29 2017-01-11 广东欧珀移动通信有限公司 Image processing method and terminal
CN107590461A (en) * 2017-09-12 2018-01-16 广东欧珀移动通信有限公司 Face identification method and Related product
CN108616689A (en) * 2018-04-12 2018-10-02 Oppo广东移动通信有限公司 High-dynamic-range image acquisition method, device based on portrait and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113269141A (en) * 2021-06-18 2021-08-17 浙江机电职业技术学院 Image processing method and device
CN113269141B (en) * 2021-06-18 2023-09-22 浙江机电职业技术学院 Image processing method and device

Similar Documents

Publication Publication Date Title
CN111541907B (en) Article display method, apparatus, device and storage medium
CN111461097A (en) Method, apparatus, electronic device and medium for recognizing image information
CN111880888B (en) Preview cover generation method and device, electronic equipment and storage medium
CN111506758A (en) Method and device for determining article name, computer equipment and storage medium
CN110796005A (en) Method, device, electronic equipment and medium for online teaching monitoring
CN111836073B (en) Method, device and equipment for determining video definition and storage medium
WO2023142915A1 (en) Image processing method, apparatus and device, and storage medium
CN110675473B (en) Method, device, electronic equipment and medium for generating GIF dynamic diagram
CN110765525A (en) Method, device, electronic equipment and medium for generating scene picture
CN111105474B (en) Font drawing method, font drawing device, computer device and computer readable storage medium
CN110807769B (en) Image display control method and device
CN111539795A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114741559A (en) Method, apparatus and storage medium for determining video cover
CN112860046B (en) Method, device, electronic equipment and medium for selecting operation mode
CN110853124B (en) Method, device, electronic equipment and medium for generating GIF dynamic diagram
CN111327819A (en) Method, device, electronic equipment and medium for selecting image
CN112135191A (en) Video editing method, device, terminal and storage medium
CN111445439A (en) Image analysis method, image analysis device, electronic device, and medium
CN110335224B (en) Image processing method, image processing device, computer equipment and storage medium
CN114925667A (en) Content classification method, device, equipment and computer readable storage medium
CN112907702A (en) Image processing method, image processing device, computer equipment and storage medium
CN112560903A (en) Method, device and equipment for determining image aesthetic information and storage medium
CN113407774A (en) Cover determining method and device, computer equipment and storage medium
CN111797754A (en) Image detection method, device, electronic equipment and medium
CN109472855B (en) Volume rendering method and device and intelligent device

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