WO2022037452A1 - 信息生成方法、装置、电子设备和计算机可读介质 - Google Patents

信息生成方法、装置、电子设备和计算机可读介质 Download PDF

Info

Publication number
WO2022037452A1
WO2022037452A1 PCT/CN2021/111979 CN2021111979W WO2022037452A1 WO 2022037452 A1 WO2022037452 A1 WO 2022037452A1 CN 2021111979 W CN2021111979 W CN 2021111979W WO 2022037452 A1 WO2022037452 A1 WO 2022037452A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
area
picture
target area
mentioned
Prior art date
Application number
PCT/CN2021/111979
Other languages
English (en)
French (fr)
Inventor
黄佳斌
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Priority to US18/042,143 priority Critical patent/US20230306602A1/en
Publication of WO2022037452A1 publication Critical patent/WO2022037452A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • 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/107Static hand or arm
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/143Segmentation; Edge detection involving probabilistic approaches, e.g. Markov random field [MRF] modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Definitions

  • Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to information generation methods, apparatuses, electronic devices, and computer-readable media.
  • Some embodiments of the present disclosure propose information generation methods, apparatuses, electronic devices, and computer-readable media to solve the technical problems mentioned in the above background section.
  • some embodiments of the present disclosure provide a method for generating information.
  • the method includes: generating a target area set based on an acquired first target image; selecting a target area that meets a preset condition from the target area set as a A candidate area is obtained to obtain a candidate area set; based on the candidate area set, a second target picture is generated; based on the second target picture, picture related information is generated.
  • some embodiments of the present disclosure provide an information generating apparatus, the apparatus comprising: a first generating unit configured to generate a target area set based on the acquired first target picture; a selecting unit configured to A target area that meets the preset conditions is selected from the area set as a candidate area to obtain a candidate area set; the second generation unit is configured to generate a second target image based on the candidate area set; the third generation unit is configured to be based on the first generation unit.
  • Two target pictures generate picture-related information.
  • some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, when one or more programs are stored by one or more The processor executes such that the one or more processors implement the method as described in the first aspect.
  • some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as described in the first aspect.
  • the methods provided by some embodiments of the present disclosure achieve effective extraction of the target area in the first target picture.
  • the target area displayed in the first target picture is further classified to generate picture-related information.
  • the recognition result of the first target picture is made more refined, and the subsequent image processing technology has room for improvement.
  • the information generation method of the present disclosure can also be applied to the technical field of virtual nail art. By extracting, identifying and classifying the nail area displayed in the picture, it can provide help for the development of virtual nail art technology.
  • FIG. 1 is a schematic diagram of an application scenario of an information generation method according to some embodiments of the present disclosure
  • FIG. 3 is a flowchart of other embodiments of information generation methods according to the present disclosure.
  • FIG. 4 is a schematic structural diagram of some embodiments of an information generating apparatus according to the present disclosure.
  • FIG. 5 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure.
  • FIG. 1 is a schematic diagram of an application scenario of an information generation method according to some embodiments of the present disclosure.
  • the computing device 101 may generate a target area set 103 based on the acquired first target picture 102 . Then, the computing device 101 may select a target area that meets the preset condition from the above-mentioned target area set 103 as a candidate area to obtain a candidate area set 104 . Afterwards, the computing device may generate the second target picture 105 based on the candidate region set 104 . Finally, computing device 101 may generate picture-related information 106 .
  • the above computing device 101 may be hardware or software.
  • the computing device When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or can be implemented as a single server or a single terminal device.
  • the computing device When the computing device is embodied as software, it may be installed in the hardware devices listed above. It can be implemented, for example, as multiple software or software modules for providing distributed services, or as a single software or software module. There is no specific limitation here.
  • FIG. 1 is merely illustrative. There may be any number of computing devices depending on implementation needs.
  • the method may be performed by computing device 101 in FIG. 1 .
  • the information generation method includes the following steps:
  • Step 201 based on the acquired first target picture, generate a target area set.
  • the executor of the information generation method may first perform image detection on the first target picture to obtain position information of the target area (eg, nails). Then, based on the obtained position information of the target area, the above-mentioned executing subject may use the connected domain search method to determine the area outline of the target area. Afterwards, the above-mentioned executive body may segment the determined contour, thereby obtaining a set of target regions.
  • the image detection is generally used to detect the position of the target area displayed in the first target image. Specifically, the position may be represented in the form of coordinates. In the image, there are 8 adjacent pixels around each pixel, and the adjacency relationship is 4-neighbor and 8-neighbor. If two pixels are adjacent, they can be said to be connected, and the area formed by the connected points is called a connected area.
  • the connected area search method may be a method of finding out each connected area in the target area and displaying the markers.
  • the above-mentioned first target picture is a picture of a preset size cut out from a picture to be intercepted, wherein the above-mentioned picture to be intercepted is a picture determined to display a nail area.
  • the above-mentioned execution body may input the above-mentioned first target picture into a pre-trained first deep neural network to obtain the position information of the target area in the above-mentioned first target picture.
  • the above-mentioned first deep neural network may be obtained by training in the following method: first, the above-mentioned execution body may obtain a training sample set, and the training samples in the above-mentioned training sample set include sample pictures and Sample location information. Then, the above-mentioned executive body may select training samples from the above-mentioned training sample set. After that, the sample picture in the selected training sample is used as the input of the initial model, and the sample position information corresponding to the above-mentioned sample picture is used as the expected output of the above-mentioned initial model, and the above-mentioned first deep neural network is obtained by training.
  • the above-mentioned initial model may be various neural networks capable of obtaining corresponding sample position information according to the above-mentioned sample pictures.
  • Each layer of the above-mentioned initial model is set with initial parameters, and the initial parameters can be continuously adjusted during the training process of the above-mentioned first deep neural network.
  • CNN Convolutional Neural Network
  • the above-mentioned first deep neural network includes a target area localization network and a target area extraction network
  • the above-mentioned target area localization network is used to determine the coordinates of the target area in the picture
  • the above-mentioned target area extraction network It is used to extract the target area based on the above coordinates.
  • the above target region localization network may adopt a target detection algorithm (Region-CNN, R-CNN).
  • the above target area extraction network can use the following feature extraction algorithms: SVM (Support Vector Machine, Support Vector Machine), K nearest neighbor algorithm, decision tree, Naive Bayes.
  • Step 202 Select a target area that meets a preset condition from the target area set as a candidate area to obtain a candidate area set.
  • the above-mentioned execution body may select a target area whose area is larger than the first preset threshold from the above-mentioned target area set as a candidate area to obtain a candidate area set.
  • the above-mentioned executive body may also select a target area whose probability value is greater than the second preset threshold from the above-mentioned target area set as a candidate area to obtain a candidate area set.
  • the probability value may be a value used to indicate the possibility that the target area is a fingernail area.
  • the above-mentioned preset condition includes that the value of the area is greater than the first preset threshold or the probability value is greater than the second preset threshold.
  • Step 203 based on the candidate region set, generate a second target picture.
  • the above-mentioned executive body may first establish a plane rectangular coordinate system on a predetermined display plane. Then, the above-mentioned executive body may map each candidate region in the candidate region set to a predetermined display plane according to the position information (eg, coordinates) of the candidate region to obtain a mapped picture. Afterwards, the above-mentioned executive body may determine the above-mentioned mapping picture as the second target picture.
  • position information eg, coordinates
  • Step 204 based on the second target picture, generate picture related information.
  • the above-mentioned execution body may generate the picture-related information through the following steps: In the first step, the above-mentioned execution body may perform feature extraction on each candidate area displayed in the second target image, and obtain the characteristics of each candidate area as follows: generating a vector matrix; in the second step, the above-mentioned executive body can determine the similarity between the vector matrix of each candidate region and each preset comparison vector matrix in the preset comparison vector matrix set, and obtain the similarity set of each candidate region; In the third step, based on the similarity set of each candidate area, the above-mentioned execution subject may sort the similarity set in descending order of the similarity to obtain the similarity sequence of each candidate area; in the fourth step, the above-mentioned execution The subject may select the similarity of the first position from the similarity sequence to obtain a first similarity set; in the fifth step, the above-mentioned execution subject may compare the preset comparison vector matrix corresponding to each similarity in the first similarity set The category information is determined
  • the above-mentioned executive body can combine the category information and key point information of each candidate region in the above-mentioned second target picture to obtain the picture-related information of the second target picture.
  • the similarity may be a score obtained by scoring the cosine distance between the vector matrix and the preset comparison vector matrix.
  • the above-mentioned execution body may input the above-mentioned second target picture into a pre-trained third deep neural network to obtain picture-related information.
  • the picture-related information includes category information and key point information.
  • the above-mentioned third deep neural network may include a category information generation network and a key point extraction network.
  • the category information generation network includes a feature extraction network and a classification network.
  • the feature extraction network is used to extract the features of the candidate regions in the picture to generate a vector matrix
  • the classification network is used to classify based on the vector matrix to obtain the category information of the candidate regions.
  • the key point extraction network is used to identify key points in the second target image and generate key point information.
  • the above-mentioned third deep neural network may be various neural networks capable of obtaining category information and key point information of the candidate region according to the second target image.
  • the above feature extraction network can use the following feature extraction algorithms: SVM (Support Vector Machine, Support Vector Machine), K nearest neighbor algorithm, decision tree, Naive Bayes.
  • SVM Small Vector Machine, Support Vector Machine
  • K nearest neighbor algorithm decision tree
  • Naive Bayes Naive Bayes.
  • the above classification network may use linear discriminant analysis (LDA) and Gaussian classifier, or may use logistic regression classifier.
  • the categories may include, but are not limited to, at least one of the following: thumb category, index finger category, middle finger category, ring finger category, pinky finger category.
  • the category information may be "this area belongs to the thumb”.
  • the methods provided by some embodiments of the present disclosure achieve effective extraction of the target area in the first target picture.
  • the target area displayed in the first target picture is further classified to generate picture-related information.
  • the recognition result of the first target picture is made more refined, and the subsequent image processing technology has room for improvement.
  • the information generation method of the present disclosure can also be applied to the technical field of virtual nail art.
  • the nail regions in the nail picture are extracted, and each nail region in the nail picture can be obtained.
  • a second nail image including each nail region can be generated so that the user can use it as a material for the next image production.
  • picture-related information including category information and key point information of the nail region is generated. It can assist the user to understand the category of the nail region, reduce the time for the user to judge the category of the nail region, and improve the utilization efficiency of the extracted nail region.
  • FIG. 3 a flowchart 300 of further embodiments of information generation methods according to the present disclosure is shown.
  • the method may be performed by computing device 101 in FIG. 1 .
  • the information generation method includes the following steps:
  • Step 301 Input the first target image into the pre-trained first deep neural network to obtain the target area in the first target image to form a target area set.
  • the execution body of the information generation method may input the first target picture into the pre-trained first deep neural network to obtain the target area in the first target picture.
  • the first deep neural network may be a pre-trained neural network model for extracting the target area in the picture.
  • Step 302 Determine target parameters of each target area in the target area set.
  • the execution body may obtain the area of the target area through the following steps: In the first step, the execution body may obtain the position information of each vertex of the target area based on the position information of the target area obtained in the above step 301 In the second step, the above-mentioned execution body can divide the above-mentioned target area based on a preset dividing method, where the preset dividing method can be to divide the target area into at least one triangle, and there is no overlapping part between the triangles; the third step , the above-mentioned executive body can calculate the area of each triangle based on the position information of each vertex of the above-mentioned target area, using the triangle area calculation method; The result is taken as the area of the above-mentioned target area. Therefore, the above-mentioned executive body can obtain the area of each target area in the target area set.
  • the above-mentioned determining the area of each target area in the above-mentioned target area set includes: determining the above-mentioned target area by dividing the inside of the above-mentioned target area or selecting a target point outside the above-mentioned target area. The area of each target area in the target area set.
  • the execution body may also obtain the area of the target area through the following steps: Step 1, the execution body may obtain the target area based on the location information of the target area obtained in the above step 301 The position information of each vertex of the area; in the second step, the above-mentioned execution body can connect the above-mentioned various vertices to determine the concave point of the above-mentioned target area, where the concave point can be the vertex of the superior angle of the above-mentioned target area; the third step, The above-mentioned executive body can select a target point outside the target area in the first target image; in the fourth step, the above-mentioned executive body can obtain the position information of the target point; The vertices of the area are connected to obtain a connection polygon; in the sixth step, the above-mentioned execution body can divide the above-mentioned connection polygon based on the above-mentioned preset division method to obtain at least one triangle;
  • the area obtained by connecting the two vertices is determined as a concave area; in the ninth step, the above-mentioned execution body can calculate the area of the concave area by using the above-mentioned preset division method; in the tenth step, the above-mentioned execution body can compare the area of the connection polygon with the above The absolute value of the difference in the areas of the recessed regions is determined as the area of the above-mentioned target region.
  • the above-mentioned execution body may obtain the probability value of the target area through the following steps: first, the above-mentioned execution body may perform feature extraction on each target area in the target area set to obtain a vector diagram of the target area, In the second step, the above-mentioned executive body can score the cosine distance between each vector map in the vector illustration set and the preset comparison vector map to obtain the cosine distance score; The distance score is determined as the confidence score between the vector map and the preset comparison vector map, and a confidence score set is obtained; in the fourth step, the above-mentioned execution subject can determine the confidence score corresponding to each target area as the probability value of the target area .
  • the confidence interval of a probability sample is an interval estimate of a certain population parameter of the sample.
  • the confidence interval shows the degree to which the true value of the parameter has a certain probability to lie around the measurement result.
  • the confidence interval gives the degree of confidence in the measured value of the measured parameter, that is, the "certain probability" required above. This probability is called the confidence level and is usually expressed in the form of a score.
  • Step 303 Select a predetermined number of target regions as candidate regions from the target region set in descending order of the values of target parameters corresponding to the target regions to obtain a candidate region set.
  • the above-mentioned executive body may select a predetermined number of target areas from the target area set as candidate areas in order of area from large to small.
  • the aforementioned executive body may also select a predetermined number of target regions as candidate regions from the target region set in descending order of probability values.
  • a target area with a relatively small area value is filtered out, and an area with a relatively large area value is left as a candidate area.
  • the generated second target picture can be made to better meet the definition requirement. Screening out target regions with relatively low probability values can make the generated second target image more accurate.
  • Step 304 Map each candidate region in the candidate region set to a predetermined display picture frame to obtain a mapped picture, and determine the mapped picture as a second target picture.
  • the above-mentioned executive body may first calculate the relative distance and angle between each candidate area according to the position information of each candidate area. Then, the above-mentioned executive body may map the candidate regions to the predetermined display picture frame according to the relative distance and angle between each candidate region to obtain a mapped picture. Afterwards, the above-mentioned executive body may determine the above-mentioned mapping picture as the second target picture.
  • the size of the above-mentioned predetermined display picture frame may be the same as the size of the first target picture.
  • Step 305 based on the second target picture, generate picture related information.
  • step 305 for the specific implementation of step 305 and the technical effect brought about, reference may be made to step 204 in those embodiments corresponding to FIG. 2 , and details are not repeated here.
  • Step 306 push the picture-related information to the target device with a display function, and control the target device to display the picture-related information.
  • the above-mentioned execution body may push the picture-related information to a target device having a display function, and control the target device to display the picture-related information.
  • the process 300 of the image classification method in some embodiments corresponding to FIG. 3 describes in detail the extraction of the target area displayed in the image and the determination of the target area category process. Therefore, the solutions described in these embodiments determine the category of the target region by segmenting the target region, and generate category information and key point information of the target region. It can effectively provide the analysis results of the target area.
  • the present disclosure provides some embodiments of an information generating apparatus, and these apparatus embodiments correspond to those method embodiments described above in FIG. 2 , and the apparatus can be specifically applied in various electronic devices.
  • the information generating apparatus 400 of some embodiments includes: a first generating unit 401 , a selecting unit 402 , a second generating unit 403 and a third generating unit 404 .
  • the first generating unit 401 is configured to generate a target area set based on the acquired first target image;
  • the selecting unit 402 is configured to select a target area that meets the preset conditions from the target area set as a candidate area, and obtain A set of candidate regions;
  • the third generating unit 403 is configured to generate a second target picture based on the set of candidate regions;
  • the fourth generating unit 404 is configured to generate picture related information based on the second target picture.
  • the above-mentioned first target picture is a picture of a preset size cut out from a picture to be intercepted, wherein the above-mentioned picture to be intercepted is a picture determined to display a nail area.
  • the first generating unit 401 of the information generating apparatus 400 is further configured to: in response to determining that the first target image contains a target area, determine the location information of the target area; based on For the location information of the target area, the connected domain search method is used to segment the target area from the first target image to obtain the target area set.
  • the determining the location information of the target area in response to determining that the first target image includes a target area includes: inputting the first target image into a pre-trained first target image.
  • a deep neural network is used to obtain the location information of the target area in the above-mentioned first target image.
  • the first generating unit 401 of the information generating apparatus 400 is further configured to: input the above-mentioned first target picture into a pre-trained second deep neural network to obtain the above-mentioned first target image The target area in the picture to form the target area set.
  • the selection unit 402 of the information generating apparatus 400 is further configured to: determine the target parameter of each target area in the above target area set; A predetermined number of target regions are selected as the above-mentioned candidate regions in descending order of the value of the target parameter of , to obtain a candidate region set.
  • the above-mentioned target parameter includes an area or a probability value.
  • the above-mentioned determining the area of each target area in the above-mentioned target area set includes: determining the above-mentioned target area by dividing the inside of the above-mentioned target area or selecting a target point outside the above-mentioned target area. The area of each target area in the target area set.
  • the above-mentioned determining the target parameter of each target area in the above-mentioned target area set includes: dividing each target area in the above-mentioned target area set based on a preset division method, to obtain At least one sub-region set; based on the location information of each target region, determine the area of each sub-region in the sub-region set corresponding to each target region, and obtain at least one sub-region area set; The area of is summed to obtain the area of each target area.
  • the above-mentioned determining the target parameter of each target area in the above-mentioned target area set includes: in the above-mentioned first target picture, selecting a target point outside the target area; Connect with each vertex of the above-mentioned target area to obtain a connection polygon; determine the area of the above-mentioned connection polygon; determine the area of the concave area of the above-mentioned target area; calculate the difference based on the area of the above-mentioned connection polygon and the area of the above-mentioned concave area to obtain the above-mentioned target area of the area.
  • the above-mentioned determining the target parameter of each target area in the above-mentioned target area set includes: performing feature extraction on each target area in the above-mentioned target area set to obtain the above-mentioned target area.
  • vector graphics to form a vector illustration set includes: performing feature extraction on each target area in the above-mentioned target area set to obtain the above-mentioned target area.
  • vector graphics to form a vector illustration set includes: performing feature extraction on each target area in the above-mentioned target area set to obtain the above-mentioned target area.
  • vector graphics to form a vector illustration set
  • determine the confidence score of each vector graphics in the above vector vector set and the preset comparison vector graphics to obtain a confidence score set includes: performing feature extraction on each target area in the above-mentioned target area set to obtain the above-mentioned target area.
  • the above-mentioned preset condition includes that the value of the area is greater than the first preset threshold or the probability value is greater than the second preset threshold.
  • the second generating unit 403 of the information generating apparatus 400 is further configured to: map each candidate region in the above-mentioned candidate region set to a predetermined display picture frame to obtain a mapped picture, and The above-mentioned mapping picture is determined as the above-mentioned second target picture.
  • the above picture-related information includes category information and key point information.
  • the third generating unit 404 of the information generating apparatus 400 is further configured to: input the above-mentioned second target picture into a pre-trained third deep neural network to obtain the above-mentioned second target image The picture-related information of the picture.
  • the information generating apparatus 400 is further configured to: push the above-mentioned picture-related information to a target device having a display function, and control the above-mentioned target device to display the above-mentioned picture-related information.
  • the units recorded in the apparatus 400 correspond to the respective steps in the method described with reference to FIG. 2 . Therefore, the operations, features, and beneficial effects described above with respect to the method are also applicable to the apparatus 400 and the units included therein, and details are not described herein again.
  • FIG. 5 a schematic structural diagram of an electronic device (eg, computing device 101 in FIG. 1 ) 500 suitable for implementing some embodiments of the present disclosure is shown.
  • the server shown in FIG. 5 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • an electronic device 500 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 501 that may be loaded into random access according to a program stored in a read only memory (ROM) 502 or from a storage device 508 Various appropriate actions and processes are executed by the programs in the memory (RAM) 503 . In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored.
  • the processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
  • An input/output (I/O) interface 505 is also connected to bus 504 .
  • the following devices can be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 507 such as a computer; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509 .
  • Communication means 509 may allow electronic device 500 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 5 shows electronic device 500 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in FIG. 5 can represent one device, and can also represent multiple devices as required.
  • the processes described above with reference to the flowcharts may be implemented as computer software programs.
  • some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from a network via communication device 509, or from storage device 508, or from ROM 502.
  • the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are performed.
  • the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the foregoing two.
  • the computer readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein.
  • Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned apparatus; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: based on the acquired first target picture, generate a target area set; from the target area set A target area that meets the preset conditions is selected as a candidate area to obtain a candidate area set; based on the candidate area set, a second target picture is generated; based on the second target picture, picture related information is generated.
  • Computer program code for carrying out operations of some embodiments of the present disclosure may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, or a combination thereof, Also included are conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider to via Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units described in some embodiments of the present disclosure may be implemented by means of software, and may also be implemented by means of hardware.
  • the described unit may also be provided in the processor, for example, it may be described as: a processor includes a first generation unit, a selection unit, a second generation unit and a third generation unit.
  • the names of these units do not limit the unit itself in some cases.
  • the first generating unit may also be described as "a unit that generates a target area set based on the acquired first target image".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a method for generating information including: generating a target area set based on an acquired first target image; and selecting a target area that meets a preset condition from the target area set as a candidate region, a candidate region set is obtained; based on the candidate region set, a second target picture is generated; based on the second target picture, picture related information is generated.
  • the above-mentioned first target picture is a picture of a preset size cut out from a picture to be cut out, wherein the above-mentioned picture to be cut is a picture in which a nail area is determined to be displayed.
  • generating a set of target regions based on the acquired first target picture includes: in response to determining that the first target picture includes a target region, determining the location information of the target region; For the location information of the target area, the above-mentioned target area is segmented from the above-mentioned first target image by using a connected domain search method to obtain the above-mentioned target area set.
  • determining the location information of the target area in response to determining that the first target image includes a target area includes: inputting the first target image into a pre-trained first depth neural network network to obtain the location information of the target area in the first target image.
  • generating the set of target regions based on the acquired first target picture includes: inputting the first target picture into a pre-trained second deep neural network to obtain the first target picture The target area in , to form a target area set.
  • selecting a target area that meets a preset condition from the target area set as a candidate area to obtain a candidate area set includes: determining a target parameter of each target area in the target area set ; Select a predetermined number of target regions as the above-mentioned candidate regions from the above-mentioned target region set according to the numerical value of the target parameters corresponding to the target regions in descending order to obtain a candidate region set.
  • the aforementioned target parameter includes an area or a probability value.
  • determining the area of each target area in the target area set includes: determining the target area by dividing the inside of the target area or selecting target points outside the target area The area of each target region in the collection.
  • determining the target parameter of each target area in the target area set includes: dividing each target area in the target area set based on a preset division method to obtain at least one Sub-region set; based on the location information of each target region, determine the area of each sub-region in the sub-region set corresponding to each target region, and obtain at least one sub-region area set; Do the summation to get the area of each target area.
  • the above-mentioned determining the target parameter of each target area in the above-mentioned target area set includes: in the above-mentioned first target picture, selecting a target point outside the target area; The vertices of the target area are connected to obtain a connection polygon; the area of the connection polygon is determined; the area of the concave area of the target area is determined; based on the area of the connection polygon and the area of the depression area, the difference is obtained to obtain the area.
  • the above-mentioned determining the target parameters of each target area in the above-mentioned target area set includes: performing feature extraction on each target area in the above-mentioned target area set to obtain a vector diagram of the above-mentioned target area , to form a vector set; determine the confidence score of each vector map in the above vector set and the preset comparison vector map to obtain a set of confidence scores; determine the confidence score corresponding to each target area as the above target area probability value.
  • the above-mentioned preset condition includes that the value of the area is greater than the first preset threshold value or the probability value is greater than the second preset threshold value.
  • generating the second target picture based on the candidate region set includes: mapping each candidate region in the candidate region set to a predetermined display picture frame to obtain a mapped picture, and mapping the above-mentioned mapping The picture is determined as the above-mentioned second target picture.
  • the above picture-related information includes category information and key point information.
  • generating picture-related information based on the second target picture includes: inputting the second target picture into a pre-trained third deep neural network to obtain a picture of the second target picture Related Information.
  • the above-mentioned method further includes: pushing the above-mentioned picture-related information to a target device having a display function, and controlling the above-mentioned target device to display the above-mentioned picture-related information.
  • an information generating apparatus comprising: a first generating unit configured to generate a target area set based on the acquired first target picture; A target area that meets the preset conditions is selected from the area set as a candidate area to obtain a candidate area set; the second generation unit is configured to generate a second target image based on the candidate area set; the third generation unit is configured to be based on the first generation unit.
  • Two target pictures generate picture-related information.
  • the above-mentioned first target picture is a picture of a preset size cut out from a picture to be cut out, wherein the above-mentioned picture to be cut is a picture in which a nail area is determined to be displayed.
  • the first generating unit of the information generating apparatus is further configured to: in response to determining that the first target image contains a target area, determine the location information of the target area; For the location information, the connected domain search method is used to segment the above-mentioned target area from the above-mentioned first target image to obtain the above-mentioned target area set.
  • determining the location information of the target area in response to determining that the first target image includes a target area includes: inputting the first target image into a pre-trained first depth neural network network to obtain the location information of the target area in the first target image.
  • the first generating unit of the information generating apparatus is further configured to: input the above-mentioned first target picture into a pre-trained second deep neural network to obtain the target in the above-mentioned first target picture regions to form the target region set.
  • the selection unit of the information generating apparatus is further configured to: determine a target parameter of each target area in the target area set; A predetermined number of target regions are selected in descending order of the values as the above-mentioned candidate regions to obtain a candidate region set.
  • the aforementioned target parameter includes an area or a probability value.
  • determining the area of each target area in the target area set includes: determining the target area by dividing the inside of the target area or selecting target points outside the target area The area of each target region in the collection.
  • determining the target parameter of each target area in the target area set includes: dividing each target area in the target area set based on a preset division method to obtain at least one Sub-region set; based on the location information of each target region, determine the area of each sub-region in the sub-region set corresponding to each target region, and obtain at least one sub-region area set; Do the summation to get the area of each target area.
  • the above-mentioned determining the target parameter of each target area in the above-mentioned target area set includes: in the above-mentioned first target picture, selecting a target point outside the target area; The vertices of the target area are connected to obtain a connection polygon; the area of the connection polygon is determined; the area of the concave area of the target area is determined; based on the area of the connection polygon and the area of the depression area, the difference is obtained to obtain the area.
  • the above-mentioned determining the target parameters of each target area in the above-mentioned target area set includes: performing feature extraction on each target area in the above-mentioned target area set to obtain a vector diagram of the above-mentioned target area , to form a vector set; determine the confidence score of each vector map in the above vector set and the preset comparison vector map to obtain a set of confidence scores; determine the confidence score corresponding to each target area as the above target area probability value.
  • the above-mentioned preset condition includes that the value of the area is greater than the first preset threshold value or the probability value is greater than the second preset threshold value.
  • the second generating unit of the information generating apparatus is further configured to: map each candidate region in the above-mentioned candidate region set to a predetermined display picture frame to obtain a map picture, and map the above-mentioned map picture It is determined as the above-mentioned second target picture.
  • the above picture-related information includes category information and key point information.
  • the third generating unit of the information generating apparatus is further configured to: input the above-mentioned second target picture into a pre-trained third deep neural network to obtain the picture correlation of the above-mentioned second target picture information.
  • the information generating apparatus is further configured to: push the picture-related information to a target device having a display function, and control the target device to display the picture-related information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Geometry (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

一种信息生成方法、装置、电子设备和计算机可读介质,其中该方法包括:基于获取的第一目标图片,生成目标区域集合(201);从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合(202);基于候选区域集合,生成第二目标图片(203);基于第二目标图片,生成图片相关信息(204)。从而实现了针对目标区域的有效提取和对目标区域的进一步分类,使图像区域的识别结果更加精细,进而使后续的图像处理技术有了提升空间。

Description

信息生成方法、装置、电子设备和计算机可读介质
相关申请的交叉引用
本申请基于申请号为202010837740.6、申请日为2020年08月19日,名称为“信息生成方法、装置、电子设备和计算机可读介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开的实施例涉及计算机技术领域,具体涉及信息生成方法、装置、电子设备和计算机可读介质。
背景技术
随着时代的发展,各种图片处理的方法也随之产生。用户在需要将图片中的部分区域作为素材,制作新的图片的同时也有了更高的需求。比如,用户在得到需要的区域素材时,还想要得到与之相关的信息来丰富用户对素材的理解。由此,需要一种针对图片中显示的目标区域的有效提取和分析的方法。
发明内容
本公开的内容部分用于以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。本公开的内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
本公开的一些实施例提出了信息生成方法、装置、电子设备和计算机可读介质,来解决以上背景技术部分提到的技术问题。
第一方面,本公开的一些实施例提供了一种信息生成方法,该方法包括:基于获取的第一目标图片,生成目标区域集合;从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;基于候选区域集合,生成第二目标图片;基于第二目标图片,生成图片相关信息。
第二方面,本公开的一些实施例提供了一种信息生成装置,装置包括:第一生成单元,被配置成基于获取的第一目标图片,生成目标区域集合;选择单元,被配置成从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;第二生成单元,被配置成基于候选区域集合,生成第二目标图片;第三生成单元,被配置成基于第二目标图片,生成图片相关信息。
第三方面,本公开的一些实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中所描述的方法。
第四方面,本公开的一些实施例提供了一种计算机可读介质,其上存储有计算机程序,其中,程序被处理器执行时实现如第一方面中所描述的方法。
本公开的一些实施例提供的方法实现了对第一目标图片中的目标区域的有效提取。为第一目标图片中显示的目标区域进一步分类,生成图片相关信息。使对第一目标图片的识别结果更加精细,进而使后续的图像处理技术有了提升空间。此外,本公开的信息生成方法还可以应用于虚拟美甲技术领域。通过对图片中显示的指甲区域进行提取、识别分类,可以为虚拟美甲技术的发展提供了帮助。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。
图1是根据本公开的一些实施例的信息生成方法的一个应用场景的示意图;
图2是根据本公开的信息生成方法的一些实施例的流程图;
图3是根据本公开的信息生成方法的另一些实施例的流程图;
图4是根据本公开的信息生成装置的一些实施例的结构示意图;
图5是适于用来实现本公开的一些实施例的电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例。相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
下面将参考附图并结合实施例来详细说明本公开。
图1是根据本公开一些实施例的信息生成方法的应用场景的一个示意图。
在图1的应用场景中,首先,计算设备101可以基于获取的第一目标图片102,生成目标区域集合103。然后,计算设备101可以从上述目标区域集合103选择出符合预设条件的目标区域作为候选区域,得到候选区域集合104。之后,计算设备可以基于候选区域集合104,生成第二目标图片105。最后,计算设备101可以生成图片相关信息106。
需要说明的是,上述计算设备101可以是硬件,也可以是软件。当计算设备为硬件时,可以实现成多个服务器或终端设备组成的分布式集群,也可以实现成单个服务器或单个终端设备。当计算设备体现为软件时,可 以安装在上述所列举的硬件设备中。其可以实现成例如用来提供分布式服务的多个软件或软件模块,也可以实现成单个软件或软件模块。在此不做具体限定。
应该理解,图1中的计算设备的数目仅仅是示意性的。根据实现需要,可以具有任意数目的计算设备。
继续参考图2,示出了根据本公开的信息生成方法的一些实施例的流程200。该方法可以由图1中的计算设备101来执行。该信息生成方法,包括以下步骤:
步骤201,基于获取的第一目标图片,生成目标区域集合。
在一些实施例中,信息生成方法的执行主体(如图1所示的计算设备101)首先可以对第一目标图片进行影像检测,得到目标区域(例如,指甲)的位置信息。然后,基于所得到的目标区域的位置信息,上述执行主体可以利用连通域查找方法,确定目标区域的区域轮廓。之后,上述执行主体可以将所确定的轮廓分割出来,从而,得到目标区域集合。这里,影像检测通常用于检测出上述第一目标图片中显示的目标区域的位置。具体的,位置可以是以坐标的形式来表示的。在图像中,每个像素周围有8个邻接像素,邻接关系有4邻接和8邻接。如果两个像素点邻接,可以称两个像素点连通,彼此连通的点形成的区域叫做连通区域。连通域查找方法可以是寻找出目标区域中的各个连通区域以及标记显示的方法。
在一些实施例的一些可选的实现方式中,上述第一目标图片是从待截取图片中截取出来的预设尺寸的图片,其中,上述待截取图片是确定显示有指甲区域的图片。
在一些实施例的一些可选的实现方式中,上述执行主体可以将上述第一目标图片输入至预先训练的第一深度神经网络,得到上述第一目标图片中目标区域的位置信息。
在一些实施例的一些可选的实现方式中,上述第一深度神经网络可以是通过以下方法训练得到的:首先,上述执行主体可以获取训练样本集,上述训练样本集中的训练样本包括样本图片和样本位置信息。然后,上述执行主体可以从上述训练样本集中选取训练样本。之后,将选取的训练样 本中的样本图片作为初始模型的输入,将与上述样本图片对应的样本位置信息作为上述初始模型的期望输出,训练得到上述第一深度神经网络。上述初始模型可以是能够根据上述样本图片得到对应的样本位置信息的各种神经网络。上述初始模型的各层设置有初始参数,初始参数在上述第一深度神经网络的训练过程中可以不断被调整。例如,卷积神经网络(Convolutional Neural Network,CNN)。
在一些实施例的一些可选的实现方式中,上述第一深度神经网络包括目标区域定位网络和目标区域提取网络,上述目标区域定位网络用于确定图片中目标区域的坐标,上述目标区域提取网络用于基于上述坐标,对目标区域进行提取。上述目标区域定位网络可以采用目标检测算法(Region-CNN,R-CNN)。上述目标区域提取网络可以采用以下特征提取算法:SVM(支持向量机,Support Vector Machine),K最近邻算法,决策树,朴素贝叶斯。
步骤202,从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合。
在一些实施例中,上述执行主体可以从上述目标区域集合选择出面积大于第一预设阈值的目标区域作为候选区域,得到候选区域集合。上述执行主体也可以从上述目标区域集合选择出概率值大于第二预设阈值的目标区域作为候选区域,得到候选区域集合。这里,概率值可以是用来表示目标区域是表示指甲区域的可能性的值。
在一些实施例的一些可选的实现方式中,上述预设条件包括面积的值大于第一预设阈值或概率值大于第二预设阈值。
步骤203,基于候选区域集合,生成第二目标图片。
在一些实施例中,上述执行主体首先可以在预定展示平面上建立平面直角坐标系。然后,上述执行主体可以根据候选区域的位置信息(例如,坐标),将候选区域集合中的各个候选区域映射至预定展示平面,得到映射图片。之后,上述执行主体可以将上述映射图片确定为第二目标图片。
步骤204,基于第二目标图片,生成图片相关信息。
在一些实施例中,上述执行主体可以通过如下步骤生成图片相关信息:第一步,上述执行主体可以对第二目标图片中显示的每个候选区域进 行特征提取,得到每个候选区域的特征以生成矢量矩阵;第二步,上述执行主体可以确定每个候选区域的矢量矩阵与预设对比矢量矩阵集合中每个预设对比矢量矩阵的相似度,得到每个候选区域的相似度集合;第三步,基于每个候选区域的相似度集合,上述执行主体可以按照相似度由大到小的顺序,对相似度集合进行排序,得到每个候选区域的相似度序列;第四步,上述执行主体可以从相似度序列中选择出第一位置的相似度,得到第一相似度集合;第五步,上述执行主体可以将第一相似度集合中的每个相似度对应的预设对比矢量矩阵的类别信息确定为每个候选区域的类别信息;第六步,上述执行主体可以将上述第二目标图片输入至关键点提取网络,得到上述第二目标图片中的每个候选区域的关键点信息;第七步,上述执行主体可以将上述第二目标图片中的每个候选区域的类别信息和关键点信息进行组合,得到第二目标图片的图片相关信息。这里,相似度可以是将矢量矩阵与预设对比矢量矩阵进行余弦距离打分得到的分数。
在一些实施例的一些可选的实现方式中,上述执行主体可以将上述第二目标图片输入至预先训练的第三深度神经网络,得到图片相关信息。
在一些实施例的一些可选的实现方式中,图片相关信息包括类别信息和关键点信息。
在一些实施例的一些可选的实现方式中,上述第三深度神经网络可以包括类别信息生成网络和关键点提取网络。其中,类别信息生成网络包括特征提取网络和分类网络。这里,特征提取网络用于提取图片中的候选区域的特征以生成矢量矩阵,分类网络用于基于上述矢量矩阵进行分类,得到上述候选区域的类别信息。关键点提取网络用于识别第二目标图片中的关键点,生成关键点信息。
在一些实施例的一些可选的实现方式中,上述第三深度神经网络可以是能够根据第二目标图片得到候选区域的类别信息和关键点信息的各种神经网络。上述特征提取网络可以采用以下特征提取算法:SVM(支持向量机,Support Vector Machine),K最近邻算法,决策树,朴素贝叶斯。上述分类网络可以采用线性判别分析(linear discriminant analysis,LDA)和高斯分类器,也可以采用逻辑回归分类器。这里,类别可以包括但不限于以下至少一项:大拇指类别、食指类别、中指类别、无名指类别、小拇指 类别。作为示例,类别信息可以是“该区域属于大拇指”。
本公开的一些实施例提供的方法实现了对第一目标图片中的目标区域的有效提取。为第一目标图片中显示的目标区域进一步分类,生成图片相关信息。使对第一目标图片的识别结果更加精细,进而使后续的图像处理技术有了提升空间。
本公开的信息生成方法还可以应用于虚拟美甲技术领域。针对用户提供的指甲图片,提取指甲图片中的指甲区域,可以得到指甲图片中的各个指甲区域。然后,可以生成包含各个指甲区域的第二指甲图片以便用户将其作为素材进行下一步图片制作。通过对各个指甲区域进行进一步分类,生成包含指甲区域的类别信息和关键点信息的图片相关信息。可以辅助用户了解指甲区域的类别,减少用户对指甲区域类别进行判断的时间,侧面提高了提取出的指甲区域的被利用效率。
继续参考图3,示出了根据本公开的信息生成方法的另一些实施例的流程图300。该方法可以由图1中的计算设备101来执行。该信息生成方法,包括以下步骤:
步骤301,将第一目标图片输入至预先训练的第一深度神经网络,得到第一目标图片中的目标区域,以组成目标区域集合。
在一些实施例中,信息生成方法的执行主体(如图1所示的计算设备101)可以将第一目标图片输入至预先训练的第一深度神经网络,得到第一目标图片中的目标区域。这里,第一深度神经网络可以是预先训练好的用于针对图片中的目标区域进行提取的神经网络模型。
步骤302,确定目标区域集合中每个目标区域的目标参数。
在一些实施例中,上述执行主体可以通过以下步骤得到目标区域的面积:第一步,上述执行主体可以基于上述步骤301得到的目标区域的位置信息,可以得到上述目标区域的各个顶点的位置信息;第二步,上述执行主体可以基于预设划分方法,对上述目标区域进行划分,这里,预设划分方法可以是将目标区域划分为至少一个三角形,且三角形之间没有重叠部分;第三步,上述执行主体可以基于上述目标区域的各个顶点的位置信息,利用三角形面积计算方法,计算得到每个三角形的面积;第四步,上述执 行主体可以对得到的三角形的面积进行求和,将计算结果作为上述目标区域的面积。从而,上述执行主体可以得到目标区域集合中每个目标区域的面积。
在一些实施例的一些可选的实现方式中,上述确定上述目标区域集合中每个目标区域的面积,包括:通过对上述目标区域内部进行划分或者在上述目标区域外部选取目标点的方式确定上述目标区域集合中每个目标区域的面积。
在一些实施例的一些可选的实现方式中,上述执行主体还可以通过以下步骤得到目标区域的面积:第一步,上述执行主体基于上述步骤301得到的目标区域的位置信息,可以得到上述目标区域的各个顶点的位置信息;第二步,上述执行主体可以将上述各个顶点进行连接,确定上述目标区域的凹点,这里,凹点可以是上述目标区域的优角的顶点;第三步,上述执行主体可以在第一目标图片中选取目标区域外的目标点;第四步,上述执行主体可以获取该目标点的位置信息;第五步,上述执行主体可以将该目标点依次与上述目标区域的各个顶点进行连接,得到连接多边形;第六步,上述执行主体可以基于上述预设划分方法对上述连接多边形进行划分,得到至少一个三角形;第七步,上述执行主体可以计算得到每个三角形的面积,以及对得到的三角形的面积进行求和,将计算结果作为上述连接多边形的面积;第八步,上述执行主体可以将上述目标点与上述目标区域的凹点和该凹点相邻的两个顶点连接得到的区域确定为凹陷区域;第九步,上述执行主体可以利用上述预设划分方法计算得到该凹陷区域的面积;第十步,上述执行主体可以将上述连接多边形的面积与上述凹陷区域的面积的差的绝对值确定为上述目标区域的面积。
在一些实施例中,上述执行主体可以通过以下步骤得到目标区域的概率值:第一步,上述执行主体可以对目标区域集合中的每个目标区域进行特征提取,得到该目标区域的矢量图,以组成矢量图集合;第二步,上述执行主体可以将矢量图集合中的每个矢量图与预设对比矢量图进行余弦距离打分,得到余弦距离分数;第三步,上述执行主体可以将余弦距离分数确定为该矢量图与预设对比矢量图的置信度分数,得到置信度分数集合;第四步,上述执行主体可以将每个目标区域对应的置信度分数确定为 该目标区域的概率值。
具体地,在统计学中,一个概率样本的置信区间(Confidence interval)是对这个样本的某个总体参数的区间估计。置信区间展现的是这个参数的真实值有一定概率落在测量结果的周围的程度。置信区间给出的是被测量参数的测量值的可信程度,即前面所要求的“一定概率”。这个概率被称为置信度水平,一般用分数的形式来表示。
步骤303,从目标区域集合中按照目标区域对应的目标参数的数值由大到小的顺序选择预定数目个目标区域作为候选区域,得到候选区域集合。
在一些实施例中,上述执行主体可以按照面积由大到小的顺序从目标区域集合中选择预定数目个目标区域作为候选区域。上述执行主体也可以按照概率值由大到小的顺序从目标区域集合中选择预定数目个目标区域作为候选区域。
在一些实施例的一些可选的实现方式中,筛选掉面积值相对较小的目标区域,留下面积值相对较大的区域作为候选区域。可以使得生成的第二目标图片更加符合清晰度需求。筛选掉概率值相对较低的目标区域可以使得生成的第二目标图片的准确度更高。
步骤304,将候选区域集合中的各个候选区域映射至预定展示图片框,得到映射图片,以及将映射图片确定为第二目标图片。
在一些实施例中,上述执行主体首先可以根据各个候选区域的位置信息,计算得到每个候选区域之间的相对距离和角度。然后,上述执行主体可以根据每个候选区域之间的相对距离和角度,将候选区域映射至预定展示图片框,得到映射图片。之后,上述执行主体可以将上述映射图片确定为第二目标图片。这里,上述预定展示图片框的尺寸可以与第一目标图片的尺寸相同。
步骤305,基于第二目标图片,生成图片相关信息。
在一些实施例中,步骤305的具体实现及所带来的技术效果可以参考图2对应的那些实施例中的步骤204,在此不再赘述。
步骤306,将图片相关信息推送至具有显示功能的目标设备,以及控制目标设备显示图片相关信息。
在一些实施例中,上述执行主体可以将图片相关信息推送至具有显示功能的目标设备,以及控制目标设备显示图片相关信息。
从图3中可以看出,与图2对应的一些实施例的描述相比,图3对应的一些实施例中的图像分类方法的流程300详细描述了提取图像中显示的目标区域和确定目标区域类别的过程。由此,这些实施例描述的方案通过将目标区域分割出来,确定目标区域的类别,生成目标区域的类别信息和关键点信息。可以有效的提供对目标区域的分析结果。
进一步参考图4,作为对上述各图上述方法的实现,本公开提供了一种信息生成装置的一些实施例,这些装置实施例与图2上述的那些方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图4所示,一些实施例的信息生成装置400包括:第一生成单元401、选择单元402、第二生成单元403和第三生成单元404。其中,第一生成单元401,被配置成基于获取的第一目标图片,生成目标区域集合;选择单元402,被配置成从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;第三生成单元403,被配置成基于候选区域集合,生成第二目标图片;第四生成单元404,被配置成基于第二目标图片,生成图片相关信息。
在一些实施例的一些可选的实现方式中,上述第一目标图片是从待截取图片中截取出来的预设尺寸的图片,其中,上述待截取图片是确定显示有指甲区域的图片。
在一些实施例的一些可选的实现方式中,信息生成装置400的第一生成单元401被进一步配置成:响应于确定上述第一目标图片中包含目标区域,确定上述目标区域的位置信息;基于上述目标区域的位置信息,利用连通域查找方法,从上述第一目标图片中分割出上述目标区域,得到上述目标区域集合。
在一些实施例的一些可选的实现方式中,上述响应于确定上述第一目标图片中包含目标区域,确定上述目标区域的位置信息,包括:将上述第一目标图片输入至预先训练的第一深度神经网络,得到上述第一目标图片中目标区域的位置信息。
在一些实施例的一些可选的实现方式中,信息生成装置400的第一生成单元401被进一步配置成:将上述第一目标图片输入至预先训练的第二深度神经网络,得到上述第一目标图片中的目标区域,以组成目标区域集合。
在一些实施例的一些可选的实现方式中,信息生成装置400的选择单元402被进一步配置成:确定上述目标区域集合中每个目标区域的目标参数;从上述目标区域集合中按照目标区域对应的目标参数的数值由大到小的顺序选择预定数目个目标区域作为上述候选区域,得到候选区域集合。
在一些实施例的一些可选的实现方式中,上述目标参数包括面积或概率值。
在一些实施例的一些可选的实现方式中,上述确定上述目标区域集合中每个目标区域的面积,包括:通过对上述目标区域内部进行划分或者在上述目标区域外部选取目标点的方式确定上述目标区域集合中每个目标区域的面积。
在一些实施例的一些可选的实现方式中,上述确定上述目标区域集合中每个目标区域的目标参数,包括:基于预设划分方法,对上述目标区域集合中每个目标区域进行划分,得到至少一个子区域集合;基于每个目标区域的位置信息,确定每个目标区域对应的子区域集合中的每个子区域的面积,得到至少一个子区域面积集合;对上述至少一个子区域面积集合中的面积进行求和,得到每个目标区域的面积。
在一些实施例的一些可选的实现方式中,上述确定上述目标区域集合中每个目标区域的目标参数,包括:在上述第一目标图片中,选取目标区域外的目标点;将上述目标点与上述目标区域的各个顶点进行连接,得到连接多边形;确定上述连接多边形的面积;确定上述目标区域的凹陷区域的面积;基于上述连接多边形的面积和上述凹陷区域的面积进行求差,得到上述目标区域的面积。
在一些实施例的一些可选的实现方式中,上述确定上述目标区域集合中每个目标区域的目标参数,包括:对上述目标区域集合中的每个目标区域进行特征提取,得到上述目标区域的矢量图,以组成矢量图集合;确定上述矢量图集合中的每个矢量图与预设对比矢量图的置信度分数,得到置信度分数集合;将每个目标区域对应的置信度分数确定为上述目标区域的概 率值。
在一些实施例的一些可选的实现方式中,上述预设条件包括面积的值大于第一预设阈值或概率值大于第二预设阈值。
在一些实施例的一些可选的实现方式中,信息生成装置400的第二生成单元403被进一步配置成:将上述候选区域集合中的各个候选区域映射至预定展示图片框,得到映射图片,以及将上述映射图片确定为上述第二目标图片。
在一些实施例的一些可选的实现方式中,上述图片相关信息包括类别信息和关键点信息。
在一些实施例的一些可选的实现方式中,信息生成装置400的第三生成单元404被进一步配置成:将上述第二目标图片输入至预先训练的第三深度神经网络,得到上述第二目标图片的图片相关信息。
在一些实施例的一些可选的实现方式中,信息生成装置400被进一步配置成:将上述图片相关信息推送至具有显示功能的目标设备,以及控制上述目标设备显示上述图片相关信息。
可以理解的是,该装置400中记载的诸单元与参考图2描述的方法中的各个步骤相对应。由此,上文针对方法描述的操作、特征以及产生的有益效果同样适用于装置400及其中包含的单元,在此不再赘述。
下面参考图5,其示出了适于用来实现本公开的一些实施例的电子设备(例如图1中的计算设备101)500的结构示意图。图5示出的服务器仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。
如图5所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、 键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图5中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。
特别地,根据本公开的一些实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的一些实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的一些实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开的一些实施例的方法中限定的上述功能。
需要说明的是,本公开的一些实施例上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的一些实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。而在本公开的一些实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行***、装置或者器件 使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述装置中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:基于获取的第一目标图片,生成目标区域集合;从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;基于候选区域集合,生成第二目标图片;基于第二目标图片,生成图片相关信息。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的一些实施例的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的 功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开的一些实施例中的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括第一生成单元、选择单元、第二生成单元和第三生成单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一生成单元还可以被描述为“基于获取的第一目标图片,生成目标区域集合的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上***(SOC)、复杂可编程逻辑设备(CPLD)等等。
根据本公开的一个或多个实施例,提供了一种信息生成方法,包括:基于获取的第一目标图片,生成目标区域集合;从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;基于候选区域集合,生成第二目标图片;基于第二目标图片,生成图片相关信息。
根据本公开的一个或多个实施例,上述第一目标图片是从待截取图片中截取出来的预设尺寸的图片,其中,上述待截取图片是确定显示有指甲区域的图片。
根据本公开的一个或多个实施例,上述基于获取的第一目标图片,生成目标区域集合,包括:响应于确定上述第一目标图片中包含目标区域,确定上述目标区域的位置信息;基于上述目标区域的位置信息,利用连通域查找方法,从上述第一目标图片中分割出上述目标区域,得到上述目标区域集合。
根据本公开的一个或多个实施例,上述响应于确定上述第一目标图片中包含目标区域,确定上述目标区域的位置信息,包括:将上述第一目标 图片输入至预先训练的第一深度神经网络,得到上述第一目标图片中目标区域的位置信息。
根据本公开的一个或多个实施例,上述基于获取的第一目标图片,生成目标区域集合,包括:将上述第一目标图片输入至预先训练的第二深度神经网络,得到上述第一目标图片中的目标区域,以组成目标区域集合。
根据本公开的一个或多个实施例,上述从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合,包括:确定上述目标区域集合中每个目标区域的目标参数;从上述目标区域集合中按照目标区域对应的目标参数的数值由大到小的顺序选择预定数目个目标区域作为上述候选区域,得到候选区域集合。
根据本公开的一个或多个实施例,上述目标参数包括面积或概率值。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的面积,包括:通过对上述目标区域内部进行划分或者在上述目标区域外部选取目标点的方式确定上述目标区域集合中每个目标区域的面积。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的目标参数,包括:基于预设划分方法,对上述目标区域集合中每个目标区域进行划分,得到至少一个子区域集合;基于每个目标区域的位置信息,确定每个目标区域对应的子区域集合中的每个子区域的面积,得到至少一个子区域面积集合;对上述至少一个子区域面积集合中的面积进行求和,得到每个目标区域的面积。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的目标参数,包括:在上述第一目标图片中,选取目标区域外的目标点;将上述目标点与上述目标区域的各个顶点进行连接,得到连接多边形;确定上述连接多边形的面积;确定上述目标区域的凹陷区域的面积;基于上述连接多边形的面积和上述凹陷区域的面积进行求差,得到上述目标区域的面积。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的目标参数,包括:对上述目标区域集合中的每个目标区域进行特征提取,得到上述目标区域的矢量图,以组成矢量图集合;确定上述矢 量图集合中的每个矢量图与预设对比矢量图的置信度分数,得到置信度分数集合;将每个目标区域对应的置信度分数确定为上述目标区域的概率值。
根据本公开的一个或多个实施例,上述预设条件包括面积的值大于第一预设阈值或概率值大于第二预设阈值。
根据本公开的一个或多个实施例,上述基于候选区域集合,生成第二目标图片,包括:将上述候选区域集合中的各个候选区域映射至预定展示图片框,得到映射图片,以及将上述映射图片确定为上述第二目标图片。
根据本公开的一个或多个实施例,上述图片相关信息包括类别信息和关键点信息。
根据本公开的一个或多个实施例,上述基于第二目标图片,生成图片相关信息,包括:将上述第二目标图片输入至预先训练的第三深度神经网络,得到上述第二目标图片的图片相关信息。
根据本公开的一个或多个实施例,上述方法还包括:将上述图片相关信息推送至具有显示功能的目标设备,以及控制上述目标设备显示上述图片相关信息。
根据本公开的一个或多个实施例,提供了一种信息生成装置,包括:第一生成单元,被配置成基于获取的第一目标图片,生成目标区域集合;选择单元,被配置成从目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;第二生成单元,被配置成基于候选区域集合,生成第二目标图片;第三生成单元,被配置成基于第二目标图片,生成图片相关信息。
根据本公开的一个或多个实施例,上述第一目标图片是从待截取图片中截取出来的预设尺寸的图片,其中,上述待截取图片是确定显示有指甲区域的图片。
根据本公开的一个或多个实施例,信息生成装置的第一生成单元被进一步配置成:响应于确定上述第一目标图片中包含目标区域,确定上述目标区域的位置信息;基于上述目标区域的位置信息,利用连通域查找方法,从上述第一目标图片中分割出上述目标区域,得到上述目标区域集合。
根据本公开的一个或多个实施例,上述响应于确定上述第一目标图片 中包含目标区域,确定上述目标区域的位置信息,包括:将上述第一目标图片输入至预先训练的第一深度神经网络,得到上述第一目标图片中目标区域的位置信息。
根据本公开的一个或多个实施例,信息生成装置的第一生成单元被进一步配置成:将上述第一目标图片输入至预先训练的第二深度神经网络,得到上述第一目标图片中的目标区域,以组成目标区域集合。
根据本公开的一个或多个实施例,信息生成装置的选择单元被进一步配置成:确定上述目标区域集合中每个目标区域的目标参数;从上述目标区域集合中按照目标区域对应的目标参数的数值由大到小的顺序选择预定数目个目标区域作为上述候选区域,得到候选区域集合。
根据本公开的一个或多个实施例,上述目标参数包括面积或概率值。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的面积,包括:通过对上述目标区域内部进行划分或者在上述目标区域外部选取目标点的方式确定上述目标区域集合中每个目标区域的面积。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的目标参数,包括:基于预设划分方法,对上述目标区域集合中每个目标区域进行划分,得到至少一个子区域集合;基于每个目标区域的位置信息,确定每个目标区域对应的子区域集合中的每个子区域的面积,得到至少一个子区域面积集合;对上述至少一个子区域面积集合中的面积进行求和,得到每个目标区域的面积。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的目标参数,包括:在上述第一目标图片中,选取目标区域外的目标点;将上述目标点与上述目标区域的各个顶点进行连接,得到连接多边形;确定上述连接多边形的面积;确定上述目标区域的凹陷区域的面积;基于上述连接多边形的面积和上述凹陷区域的面积进行求差,得到上述目标区域的面积。
根据本公开的一个或多个实施例,上述确定上述目标区域集合中每个目标区域的目标参数,包括:对上述目标区域集合中的每个目标区域进行特征提取,得到上述目标区域的矢量图,以组成矢量图集合;确定上述矢 量图集合中的每个矢量图与预设对比矢量图的置信度分数,得到置信度分数集合;将每个目标区域对应的置信度分数确定为上述目标区域的概率值。
根据本公开的一个或多个实施例,上述预设条件包括面积的值大于第一预设阈值或概率值大于第二预设阈值。
根据本公开的一个或多个实施例,信息生成装置的第二生成单元被进一步配置成:将上述候选区域集合中的各个候选区域映射至预定展示图片框,得到映射图片,以及将上述映射图片确定为上述第二目标图片。
根据本公开的一个或多个实施例,上述图片相关信息包括类别信息和关键点信息。
根据本公开的一个或多个实施例,信息生成装置的第三生成单元被进一步配置成:将上述第二目标图片输入至预先训练的第三深度神经网络,得到上述第二目标图片的图片相关信息。
根据本公开的一个或多个实施例,信息生成装置被进一步配置成:将上述图片相关信息推送至具有显示功能的目标设备,以及控制上述目标设备显示上述图片相关信息。
以上描述仅为本公开的一些较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (19)

  1. 一种信息生成方法,包括:
    基于获取的第一目标图片,生成目标区域集合;
    从所述目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;
    基于所述候选区域集合,生成第二目标图片;
    基于所述第二目标图片,生成图片相关信息。
  2. 根据权利要求1所述的方法,其中,所述第一目标图片是从待截取图片中截取出来的预设尺寸的图片,其中,所述待截取图片是确定显示有指甲区域的图片。
  3. 根据权利要求1所述的方法,其中,所述基于获取的第一目标图片,生成目标区域集合,包括:
    响应于确定所述第一目标图片中包含目标区域,确定所述目标区域的位置信息;
    基于所述目标区域的位置信息,利用连通域查找方法,从所述第一目标图片中分割出所述目标区域,得到所述目标区域集合。
  4. 根据权利要求3所述的方法,其中,所述响应于确定所述第一目标图片中包含目标区域,确定所述目标区域的位置信息,包括:
    将所述第一目标图片输入至预先训练的第一深度神经网络,得到所述第一目标图片中目标区域的位置信息。
  5. 根据权利要求1所述的方法,其中,所述基于获取的第一目标图片,生成目标区域集合,包括:
    将所述第一目标图片输入至预先训练的第二深度神经网络,得到所述第一目标图片中的目标区域,以组成目标区域集合。
  6. 根据权利要求1所述的方法,其中,所述从所述目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合,包括:
    确定所述目标区域集合中每个目标区域的目标参数;
    从所述目标区域集合中按照目标区域对应的目标参数的数值由大到小的顺序选择预定数目个目标区域作为所述候选区域,得到候选区域集 合。
  7. 根据权利要求6所述的方法,其中,所述目标参数包括面积或概率值。
  8. 根据权利要求7所述的方法,其中,所述确定所述目标区域集合中每个目标区域的面积,包括:
    通过对所述目标区域内部进行划分或者在所述目标区域外部选取目标点的方式确定所述目标区域集合中每个目标区域的面积。
  9. 根据权利要求8所述的方法,其中,所述确定所述目标区域集合中每个目标区域的目标参数,包括:
    基于预设划分方法,对所述目标区域集合中每个目标区域进行划分,得到至少一个子区域集合;
    基于每个目标区域的位置信息,确定每个目标区域对应的子区域集合中的每个子区域的面积,得到至少一个子区域面积集合;
    对所述至少一个子区域面积集合中的面积进行求和,得到每个目标区域的面积。
  10. 根据权利要求8所述的方法,其中,所述确定所述目标区域集合中每个目标区域的目标参数,包括:
    在所述第一目标图片中,选取所述目标区域外的目标点;
    将所述目标点与所述目标区域的各个顶点进行连接,得到连接多边形;
    确定所述连接多边形的面积;
    确定所述目标区域的凹陷区域的面积;
    基于所述连接多边形的面积和所述凹陷区域的面积进行求差,得到所述目标区域的面积。
  11. 根据权利要求8所述的方法,其中,所述确定所述目标区域集合中每个目标区域的目标参数,包括:
    对所述目标区域集合中的每个目标区域进行特征提取,得到所述目标区域的矢量图,以组成矢量图集合;
    确定所述矢量图集合中的每个矢量图与预设对比矢量图的置信度分数,得到置信度分数集合;
    将每个目标区域对应的置信度分数确定为所述目标区域的概率值。
  12. 根据权利要求8所述的方法,其中,所述预设条件包括面积的值大于第一预设阈值或概率值大于第二预设阈值。
  13. 根据权利要求1所述的方法,其中,所述基于所述候选区域集合,生成第二目标图片,包括:
    将所述候选区域集合中的各个候选区域映射至预定展示图片框,得到映射图片,以及将所述映射图片确定为所述第二目标图片。
  14. 根据权利要求1所述的方法,其中,所述图片相关信息包括类别信息和关键点信息。
  15. 根据权利要求14所述的方法,其中,所述基于所述第二目标图片,生成图片相关信息,包括:
    将所述第二目标图片输入至预先训练的第三深度神经网络,得到所述第二目标图片的图片相关信息。
  16. 根据权利要求1-15之一所述的方法,其中,所述方法还包括:
    将所述图片相关信息推送至具有显示功能的目标设备,以及控制所述目标设备显示所述图片相关信息。
  17. 一种信息生成装置,包括:
    第一生成单元,被配置成基于获取的第一目标图片,生成目标区域集合;
    选择单元,被配置成从所述目标区域集合中选择出符合预设条件的目标区域作为候选区域,得到候选区域集合;
    第二生成单元,被配置成基于所述候选区域集合,生成第二目标图片;
    第三生成单元,被配置成基于所述第二目标图片,生成图片相关信息。
  18. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-16中任一所述的方法。
  19. 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-16中任一所述的方法。
PCT/CN2021/111979 2020-08-19 2021-08-11 信息生成方法、装置、电子设备和计算机可读介质 WO2022037452A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/042,143 US20230306602A1 (en) 2020-08-19 2021-08-11 Information generation method and apparatus, electronic device, and computer readable medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010837740.6A CN111968030B (zh) 2020-08-19 2020-08-19 信息生成方法、装置、电子设备和计算机可读介质
CN202010837740.6 2020-08-19

Publications (1)

Publication Number Publication Date
WO2022037452A1 true WO2022037452A1 (zh) 2022-02-24

Family

ID=73387867

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111979 WO2022037452A1 (zh) 2020-08-19 2021-08-11 信息生成方法、装置、电子设备和计算机可读介质

Country Status (3)

Country Link
US (1) US20230306602A1 (zh)
CN (1) CN111968030B (zh)
WO (1) WO2022037452A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111968030B (zh) * 2020-08-19 2024-02-20 抖音视界有限公司 信息生成方法、装置、电子设备和计算机可读介质

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651955A (zh) * 2016-10-10 2017-05-10 北京小米移动软件有限公司 图片中目标物的定位方法及装置
CN106934346A (zh) * 2017-01-24 2017-07-07 北京大学 一种目标检测性能优化的方法
CN107301657A (zh) * 2017-06-12 2017-10-27 西安交通大学 一种考虑目标运动信息的视频目标跟踪方法
CN108876791A (zh) * 2017-10-23 2018-11-23 北京旷视科技有限公司 图像处理方法、装置和***及存储介质
US20190057244A1 (en) * 2017-08-18 2019-02-21 Autel Robotics Co., Ltd. Method for determining target through intelligent following of unmanned aerial vehicle, unmanned aerial vehicle and remote control
CN109522429A (zh) * 2018-10-18 2019-03-26 百度在线网络技术(北京)有限公司 用于生成信息的方法和装置
CN110796663A (zh) * 2019-09-17 2020-02-14 北京迈格威科技有限公司 图片剪裁方法、装置、设备和存储介质
CN111881944A (zh) * 2020-07-08 2020-11-03 贵州无忧天空科技有限公司 图像鉴别的方法、电子设备和计算机可读介质
CN111968030A (zh) * 2020-08-19 2020-11-20 北京字节跳动网络技术有限公司 信息生成方法、装置、电子设备和计算机可读介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109559324B (zh) * 2018-11-22 2020-06-05 北京理工大学 一种线阵图像中的目标轮廓检测方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651955A (zh) * 2016-10-10 2017-05-10 北京小米移动软件有限公司 图片中目标物的定位方法及装置
CN106934346A (zh) * 2017-01-24 2017-07-07 北京大学 一种目标检测性能优化的方法
CN107301657A (zh) * 2017-06-12 2017-10-27 西安交通大学 一种考虑目标运动信息的视频目标跟踪方法
US20190057244A1 (en) * 2017-08-18 2019-02-21 Autel Robotics Co., Ltd. Method for determining target through intelligent following of unmanned aerial vehicle, unmanned aerial vehicle and remote control
CN108876791A (zh) * 2017-10-23 2018-11-23 北京旷视科技有限公司 图像处理方法、装置和***及存储介质
CN109522429A (zh) * 2018-10-18 2019-03-26 百度在线网络技术(北京)有限公司 用于生成信息的方法和装置
CN110796663A (zh) * 2019-09-17 2020-02-14 北京迈格威科技有限公司 图片剪裁方法、装置、设备和存储介质
CN111881944A (zh) * 2020-07-08 2020-11-03 贵州无忧天空科技有限公司 图像鉴别的方法、电子设备和计算机可读介质
CN111968030A (zh) * 2020-08-19 2020-11-20 北京字节跳动网络技术有限公司 信息生成方法、装置、电子设备和计算机可读介质

Also Published As

Publication number Publication date
CN111968030B (zh) 2024-02-20
US20230306602A1 (en) 2023-09-28
CN111968030A (zh) 2020-11-20

Similar Documents

Publication Publication Date Title
US11205100B2 (en) Edge-based adaptive machine learning for object recognition
CN109214343B (zh) 用于生成人脸关键点检测模型的方法和装置
US10572072B2 (en) Depth-based touch detection
EP3324339B1 (en) Method and apparatus to perform material recognition and training for material recognition
US10614289B2 (en) Facial tracking with classifiers
US11704357B2 (en) Shape-based graphics search
Singh et al. A novel approach to combine features for salient object detection using constrained particle swarm optimization
JP2015041383A (ja) 対象追跡方法及び対象追跡装置
JP2016503220A (ja) ジェスチャ認識のためのパーツ及び状態検出
US20220215548A1 (en) Method and device for identifying abnormal cell in to-be-detected sample, and storage medium
CN110298850B (zh) 眼底图像的分割方法和装置
Kerdvibulvech A methodology for hand and finger motion analysis using adaptive probabilistic models
EP3711027B1 (en) System and method for drawing beautification
WO2022037452A1 (zh) 信息生成方法、装置、电子设备和计算机可读介质
Dufourq A survey on factors affecting facial expression recognition based on convolutional neural networks
US11715204B2 (en) Adaptive machine learning system for image-based biological sample constituent analysis
CN116977265A (zh) 缺陷检测模型的训练方法、装置、计算机设备和存储介质
WO2023035535A1 (zh) 语义分割网络的训练方法、装置、设备及存储介质
CN114782771A (zh) 训练方法、图像检索方法、图像处理方法、装置及设备
CN112765975B (zh) 分词岐义处理方法、装置、设备以及介质
Zhang et al. Accurate per-pixel hand detection from a single depth image
US20230401718A1 (en) Object selection for images using image regions
US20230376849A1 (en) Estimating optimal training data set sizes for machine learning model systems and applications
CN117636010A (zh) 一种图像分类模型的训练方法、装置、设备及介质
CN111311616A (zh) 用于分割图像的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21857547

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21857547

Country of ref document: EP

Kind code of ref document: A1