[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113505784A - Automatic nail annotation analysis method and device, electronic equipment and storage medium - Google Patents

Automatic nail annotation analysis method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113505784A
CN113505784A CN202110655958.4A CN202110655958A CN113505784A CN 113505784 A CN113505784 A CN 113505784A CN 202110655958 A CN202110655958 A CN 202110655958A CN 113505784 A CN113505784 A CN 113505784A
Authority
CN
China
Prior art keywords
target detection
oracle
nail
forged
detection model
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.)
Granted
Application number
CN202110655958.4A
Other languages
Chinese (zh)
Other versions
CN113505784B (en
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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN202110655958.4A priority Critical patent/CN113505784B/en
Publication of CN113505784A publication Critical patent/CN113505784A/en
Application granted granted Critical
Publication of CN113505784B publication Critical patent/CN113505784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and a device for automatically marking and analyzing a nail plate, wherein the method comprises the following steps: obtaining an original A picture and removing background noise of the original A picture to obtain a preprocessed A picture; inputting the first image to a target detection model to obtain a target detection result output by the target detection model; the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples. According to the invention, the interference of background noise on the detection of the oracle target is reduced by introducing the preprocessing of the oracle image, and the forged oracle is used for training the target detection model, so that the application effect of the target detection model in a real scene is ensured, and the accurate identification of the oracle in a complex oracle is realized.

Description

Automatic nail annotation analysis method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of nail annotation analysis, in particular to a nail automatic annotation analysis method and device, electronic equipment and a storage medium.
Background
Since in the actual situation the oracle is basically located on the unearthed nail and often there are many oracle on one nail, the model of single-word recognition is difficult to be used directly in real-world applications. The model with more practical application significance should have the capability of directly finding single carapace characters from complex whole carapaces and identifying the single carapaces, namely the capability of automatically labeling and analyzing the carapaces.
Disclosure of Invention
The invention provides a method and a device for automatically marking and analyzing a nail, which are used for solving the defect that a single character recognition model in the prior art is difficult to be used for a complex nail containing a plurality of oracle characters, and realizing the automatic frame selection and recognition of the oracle characters in the complex nail.
The invention provides an automatic nail annotation analysis method, which comprises the following steps:
obtaining an original A picture and removing background noise of the original A picture to obtain a preprocessed A picture;
inputting the first image to a target detection model to obtain a target detection result output by the target detection model;
the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
According to the automatic nail annotation analysis method provided by the invention, the step of generating the forged nail sample comprises the following steps:
simulating the arrangement mode of the individual oracle characters in the individual oracle character data set to randomly place the individual oracle characters based on a preset individual oracle character data set and the arrangement mode of the oracle characters on the oracle, and adding random noise to generate a forged oracle data set;
and sampling the forged nail plate data set to obtain a forged nail plate sample.
According to the automatic nail annotation analysis method provided by the invention, the removing of the background noise of the original nail image comprises the following steps:
and removing the background noise of the original nail image based on image binarization and image painting.
According to the automatic nail annotation analysis method provided by the invention, the step of inputting the nail image into a target detection model to obtain a target detection result output by the target detection model comprises the following steps:
selecting a candidate region from the first image to obtain a candidate region set;
extracting the features of each candidate region based on a convolutional neural network to obtain corresponding feature vector representation;
inputting the feature vector representation into a classifier to obtain a corresponding category and a confidence level;
sequentially calculating the overlapping degree between every two candidate regions;
if the overlapping degree is larger than a preset threshold value, deleting the candidate region corresponding to the characteristic vector representation with low confidence coefficient from the candidate region set to obtain a candidate region subset;
adjusting the frame of the candidate area in the candidate area subset to obtain a corrected oracle area;
and taking the oracle region and the corresponding category as a target detection result.
According to the method for automatically labeling and analyzing the nail plate, provided by the invention, the forged nail plate data set is sampled to obtain a forged nail plate sample, and the method comprises the following steps:
dividing the sampling interval of the forged A-plate data set to obtain a plurality of sampling subintervals;
and selecting the corresponding to-be-selected positive sample or to-be-selected negative sample from the sampling subinterval as a forged nail sample.
According to the automatic nail annotation analysis method provided by the invention, the convolutional neural network-based feature extraction is performed on each candidate region to obtain a corresponding feature vector representation, and the method comprises the following steps:
extracting features of each candidate region based on the convolutional neural network to obtain original level features corresponding to different neural network layers;
fusing the original level features to obtain fused semantic features;
processing the original level features based on the fused semantic features to obtain corresponding enhanced semantic features;
and taking the enhanced semantic features of the output layer of the convolutional neural network as feature vectors corresponding to the candidate regions for representation.
According to the automatic nail annotation analysis method provided by the invention, the target detection model is trained by adopting the following loss function:
Figure BDA0003113643690000031
wherein x is the sample loss, α, γ, b and C are parameters, α, γ and b satisfy the following constraints:
αln(b+1)=γ。
the invention also provides an automatic nail plate labeling and analyzing device, which comprises:
the device comprises a preprocessing unit, a background noise generation unit and a background noise generation unit, wherein the preprocessing unit is used for acquiring an original A picture and removing the background noise of the original A picture to obtain a preprocessed A picture;
the target detection unit is used for inputting the first image to a target detection model to obtain a target detection result output by the target detection model;
the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
According to the automatic nail annotation analysis device provided by the invention, the device further comprises a data sample generation unit, which is used for:
simulating the arrangement mode of the individual oracle characters in the individual oracle character data set to randomly place the individual oracle characters based on a preset individual oracle character data set and the arrangement mode of the oracle characters on the oracle, and adding random noise to generate a forged oracle data set;
and sampling the forged nail plate data set to obtain a forged nail plate sample.
According to the automatic nail plate labeling and analyzing device provided by the invention, the preprocessing unit is further used for:
and removing the background noise of the original nail image based on image binarization and image painting.
According to the automatic nail annotation analysis device provided by the invention, the target detection unit is further configured to:
selecting a candidate region from the first image to obtain a candidate region set;
extracting the features of each candidate region based on a convolutional neural network to obtain corresponding feature vector representation;
inputting the feature vector representation into a classifier to obtain a corresponding category and a confidence level;
sequentially calculating the overlapping degree between every two candidate regions;
if the overlapping degree is larger than a preset threshold value, deleting the candidate region corresponding to the characteristic vector representation with low confidence coefficient from the candidate region set to obtain a candidate region subset;
adjusting the frame of the candidate area in the candidate area subset to obtain a corrected oracle area;
and taking the oracle region and the corresponding category as a target detection result.
According to the automatic nail annotation analysis device provided by the invention, the data sample generation unit is further configured to:
dividing the sampling interval of the forged A-plate data set to obtain a plurality of sampling subintervals;
and selecting the corresponding to-be-selected positive sample or to-be-selected negative sample from the sampling subinterval as a forged nail sample.
According to the automatic nail annotation analysis device provided by the invention, the target detection unit is further configured to:
extracting features of each candidate region based on the convolutional neural network to obtain original level features corresponding to different neural network layers;
fusing the original level features to obtain fused semantic features;
processing the original level features based on the fused semantic features to obtain corresponding enhanced semantic features;
and taking the enhanced semantic features of the output layer of the convolutional neural network as feature vectors corresponding to the candidate regions for representation.
According to the automatic nail annotation analysis device provided by the invention, the device further comprises a model training unit, which is used for:
training the target detection model using the following loss function:
Figure BDA0003113643690000051
wherein x is the sample loss, α, γ, b and C are parameters, α, γ and b satisfy the following constraints:
αln(b+1)=γ。
the invention also provides an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the steps of the automatic nail annotation analysis method can be realized.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method for automatic annotation resolution of a nail file as described in any one of the above.
According to the method and the device for automatically marking and analyzing the oracle, the interference of background noise on the detection of the oracle target is reduced by introducing the preprocessing of the oracle image, and the forged oracle is used for training the target detection model, so that the application effect of the target detection model in a real scene is ensured, and the accurate identification of the oracle in a complex oracle is realized.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for automatically labeling and analyzing a nail plate according to an embodiment of the present invention;
FIG. 2 is a second schematic flow chart of the method for automatically labeling and analyzing a nail plate according to the embodiment of the present invention;
FIG. 3 is a schematic diagram of an automatically generated training sample provided by an embodiment of the present invention;
FIG. 4 is a schematic illustration of images of a nail before and after pre-processing provided by an embodiment of the invention;
fig. 5 is a third schematic flow chart of an automatic nail annotation analysis method according to an embodiment of the present invention;
FIG. 6 is a fourth schematic flowchart of an automatic nail annotation analyzing method according to an embodiment of the present invention;
fig. 7 is a fifth flowchart illustrating an automatic nail annotation analyzing method according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating the detection effect of oracle-bone inscription according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an automatic nail annotation analyzing device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present invention are described below with reference to fig. 1 to 10.
Fig. 1 is a schematic flow chart of a method for automatically labeling and analyzing a nail plate according to an embodiment of the present invention, where the method includes:
and step 110, obtaining an original image of the nail plate and removing background noise of the original image of the nail plate to obtain a preprocessed image of the nail plate.
One of the difficulties of the automatic nail annotation and analysis task is that the noise greatly reduces the accuracy of target detection in the case of the non-uniform background color, nail fouling and excessive cracks in the whole nail image, and therefore the problem of the noise of the original nail image needs to be solved in nail data preprocessing.
And 120, inputting the image of the nail into the target detection model to obtain a target detection result output by the target detection model.
The target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
It should be noted that the automatic nail annotation analysis is to find and identify individual nails from complex whole nails, and such a task is very similar to a target detection task in the field of computer vision, and the target detection task is to select and classify a target object frame from a picture with a plurality of objects, so that a model with the capability of automatically selecting and identifying the oracle characters by using a relevant method of target detection can be constructed.
However, since the well-labeled data is very rare, the training data is deficient, and the target detection model cannot be directly applied to the automatic nail labeling analysis task, the embodiment provides a 'fake nail' training method, a real nail is simulated by fake nail, a large number of training samples with fine labels can be conveniently generated, and the difference between the training samples and the real scene is not large, so that the application effect of the model trained by the method in the real scene can be ensured.
According to the automatic nail annotation analysis method provided by the invention, the interference of background noise on the detection of the oracle target is reduced by introducing the preprocessing of the nail image, and the forged nail is used for training the target detection model, so that the application effect of the target detection model in a real scene is ensured, and the accurate identification of the oracle in a complex nail is realized.
Further, in an embodiment of the present invention, a counterfeit nail sample is generated by:
step 210, randomly placing individual oracle characters in the individual oracle character data set in a simulated arrangement mode based on a preset individual oracle character data set and an arrangement mode of the oracle characters on the oracle, and adding random noise to generate a forged oracle data set.
Specifically, in order to simulate a preprocessed nail image, samples of a plurality of individual oracle characters are randomly selected from an individual oracle character data set and placed on a black background picture, and the placed positions are recorded as correct marks of object selection frames, so that the distribution of the oracle characters on the nail is simulated; meanwhile, in order to reduce overfitting and enhance the robustness of the system, random white noise points are added into the picture, noise points which are difficult to remove in the picture scanned by the A-slice are simulated, and the model is adapted to and learns to ignore the noise. Fig. 3 shows the training sample automatically generated by the method, and it can be seen that the difference between the training sample and the real scene is not large, so that the application effect of the model trained by the method in the real scene can be ensured. By using the method, a large number of fake nails which are equivalent to those with fine labels can be easily generated, so that a large enough data set is provided for training the target detection model.
And step 220, sampling the forged nail plate data set to obtain a forged nail plate sample.
Further, in an embodiment of the present invention, the background noise of the original nail image is removed based on image binarization and image painting.
Specifically, firstly, the nail image is subjected to binarization processing, namely each pixel is changed into pure black or pure white according to a set threshold value, so that strokes of the oracle characters can be highlighted, the light and shade problems caused by scanning are removed, and meanwhile, the next step of processing is facilitated. After the binarization processing, the background except the nail plate needs to be blackened together, that is, the edge information of the nail plate needs to be removed, so as to reduce the influence caused by unnecessary boundaries and contours. Therefore, in this embodiment, the Floodfill method is used to blacken the outer ring background, so as to obtain a picture with black background and white characters. Thus, a large amount of unnecessary noise generated by the nail contour, scanning and the like is removed, and the performance of the target detection model can be greatly improved. Fig. 4 shows the nail image before and after the nail image preprocessing is performed by the method, it can be seen that after the data preprocessing, the background noise of the nail image is removed, meanwhile, the overall image contrast is improved, and the processed image can be directly processed by using the target detection model.
Further, the method of the Region-CNN (R-CNN) series has good effect on a plurality of target detection tasks, so the invention also selects the R-CNN as a basic method for target detection of the nail image. In an embodiment of the present invention, step 120 specifically includes:
and step 510, selecting candidate areas of the nail image to obtain a candidate area set.
It should be noted that the candidate regions generated by the candidate region selection algorithm are different in size, and the shapes and sizes of the candidate regions are ignored for compatibility with the convolutional neural network, and are scaled to a uniform size for subsequent processing.
And 520, extracting the features of each candidate region based on the convolutional neural network to obtain corresponding feature vector representation.
Step 530, inputting the feature vector representation to a classifier to obtain a corresponding category and confidence.
And 540, sequentially calculating the overlapping degree between every two candidate areas.
And step 550, if the overlapping degree is greater than a preset threshold, deleting the candidate region corresponding to the feature vector representation with low confidence from the candidate region set to obtain a candidate region subset.
It should be noted that, as described in steps 530, 540, and 550, the present embodiment adopts a non-maximum inhibition method to select the final oracle character selection box. Specifically, for two different nail image candidate regions, IoU indices of the two are calculated. Wherein IoU of two different candidate regions D1, D2 is defined as:
Figure BDA0003113643690000091
at the same time, the target detection model learns a threshold over which the regions with lower confidence are rejected if IoU for two different candidate regions exceed, i.e., is a non-maximum suppression method. By the method, a large number of candidate areas with high overlapping rates can be screened out by the target detection model, and then the best selection frame containing the single oracle characters is found.
And step 560, adjusting the frame of the candidate area in the candidate area subset to obtain the corrected oracle area.
And step 570, taking the oracle region and the corresponding category as a target detection result.
It should be noted that Libra R-CNN, as one of the latest achievements of R-CNN series methods, can achieve the best effect on multiple tasks of target detection, and the balance learning scheme proposed by the invention has better adaptability to a task with higher requirements on frame selection positions, such as a nail automatic labeling analysis task, so the invention further selects the Libra R-CNN method as a target detection model in the nail automatic labeling analysis method.
Further, in an embodiment of the present invention, the method based on Libra R-CNN collects the counterfeit nail sample as follows:
and 610, dividing the sampling interval of the forged A-plate data set to obtain a plurality of sampling subintervals.
And step 620, selecting the corresponding to-be-selected positive sample or to-be-selected negative sample from the sampling subinterval as the forged nail sample.
It should be noted that in order to solve the problem of unbalanced sampling in the R-CNN method, Libra R-CNN proposes loU balanced sampling. Specifically, sampling imbalance means that when a fake nail sample is collected, fewer samples which are larger in appearance and difficult to represent for a target detection model are submerged in a large number of simple samples, so that gradient updating caused by the difficult samples is more difficult to guide the model. Therefore, in the embodiment, a Libra R-CNN method is adopted, a first-order image sampling is performed through an OHME algorithm, a sampling interval is divided into K, so that samples to be selected are placed in K buckets, all n negative cases to be selected (Libra R-CNN mainly concerns negative cases, but the method can be also used for positive cases) can be uniformly distributed in the buckets, and then uniform sampling is performed in each bucket, so that sampling is more balanced as much as possible.
Further, in an embodiment of the present invention, the image features are extracted by using the Libra R-CNN-based method as follows:
and 710, extracting the features of each candidate region based on the convolutional neural network to obtain original level features corresponding to different neural network layers.
And 720, fusing the original level features to obtain fused semantic features.
And step 730, processing the original level features based on the fused semantic features to obtain corresponding enhanced semantic features.
And 740, representing the enhanced semantic features of the output layer of the convolutional neural network as feature vectors corresponding to the candidate regions.
It should be noted that, in order to solve the problem of feature imbalance in the R-CNN method, Libra R-CNN proposes a method of fusing balanced semantic features. Specifically, feature imbalance refers to deep networks where higher layers have more semantic information and shallow layers have more detailed information. The features of the high and shallow layers may complement each other to improve the effect of object detection, and how they are used to integrate pyramid characterization determines the performance of the detector. Studies have shown that the integrated features should be able to handle imbalance information in each resolution. The prior art sequential integration approaches all focus on features at adjacent resolutions and do not focus on features at other layers. Therefore, in the information flow, the semantic information of the non-adjacent layer is diluted once every time the semantic information is integrated. Therefore, this embodiment uses the Libra R-CNN method, using a new SSD-based efficient pyramid structure that integrates these oracle image features in a highly nonlinear but efficient manner, fusing balanced semantic features to enhance the original features, each resolution in the feature pyramid can obtain the same information from the other resolutions, thereby balancing the information flow and making the features more discriminative.
Further, in an embodiment of the present invention, the target detection model is trained by using the following loss function based on the Libra R-CNN method:
Figure BDA0003113643690000111
wherein x is the sample loss, α, γ, b and C are parameters, α, γ and b satisfy the following constraints:
αln(b+1)=γ。
it should be noted that, in order to solve the target imbalance problem existing in the R-CNN method, Libra R-CNN introduces a balance L1 loss function. Target imbalance refers to two targets in target detection network training-if localization and classification are not well balanced, compromise of one target can compromise the high performance of the other target, thereby degrading the overall performance of the model. The same is true for the samples involved in the training process, since the goal of regression is not bounded, directly increasing the weight of the regression loss will make the model more sensitive to peripheral samples (sample loss greater than 1.0). The peripheral samples can be regarded as difficult samples, the difficult samples can generate large gradients, the training is not facilitated, and the inner peripheral samples (the sample loss is less than 1.0) can be simple samples. If not well balanced, the small gradients produced by a simple sample may be overwhelmed by the large gradients produced by a mishandled sample, limiting further refinement, thus requiring re-balancing of the involved tasks and samples to achieve better convergence. Therefore, in the embodiment, the Libra R-CNN method is adopted to introduce the balance L1 loss function, so that the balance between the task of positioning and classifying the single oracle characters, the peripheral forged nail sample and the inner forged nail sample can be realized, and the training effect of the target detection model can be improved.
In addition, in the aspect of experiments, the invention adopts a Libra R-CNN target detection method, wherein the identification module selects ResNet 50, and meanwhile, the method of forging nail chips is utilized to generate the nail data and is divided into a training set and a verification set. The target detection model is trained on the training set, so that a good identification effect is obtained, and the mAP index on the verification set reaches 0.995. FIG. 8 is a schematic diagram of the detection effect of oracle-bone inscription, in which (a) and (c) are original images of the nail, and (b) and (d) are images after automatic labeling and analysis, so that the target detection model trained by using the method can obtain a good detection effect in a real scene in cooperation with an image preprocessing method,
the above experiments show that the automatic nail annotation analysis method provided by the invention has good detection and identification capabilities of oracle characters, and can be used as an auxiliary tool in the annotation work of newly unearthed nails to help researchers to label more efficiently; meanwhile, the corresponding modern Chinese character sequence can be generated by utilizing the automatic labeling result, so that the conversion from the picture to the character sequence is realized, and the oracle identification system has the potential.
The automatic nail annotation analyzing device provided by the invention is described below, and the automatic nail annotation analyzing device described below and the automatic nail annotation analyzing method described above can be referred to in a corresponding manner.
Fig. 9 is a schematic structural diagram of an automatic nail annotation analyzing device according to an embodiment of the present invention, as shown in fig. 9, the device includes:
the preprocessing unit 910 is configured to obtain an original nail image and remove background noise of the original nail image to obtain a preprocessed nail image.
And the target detection unit 920 is configured to input the nail image to the target detection model to obtain a target detection result output by the target detection model.
The target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on the training of a forged oracle sample.
According to the automatic nail annotation analysis device provided by the invention, the interference of background noise on the detection of the oracle target is reduced by introducing the preprocessing of the nail image, and the forged nail is used for training the target detection model, so that the application effect of the target detection model in a real scene is ensured, and the accurate identification of the oracle in a complex nail is realized.
Further, in an embodiment of the present invention, the automatic nail annotation analyzing apparatus further includes a data sample generating unit, configured to:
based on a preset single-character oracle data set and an arrangement mode of the oracle on the nail, randomly placing the single-character oracle in the single-character oracle data set in a simulated arrangement mode, and adding random noise to generate a forged nail data set.
And sampling the forged nail plate data set to obtain a forged nail plate sample.
Further, in an embodiment of the present invention, the preprocessing unit 910 is further configured to:
and removing the background noise of the original nail image based on image binarization and image painting.
Further, in an embodiment of the present invention, the target detecting unit 920 is further configured to:
and selecting candidate regions of the first image to obtain a candidate region set.
And extracting the features of each candidate region based on the convolutional neural network to obtain corresponding feature vector representation.
And inputting the feature vector representation into a classifier to obtain a corresponding category and confidence.
And sequentially calculating the overlapping degree between every two candidate regions.
And if the overlapping degree is greater than a preset threshold value, deleting the candidate region corresponding to the characteristic vector representation with low confidence coefficient from the candidate region set to obtain a candidate region subset.
And adjusting the frame of the candidate area in the candidate area subset to obtain the corrected oracle area.
And taking the oracle region and the corresponding category as a target detection result.
Further, in an embodiment of the present invention, the data sample generating unit is further configured to:
and dividing the sampling interval of the forged A-plate data set to obtain a plurality of sampling subintervals.
And selecting the corresponding positive sample to be selected or the negative sample to be selected from the sampling subinterval as the forged nail sample.
Further, in an embodiment of the present invention, the target detecting unit 920 is further configured to:
and extracting the characteristics of each candidate region based on the convolutional neural network to obtain the original level characteristics corresponding to different neural network layers.
And fusing the original level features to obtain fused semantic features.
And processing the original level features based on the fused semantic features to obtain corresponding enhanced semantic features.
And taking the enhanced semantic features of the output layer of the convolutional neural network as feature vectors corresponding to the candidate regions for representation.
Further, in an embodiment of the present invention, the automatic nail annotation analyzing apparatus further includes a model training unit, configured to:
training the target detection model using the following loss function:
Figure BDA0003113643690000141
wherein x is the sample loss, α, γ, b and C are parameters, α, γ and b satisfy the following constraints:
αln(b+1)=γ。
fig. 10 illustrates a physical structure diagram of an electronic device, and as shown in fig. 10, the electronic device may include: a processor (processor)1010, a communication Interface (Communications Interface)1020, a memory (memory)1030, and a communication bus 1040, wherein the processor 1010, the communication Interface 1020, and the memory 1030 communicate with each other via the communication bus 1040. Processor 1010 may invoke logic instructions in memory 1030 to perform a method of automatic annotation resolution for a nail, the method comprising: obtaining an original A picture and removing background noise of the original A picture to obtain a preprocessed A picture; inputting the first image to a target detection model to obtain a target detection result output by the target detection model; the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
Furthermore, the logic instructions in the memory 1030 can be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer being capable of executing the method for automatic nail annotation parsing provided in the foregoing embodiments, the method including: obtaining an original A picture and removing background noise of the original A picture to obtain a preprocessed A picture; inputting the first image to a target detection model to obtain a target detection result output by the target detection model; the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
In yet another aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the method for automatic nail annotation parsing provided in the foregoing embodiments, the method including: obtaining an original A picture and removing background noise of the original A picture to obtain a preprocessed A picture; inputting the first image to a target detection model to obtain a target detection result output by the target detection model; the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An automatic nail plate labeling and analyzing method is characterized by comprising the following steps:
obtaining an original A picture and removing background noise of the original A picture to obtain a preprocessed A picture;
inputting the first image to a target detection model to obtain a target detection result output by the target detection model;
the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
2. The method for automatically labeling and analyzing nail plates according to claim 1, wherein the step of generating the forged nail plate sample comprises the following steps:
simulating the arrangement mode of the individual oracle characters in the individual oracle character data set to randomly place the individual oracle characters based on a preset individual oracle character data set and the arrangement mode of the oracle characters on the oracle, and adding random noise to generate a forged oracle data set;
and sampling the forged nail plate data set to obtain a forged nail plate sample.
3. The method for automatic nail annotation analysis according to claim 1, wherein the removing the background noise of the original nail image comprises:
and removing the background noise of the original nail image based on image binarization and image painting.
4. The method for automatically labeling and analyzing the nail plate according to claim 1, wherein the step of inputting the nail plate image into a target detection model to obtain a target detection result output by the target detection model comprises the steps of:
selecting a candidate region from the first image to obtain a candidate region set;
extracting the features of each candidate region based on a convolutional neural network to obtain corresponding feature vector representation;
inputting the feature vector representation into a classifier to obtain a corresponding category and a confidence level;
sequentially calculating the overlapping degree between every two candidate regions;
if the overlapping degree is larger than a preset threshold value, deleting the candidate region corresponding to the characteristic vector representation with low confidence coefficient from the candidate region set to obtain a candidate region subset;
adjusting the frame of the candidate area in the candidate area subset to obtain a corrected oracle area;
and taking the oracle region and the corresponding category as a target detection result.
5. The method for automatically labeling and analyzing the nail plate according to claim 2, wherein the step of sampling the forged nail plate data set to obtain a forged nail plate sample comprises the following steps:
dividing the sampling interval of the forged A-plate data set to obtain a plurality of sampling subintervals;
and selecting the corresponding to-be-selected positive sample or to-be-selected negative sample from the sampling subinterval as a forged nail sample.
6. The method for automatically labeling and analyzing the nail plate according to claim 4, wherein the extracting the features of each candidate region based on the convolutional neural network to obtain the corresponding feature vector representation comprises:
extracting features of each candidate region based on the convolutional neural network to obtain original level features corresponding to different neural network layers;
fusing the original level features to obtain fused semantic features;
processing the original level features based on the fused semantic features to obtain corresponding enhanced semantic features;
and taking the enhanced semantic features of the output layer of the convolutional neural network as feature vectors corresponding to the candidate regions for representation.
7. The method for automatically labeling and analyzing the nail according to claim 1, wherein the target detection model is trained by using the following loss function:
Figure FDA0003113643680000021
wherein x is the sample loss, α, γ, b and C are parameters, α, γ and b satisfy the following constraints:
αln(b+1)=γ。
8. the utility model provides an automatic mark analytical equipment of first piece which characterized in that includes:
the device comprises a preprocessing unit, a background noise generation unit and a background noise generation unit, wherein the preprocessing unit is used for acquiring an original A picture and removing the background noise of the original A picture to obtain a preprocessed A picture;
the target detection unit is used for inputting the first image to a target detection model to obtain a target detection result output by the target detection model;
the target detection result comprises an oracle area and a corresponding category, and the target detection model is obtained based on forged oracle samples.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for automatic nail annotation resolution according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the method for automatic annotation resolution of a nail plate according to any one of claims 1 to 7.
CN202110655958.4A 2021-06-11 2021-06-11 Automatic nail labeling analysis method and device, electronic equipment and storage medium Active CN113505784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110655958.4A CN113505784B (en) 2021-06-11 2021-06-11 Automatic nail labeling analysis method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110655958.4A CN113505784B (en) 2021-06-11 2021-06-11 Automatic nail labeling analysis method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113505784A true CN113505784A (en) 2021-10-15
CN113505784B CN113505784B (en) 2024-07-12

Family

ID=78010223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110655958.4A Active CN113505784B (en) 2021-06-11 2021-06-11 Automatic nail labeling analysis method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113505784B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897716A (en) * 2022-04-22 2022-08-12 上海大学 Oracle-bone inscription rubbing data enhancement method for target detection

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085726A (en) * 2017-01-04 2017-08-22 安阳师范学院 Oracle bone rubbing individual character localization method based on multi-method denoising and connected component analysis
CN109886307A (en) * 2019-01-24 2019-06-14 西安交通大学 A kind of image detecting method and system based on convolutional neural networks
WO2019232853A1 (en) * 2018-06-04 2019-12-12 平安科技(深圳)有限公司 Chinese model training method, chinese image recognition method, device, apparatus and medium
CN110610006A (en) * 2019-09-18 2019-12-24 中国科学技术大学 Morphological double-channel Chinese word embedding method based on strokes and glyphs
CN111915540A (en) * 2020-06-17 2020-11-10 华南理工大学 Method, system, computer device and medium for augmenting oracle character image
CN112419349A (en) * 2020-11-19 2021-02-26 安阳师范学院 Artificial intelligent object fragment image splicing method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085726A (en) * 2017-01-04 2017-08-22 安阳师范学院 Oracle bone rubbing individual character localization method based on multi-method denoising and connected component analysis
WO2019232853A1 (en) * 2018-06-04 2019-12-12 平安科技(深圳)有限公司 Chinese model training method, chinese image recognition method, device, apparatus and medium
CN109886307A (en) * 2019-01-24 2019-06-14 西安交通大学 A kind of image detecting method and system based on convolutional neural networks
CN110610006A (en) * 2019-09-18 2019-12-24 中国科学技术大学 Morphological double-channel Chinese word embedding method based on strokes and glyphs
CN111915540A (en) * 2020-06-17 2020-11-10 华南理工大学 Method, system, computer device and medium for augmenting oracle character image
CN112419349A (en) * 2020-11-19 2021-02-26 安阳师范学院 Artificial intelligent object fragment image splicing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897716A (en) * 2022-04-22 2022-08-12 上海大学 Oracle-bone inscription rubbing data enhancement method for target detection
CN114897716B (en) * 2022-04-22 2024-08-06 上海大学 Object detection-oriented oracle bone rubbing data enhancement method

Also Published As

Publication number Publication date
CN113505784B (en) 2024-07-12

Similar Documents

Publication Publication Date Title
CN111401372B (en) Method for extracting and identifying image-text information of scanned document
CN111915704A (en) Apple hierarchical identification method based on deep learning
CN108090511B (en) Image classification method and device, electronic equipment and readable storage medium
CN106610969A (en) Multimodal information-based video content auditing system and method
CN110599463B (en) Tongue image detection and positioning algorithm based on lightweight cascade neural network
CN113435407B (en) Small target identification method and device for power transmission system
CN112365497A (en) High-speed target detection method and system based on Trident Net and Cascade-RCNN structures
CN111126393A (en) Vehicle appearance refitting judgment method and device, computer equipment and storage medium
CN111461101A (en) Method, device and equipment for identifying work clothes mark and storage medium
CN114581646A (en) Text recognition method and device, electronic equipment and storage medium
CN111274964A (en) Detection method for analyzing water surface pollutants based on visual saliency of unmanned aerial vehicle
CN115239672A (en) Defect detection method and device, equipment and storage medium
CN108877030B (en) Image processing method, device, terminal and computer readable storage medium
CN111507119B (en) Identification code recognition method, identification code recognition device, electronic equipment and computer readable storage medium
CN115131590A (en) Training method of target detection model, target detection method and related equipment
CN107729863B (en) Human finger vein recognition method
CN113505784A (en) Automatic nail annotation analysis method and device, electronic equipment and storage medium
CN109741351A (en) A kind of classification responsive type edge detection method based on deep learning
CN113192022A (en) Pathogenic spore identification and counting method and device based on deep learning
CN113052234A (en) Jade classification method based on image features and deep learning technology
CN109460768B (en) Text detection and removal method for histopathology microscopic image
Rani et al. Object Detection in Natural Scene Images Using Thresholding Techniques
CN110889418A (en) Gas contour identification method
CN117437691A (en) Real-time multi-person abnormal behavior identification method and system based on lightweight network
CN116485992A (en) Composite three-dimensional scanning method and device and three-dimensional scanner

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
GR01 Patent grant
GR01 Patent grant