CN109272001A - Construction training method, device and the computer equipment of urine examination recognition classifier - Google Patents

Construction training method, device and the computer equipment of urine examination recognition classifier Download PDF

Info

Publication number
CN109272001A
CN109272001A CN201811141847.6A CN201811141847A CN109272001A CN 109272001 A CN109272001 A CN 109272001A CN 201811141847 A CN201811141847 A CN 201811141847A CN 109272001 A CN109272001 A CN 109272001A
Authority
CN
China
Prior art keywords
urine
test paper
urine examination
recognition classifier
component
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
CN201811141847.6A
Other languages
Chinese (zh)
Other versions
CN109272001B (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.)
Shenzhen Feidian Health Management Co ltd
Original Assignee
Shenzhen Flying Point Health Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Flying Point Health Management Co Ltd filed Critical Shenzhen Flying Point Health Management Co Ltd
Priority to CN201811141847.6A priority Critical patent/CN109272001B/en
Publication of CN109272001A publication Critical patent/CN109272001A/en
Application granted granted Critical
Publication of CN109272001B publication Critical patent/CN109272001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Investigating Or Analysing Biological Materials (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses construction training method, device and the computer equipments of a kind of urine examination recognition classifier, this method comprises: obtaining the area-of-interest of images to be recognized in each urine test paper;Extract the feature vector of the area-of-interest;It is a sample by the described eigenvector of each urine test paper and the corresponding classification storage of the urine test paper;According to the sample architecture urine examination recognition classifier of the first predetermined quantity;The urine examination recognition classifier is trained by the sample of the second predetermined quantity, and the attribute node in the urine examination recognition classifier is adjusted according to training result, training process is repeated until the classification accuracy of the urine examination recognition classifier reaches preset threshold.The present invention establishes urine test paper classifier by deep learning thought, and is trained to the classifier to obtain urine test paper with the mapping relations between classification, improves accuracy of identification.

Description

Construction training method, device and the computer equipment of urine examination recognition classifier
Technical field
The present invention relates to depth learning technology fields, in particular to a kind of construction training of urine examination recognition classifier Method, apparatus and computer equipment.
Background technique
With flourishing for the technologies such as mobile Internet, computer vision and image procossing, the computing capability of computer It is increasingly stronger, urine examination is carried out by computer technology and is received more and more attention, urine examination is carried out not only by computer technology Precision is high, and it is more automatic, faster, more convenient, cost is lower.
In the detection of traditional routine urinalysis, tester goes to hospital to carry out urine detection, and testing result is by doctor by profession The comparison of instrument obtains, and the operation of instrument, maintenance, calibration complexity, with high costs, to light source stability, environment temperature and humidity All have higher requirements.Tester goes hospital's progress testing process cumbersome, time-consuming and laborious.
And it carries out the positioning of test paper color lump in mobile urine examination field existing and test paper has mainly been placed on positioning identifier Card slot in, the station location marker fixed above card slot positions test paper color lump, and this positioning method needs to put test paper fixation It sets, more demanding to user's operation, especially for older user, operation is comparatively laborious, in addition to this, the use of card slot Also increase use cost.
Summary of the invention
In view of the above problems, the construction training side for being designed to provide a kind of urine examination recognition classifier of the embodiment of the present invention Method, device and computer equipment, so as to solve the deficiencies in the prior art.
According to embodiment of the present invention, a kind of construction training method of urine examination recognition classifier is provided, comprising:
Obtain the area-of-interest of images to be recognized in each urine test paper;
Extract the feature vector of the area-of-interest;
It is a sample by the described eigenvector of each urine test paper and the corresponding classification storage of the urine test paper;
According to the sample architecture urine examination recognition classifier of the first predetermined quantity;
The urine examination recognition classifier is trained by the sample of the second predetermined quantity, and is adjusted according to training result Attribute node in the urine examination recognition classifier repeats training process up to the classification of the urine examination recognition classifier Accuracy rate reaches preset threshold.
In the construction training method of above-mentioned urine examination recognition classifier, the urine examination recognition classifier is random forest point Class device.
It is described " according to the sample structure of the first predetermined quantity in the construction training method of above-mentioned urine examination recognition classifier Make urine examination recognition classifier " include:
According to more decision tree classifiers of sample architecture of first predetermined quantity, and certainly by trained described more Plan tree group is combined into a random forest grader.
In the construction training method of above-mentioned urine examination recognition classifier, the construction process packet of every decision tree classifier It includes:
According to the sample of the first predetermined quantity, the information gain of each component in described eigenvector is calculated;
The maximum component of information gain is chosen as root attribute node, and will according to the test result of described attribute node The sample of first predetermined quantity is divided into different subsets;
In the sample of each subset, calculates remaining the important information in addition to the corresponding component of root attribute node and increase Benefit recurrence dividing subset and generates sub- attribute node using the maximum component of information gain as the sub- attribute node of the subset Process is until all samples are directed to same classification in the subset divided.
In the construction training method of above-mentioned urine examination recognition classifier, the urine test paper includes two locating pieces and makes a reservation for The reaction block of quantity, two locating piece are located at the both ends of the urine test paper, the reaction block difference of the predetermined quantity It is equally distributed between two locating piece according to default distribution spacing;
" area-of-interest for obtaining images to be recognized in each urine test paper " includes:
Extract the profile of the locating piece and the reaction block in each urine test paper in images to be recognized;
The profile of the locating piece is identified from each profile;
On the basis of the profile of the locating piece, the presumptive area for obtaining each reaction block between two locating pieces is emerging as sense Interesting region.
In the construction training method of above-mentioned urine examination recognition classifier, described " it is described fixed to identify from each profile Position block profile " include:
Identify the color value of each profile, the length-width ratio of profile;
The feature of the test paper according to the pre-stored data describes predetermined color value, predetermined length and width that locating piece is obtained in file Than;
Each color value identified is compared with the predetermined color value respectively and by each length and width identified Than being compared respectively with the predetermined length-width ratio;
By the color value and the predetermined color value be identical and the length-width ratio and the predetermined length-width ratio phase of the profile Same outline identification is the profile of the locating piece.
In the construction training method of above-mentioned urine examination recognition classifier, described " on the basis of the profile of the locating piece, The presumptive area of each reaction block between two locating pieces is obtained as area-of-interest " include:
Two central point apart from nearest side between the profile of two locating pieces is calculated, and is calculated between two central points Distance;
The reaction block region of predetermined quantity is obtained according to the size of the default distribution spacing and reaction block;
In each reaction block region, centered on the particle in the reaction block region, predeterminable area is extracted as region of interest Domain.
It is described " to extract the feature of the area-of-interest in the construction training method of above-mentioned urine examination recognition classifier Vector " includes:
The color gamut space of the image of the area-of-interest is converted into HSV color gamut matrix and LAB color gamut matrix;
The HSV color gamut matrix and the LAB color gamut matrix are subjected to channel fractionation, obtain H component, S component, V component, L * component, A component and B component, and H component, S component, V component, L * component, A component and B component are formed into a feature vector.
According to another implementation of the invention, a kind of construction training device of urine examination recognition classifier is provided, comprising:
Module is obtained, for obtaining the area-of-interest of images to be recognized in each urine test paper;
Extraction module, for extracting the feature vector of the area-of-interest;
Memory module, for being by the described eigenvector of each urine test paper and the corresponding classification storage of the urine test paper One sample;
Constructing module, for the sample architecture urine examination recognition classifier according to the first predetermined quantity;
Training module, is trained the urine examination recognition classifier for the sample by the second predetermined quantity and root The attribute node in the urine examination recognition classifier is adjusted according to training result, repeats training process until the urine examination is known The classification accuracy of other classifier reaches preset threshold.
Another embodiment according to the present invention, provides a kind of computer equipment, and the computer equipment includes storage Device and processor, the memory run the computer program so that institute for storing computer program, the processor State the construction training method that computer equipment executes above-mentioned urine examination recognition classifier.
Yet another embodiment according to the present invention provides a kind of computer readable storage medium, is stored with above-mentioned The computer program used in computer equipment.
The technical scheme provided by this disclosed embodiment may include it is following the utility model has the advantages that
A kind of construction training method, device and the computer equipment of urine examination recognition classifier in the present invention, by machine learning It is applied to urine examination field, by the thought of deep learning, establishes urine examination recognition classifier, and carry out to the urine examination recognition classifier Training improves accuracy of identification, promotion to obtain urine test paper area-of-interest feature vector with the mapping relations between classification With recognition efficiency, effectively save time cost early finds the problem for patient and races against time.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
In order to illustrate more clearly of technical solution of the present invention, letter will be made to attached drawing needed in the embodiment below It singly introduces, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as to the present invention The restriction of protection scope for those of ordinary skill in the art without creative efforts, can be with root Other relevant attached drawings are obtained according to these attached drawings.
A kind of Fig. 1 flow diagram of urine examination recognition classifier construction training method provided in an embodiment of the present invention.
Fig. 2 shows a kind of urine test paper structural schematic diagrams provided in an embodiment of the present invention.
A kind of Fig. 3 flow diagram of classifier building provided in an embodiment of the present invention.
Fig. 4 shows a kind of flow diagram of urine test paper recognition methods urine examination identification provided in an embodiment of the present invention.
Fig. 5 shows the process signal of another urine test paper recognition methods urine examination identification provided in an embodiment of the present invention Figure.
Fig. 6 shows a kind of structural representation of the construction training device of urine examination recognition classifier provided in an embodiment of the present invention Figure.
Component symbol explanation:
The construction training device of 600- urine examination recognition classifier;610- obtains module;620- extraction module;630- stores mould Block;640- constructing module;650- training module.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
Embodiment 1
Fig. 1 shows a kind of process of the construction training method of urine examination recognition classifier of first embodiment of the invention offer Schematic diagram.
The construction training method of the urine examination recognition classifier includes the following steps:
In step s 110, in each urine test paper in lake region images to be recognized area-of-interest.
The urine test paper can be divided into according to the difference of inspection item urine 11 test paper, urine 14 test paper, early pregnancy test paper and Ovulation test paper etc..
Further, the urine test paper includes the reaction block of two locating pieces and predetermined quantity, and two locating pieces distinguish position In the both ends of the urine test paper, the reaction block of the predetermined quantity is equally distributed on two according to preset distribution spacing respectively Between a locating piece.
It is illustrated in figure 2 a kind of structural schematic diagram of urine test paper of proposition of the embodiment of the present invention, defines lateral direction For width direction.The urine test paper is 14 test paper of urine, and 14 test paper both ends of the urine are provided with two locating piece A, two locating pieces it Between be equally spaced according to pre-determined distance a and have 15 reaction block B, the width of each reaction block is 2a, and each reaction block B indicates to examine Look into different projects.
The material composition of the reaction block of the urine test paper of each urine examination project is all different, in urine and different urine examination projects The material of reaction block of urine test paper when being reacted, show different color values.Or in different urine examination projects When urine test paper shows identical color value, but since the material of its project and reaction block that check constitutes difference, so Identical color value also represents different testing results.
When not detecting, i.e., when not immersing urine, the color of 15 reaction blocks shown in Fig. 2 can be colourless or show Color same as blank made of bottom, at this point, reaction block is not reacted with the ingredient in urine also;It is tried by the urine examination After paper is sufficiently submerged in urine, after reaction block B is reacted with urine, the colors of 15 reaction blocks can be presented with the difference of inspection item Identical/similar color of entirely different color or part out.
Wherein, for the ease of the identification of subsequent locating piece and the determination in urine test paper direction, described two locating piece A may be used also To be set as different in width in transverse direction in Fig. 2, described two locating piece A may be arranged as the face different from reaction block Color.The color of two locating piece A may be the same or different.
Further, described " area-of-interest for obtaining images to be recognized " includes:
Extract all profiles in the images to be recognized, wherein all profiles include the profile of the locating piece With the profile of the reaction block.
In the present embodiment, images to be recognized can be split first, the institute in the image is extracted in the image of segmentation There is profile, it is notable that may include locating piece profile, reaction block profile and other noises in all profiles extracted The profile of image.
It in some other embodiments, can also be based on findContours function lookup figure to be identified in OpenCV platform All profiles as in.
The corresponding profile of the locating piece is identified in all profiles.
Further, " the corresponding profile of the locating piece is identified in all profiles " to specifically include:
Identify the contoured length-width ratio of the contoured color value of institute and institute.
Specifically, in all profiles, the corresponding color value of each profile and the length and width of the profile are identified respectively, And length-width ratio is calculated according to length and width.
In the present embodiment, the color value is represented by BGR value, can be used in OpenCV platform being handled.One In a little others embodiments, the color value is also denoted as rgb value.
The feature of the test paper according to the pre-stored data describes predetermined color value, predetermined length and width that locating piece is obtained in file Than.
Specifically, each urine test paper all has a feature and describes file, and this feature describes to include: the urine examination in file The length-width ratio of the color of test paper locating piece, every a positioning block, the number of reaction block, the often distribution between adjacent nearest two reaction block Spacing, the width ratio of reaction block and distribution spacing, the contents such as type (such as Glu, Cre) of reaction block.For different types of The number of urine test paper, reaction block is different, and the project of reaction block detection is not also identical.
All color values identified are compared with the predetermined color value respectively and by all length and width identified Than being compared respectively with the predetermined length-width ratio;
By the color value and the predetermined color value be identical and length-width ratio and the identical profile of the predetermined length-width ratio are known It Wei not the corresponding profile of the locating piece.
The color value of each profile and predetermined color value are compared, and length-width ratio and predetermined length-width ratio are carried out pair Than if the color value of a profile and predetermined color value is identical and length-width ratio and identical as predetermined length-width ratio, by the outline identification For the corresponding profile of locating piece.
Because of situations such as in image there may be noise pollution, search less than and color value it is identical as predetermined color value And/or when identical with the predetermined length-width ratio profile of length-width ratio, a color threshold and a length-width ratio threshold can be set based on practical experience Value, there are three situations can be identified as profile S positioning corresponding profile:
The first situation: the color value of profile S and predetermined color value Bu Tong but profile S color value and predetermined color value Between difference be less than or equal to the color threshold, and the different still length of profile S of the length-width ratio of profile S and predetermined length-width ratio It is wide to be less than or equal to the length-width ratio threshold value than the difference between predetermined length-width ratio;
Second situation: the color value of profile S and predetermined color value Bu Tong but profile S color value and predetermined color value Between difference be less than or equal to the color threshold, and the length-width ratio of profile S is identical with predetermined length-width ratio;
The third situation: the color value and predetermined color value of profile S is identical, and the length-width ratio of profile S and predetermined length-width ratio Different but between the length-width ratio and predetermined length-width ratio of profile S difference is less than or equal to the length-width ratio threshold value.
Such as Fig. 2, due to there are two locating pieces, and length-width ratio is different, so, the color value of each profile can be determined with first The predetermined color value of position block compares and compares length-width ratio and the predetermined length-width ratio of first locating piece, and then basis Comparing result identifies the corresponding profile of the first locating piece;Again by the predetermined face of the color value of each profile and the second locating piece Color value compares and compares length-width ratio and the predetermined length-width ratio of second locating piece, and then is identified according to comparing result The corresponding profile of second locating piece out.
On the basis of the corresponding profile of the locating piece, the presumptive area conduct of all reaction blocks between two locating pieces is obtained Area-of-interest.
Further, shown " on the basis of the corresponding profile of the locating piece, to obtain all reaction blocks between two locating pieces Presumptive area as area-of-interest " include:
Calculate two central point apart from nearest side between the corresponding profile of two locating pieces, and calculate two central points it Between distance;The reaction block region of predetermined quantity is obtained according to the size of the default distribution spacing and reaction block;Each anti- Block region is answered, centered on the particle in the reaction block region, extracts predeterminable area as area-of-interest.
After identifying the corresponding profile of two locating pieces, distance is nearest between the corresponding profile of two locating pieces two are identified A side, the side for being illustrated in figure 2 the close reaction block B of the locating piece on the urine test paper left side and the positioning on the right of urine test paper The side of the close reaction block B of block, two apart from the distance between nearest central point of side be 46a.
After identifying two nearest sides of two locating pieces distance, the central point of two sides is calculated separately relative to described The coordinate of images to be recognized, and the distance between two central points are calculated according to the center point coordinate of two sides.Wherein, the seat Mark can be pixel coordinate, can also be Euclidean distance coordinate.
As shown in Fig. 2, it is 2a's that one step-length a of every movement, which can obtain a width, using preset distribution spacing a as step-length Reaction block extracts the region of all reaction blocks.In the region of each reaction block, calculate the reaction block particle (can also centered on Point), centered on the particle, extract predeterminable area as area-of-interest,
The predeterminable area can be border circular areas, can also be the uniform graphics fields such as square region, Delta Region.
As shown in Fig. 2, centered on particle, being extracted using 10 pixels as the border circular areas of radius in each reaction block region As area-of-interest.
In the step s 120, the feature vector of area-of-interest is extracted.
Further, described " feature vector for extracting area-of-interest " includes:
The color gamut space of the image of the area-of-interest is converted into HSV color gamut matrix and LAB color gamut matrix;It will be described HSV color gamut matrix and the LAB color gamut matrix carry out channel fractionation, obtain H component, S component, V component, L * component, A component and B Component, and the H component, S component, V component, L * component, A component and B component are formed into a feature vector.
It in step s 130, is one by the feature vector of each urine test paper and the corresponding classification storage of the urine test paper Sample.
In step S140, according to the sample architecture urine examination recognition classifier of the first predetermined quantity.
In the present embodiment, the urine examination recognition classifier can be random forest grader.The training of random forest grader Efficiency is relatively high, and feature selecting is easy, the certain sensibility of data is high, as a result presets accuracy rate height, and the generalization ability of algorithm is strong.? In some other embodiments, the urine examination recognition classifier can also be support vector machines, Adaboost classifier etc..
Further, described " according to the sample architecture urine examination recognition classifier of the first predetermined quantity " includes:
According to more decision tree classifiers of sample architecture of first predetermined quantity, and certainly by trained described more Plan tree group is combined into a random forest grader.
Further, as shown in figure 3, construction decision tree classifier includes:
In step S210, according to the sample of the first predetermined quantity, the information gain of each component in feature vector is calculated.
The corresponding feature vector of area-of-interest and the urine test paper pair in each sample including the urine test paper The classification answered, classification can be indicated by corresponding tag along sort, such as 1 class, 2 classes.
The information gain following manner that can reach the same goal is calculated:
Gain (A)=I (s1,s2,…sm)-E(A)
Wherein, s is the number of the sample of the first predetermined quantity, shares m classification, this m respectively corresponds Ci, piFor Any sample belongs to classification CiProbability, pi=si(1,2 ... m), and there is a certain component v difference to take in feature vector by/s, i ∈ Value, is divided into v subset, s for the sample of the first predetermined quantity using the componentijFor subset sjIn belong to classification CiSample set It closes, pijFor subset sjIn any sample belong to classification CiProbability.
In step S220, the maximum component of information gain is chosen as root attribute node, and according to root attribute node The sample of first predetermined quantity is divided into different subsets by test result.
Important information gain is compared, selects the corresponding component of maximum information gain as root attribute section The sample of first predetermined quantity can be divided into not under the root attribute node according to the test result of the root attribute node by point With subset, contain the sample of oneself corresponding test result in each subset.
In step S230, in the sample of each subset, the remaining institute in addition to the corresponding component of root attribute node is calculated Important information gain, using the maximum component of information gain as the sub- attribute node of the subset.
In the wherein sample of a subset, the residue calculated other than with the corresponding component of attribute node is important Information gain equally selects the maximum component of information gain as the sub- attribute node of the subset.In remaining each subset The sub- attribute node of the above-mentioned method construct of equal recurrence in sample.
In step S240, judge whether all samples are directed to same classification in the subset divided.
In all subsets of above-mentioned division, judge whether the corresponding all samples of the subset are directed to a kind of classification, If the corresponding sample of all subsets is directed to a kind of classification, step S250 is advanced to, if in the corresponding sample of all subsets at least There is the corresponding sample of a subset not to be directed toward a kind of classification, be back to step S230, continues the sample according at least one subset The sub- attribute node of this building.
In step s 250, all properties node and the corresponding test result of attribute node are constituted into decision tree.
In step S150, urine examination recognition classifier is trained by the sample of the second predetermined quantity, and according to instruction The attribute node for practicing result adjustment urine examination recognition classifier repeats training process until the classification of urine examination recognition classifier is quasi- True rate reaches preset threshold.
Wherein, the sample of second predetermined quantity is different samples from the sample of the first predetermined quantity.
After the more decision tree classifiers built, by the sample of pre-stored second predetermined quantity respectively to this More decision tree classifiers are trained, and the attribute in decision tree classifier is constantly adjusted according to the classification accuracy of training result Node.
Trained process is repeated, after training each time, whether is the classification accuracy of equal training of judgement result Reach preset threshold, if deconditioning when the classification accuracy of training result reaches preset threshold, at this point, the more decision trees point The training of class device finishes, and can carry out subsequent sort operation.
Further, it also can determine whether the classification accuracy of the training result of preset times reaches preset threshold, if The classification accuracy of the training result of preset times reaches preset threshold, terminates training process;If the training knot of preset times The classification accuracy of at least one training result is not up to preset threshold in fruit, continues to instruct the decision tree classifier Practice.
Further, it also can determine whether the classification accuracy of the training result of more decision tree classifiers reaches default Threshold value terminates training process if the classification accuracy of the training result of more decision tree classifiers reaches preset threshold;If more The classification accuracy of at least one training result is not up to preset threshold in the training result of decision tree classifier, continues pair Decision tree classifier is trained.
After the completion of the more decision tree classifiers are trained, trained more decision tree groups are combined into a random forest point Class device.
It is illustrated in figure 4 a kind of flow diagram of urine test paper recognition methods provided in an embodiment of the present invention.The urine examination Recognition methods carries out the classification of identification urine test paper by the urine examination recognition classifier of above-mentioned building and training.
This method comprises:
In step s310, the area-of-interest of images to be recognized in urine test paper is obtained.
In step s 320, the feature vector of area-of-interest is extracted.
In step S330, feature vector is sent into advance in trained urine examination recognition classifier, obtain this feature to Measure corresponding identification classification value.
After obtaining the feature vector of the area-of-interest, using described eigenvector as input, feeding trains in advance Urine examination recognition classifier in, by the identification classification value that an available output is floating number of classifying.
In step S340, the corresponding relationship between classification value according to the pre-stored data and feature gear determines the identification point Class is worth corresponding feature gear.
In the present embodiment, the corresponding relationship can be described by table.
Classification value Feature gear
M1 1
M2 2
…… ……
If the identification classification value obtained after classification is M1, the corresponding feature gear of classification value M1 is 1 grade;If after classification The identification classification value arrived is M2, and the corresponding feature gear of classification value M2 is 2 grades, etc..
Fig. 5 shows the flow diagram of another urine test paper recognition methods provided in an embodiment of the present invention.The urine examination Recognition methods carries out the classification of identification urine test paper by the urine examination recognition classifier of above-mentioned building and training.
This method includes the steps that as described below:
In step S410, images to be recognized is pre-processed.
Specifically, median filtering is carried out to images to be recognized, the preferred size of filtering apertures size (3,3) can be effectively eliminated Impulsive noise, but also can be very good the sharp edge of protection image.
After median filtering, to after median filtering image carry out mean filter, the preferred size of filtering apertures size (3, 3) image, is further smoothed, noise is filtered off.
Image after mean filter is subjected to white balance processing.As shown in Fig. 2, urine test paper further includes white balance block C, with The white balance block is correction reference, carries out white balance processing using gray world algorithm, it is aobvious to color to effectively eliminate light environment Existing influence.It, can be using the white space beside locating piece A as white balance block if being not provided with white balance block in urine test paper.
In the step s 420, the profile of the locating piece and reaction block in pretreated images to be recognized is extracted.
Further, all profiles can be extracted in the following manner:
Binary conversion treatment is carried out to images to be recognized, wherein binarization threshold can be 128.
Morphological scale-space is carried out to the image of binaryzation, corrosion and expansive working is executed, noise can be eliminated, divide independent Pictorial element and the adjacent pictorial element of connection.
Based on corrosion and the image after expansive working, all profiles are searched.It wherein, include locating piece profile in all profiles With reaction block profile etc..
Further, pretreated images to be recognized can also be converted to HSV color gamut space, by HSV color gamut space Channel fractionation is carried out, channel S component, channel S representation in components saturation degree are extracted.A kind of color can regard certain spectrum colour as With white mix as a result, wherein ratio shared by spectrum colour is bigger, the degree of color close to spectrum colour is just higher, color satisfy It is also just higher with spending.Saturation degree is high, and color is then deep and gorgeous.The white light ingredient of spectrum colour is 0, and saturation degree reaches highest.
All profiles of channel S component extraction based on extraction.
In step S430, the profile of locating piece is identified in each profile.
Further, described " profile of locating piece is identified in each profile " includes:
Identification contoured color value, profile length-width ratio;
The feature of the test paper according to the pre-stored data describes predetermined color value, predetermined length and width that locating piece is obtained in file Than;
All color values identified are compared with the predetermined color value respectively and by all length and width identified Than being compared respectively with the predetermined length-width ratio;
By the color value and the predetermined color value be identical and the length-width ratio and the predetermined length-width ratio phase of the profile Same outline identification is the corresponding profile of the locating piece.
In step S440, on the basis of the corresponding profile of locating piece, the predetermined of the reaction block between two locating pieces is obtained Region is as area-of-interest.
Further, described " on the basis of the corresponding profile of locating piece, to obtain the predetermined of the reaction block between two locating pieces Region is as area-of-interest " include:
Calculate two central point apart from nearest side between the corresponding profile of two locating pieces, and calculate two central points it Between distance;
The reaction block region of predetermined quantity is obtained according to the size of the default distribution spacing and reaction block;
In each reaction block region, centered on the particle in the reaction block region, predeterminable area is extracted as region of interest Domain.
Further, also it can judge whether urine test paper is positive according to the position of two locating pieces, wherein can basis Preset rule determines the direction of test paper, for example, indicates positive right with big locating piece, if urine test paper be reversely, It then needs the urine test paper carrying out overturning processing;If urine test paper be it is positive, directly carry out subsequent processing.
It can also judge whether urine test paper has rotation angle according to mass center (central point) coordinate of two locating pieces, if urine examination Test paper has rotation angle, urine test paper can be carried out rotation process according to rotation angle;If urine test paper does not rotate, continue into The subsequent processing of row.
Specifically, the rotation angle of urine test paper can be calculated using trigonometric function according to the center-of-mass coordinate of two positioning.
When carrying out turning operation or rotation process, it can be rotated or be turned over by flip () function in OpenCV platform Turn.
In step S450, the color gamut space of the image of area-of-interest is converted into HSV color gamut matrix and LAB colour gamut square Battle array.
In step S460, HSV color gamut matrix and the LAB color gamut matrix are subjected to channel fractionation, obtain H component, S point Amount, V component, L * component, A component and B component, and H component, S component, V component, L * component, A component and B component composition one is special Levy vector.
In step S470, feature vector is sent into advance in trained urine examination recognition classifier, obtain this feature to Measure corresponding identification classification value.
Specifically, when being classified by random forest grader, more decision trees point in the random forest grader Class device classifies to the feature vector of the input, and each decision tree classifier votes to classification results, poll Most classification results are the output for being used as the random forest grader.
For example, it is assumed that there is 3 stalk decision trees in random forest, the classification results of 2 stalk trees are A class, the classification of 1 stalk tree The result is that B class, then the classification results of random forest are exactly A class.
In step S480, the corresponding relationship between classification value according to the pre-stored data and feature gear determines the identification point Class is worth corresponding feature gear.
Embodiment 2
Fig. 6 shows a kind of structural representation of the construction training device of urine examination recognition classifier provided in an embodiment of the present invention Figure.
The construction training device 600 of the urine examination recognition classifier includes obtaining module 610, extraction module 620, storage mould Block 630, constructing module 640 and training module 650.
Module 610 is obtained, for obtaining the area-of-interest of images to be recognized in each urine test paper.
Extraction module 620, for extracting the feature vector of the area-of-interest.
Memory module 630, for depositing the corresponding classification of the described eigenvector of each urine test paper and the urine test paper Storage is a sample.
Constructing module 640, for the sample architecture urine examination recognition classifier according to the first predetermined quantity.
Training module 650 is trained the urine examination recognition classifier for the sample by the second predetermined quantity, and The attribute node in the urine examination recognition classifier is adjusted according to training result, repeats training process until the urine examination The classification accuracy of recognition classifier reaches preset threshold.
The embodiment of the invention also provides a kind of computer equipment, which may include smart phone, plate Computer etc..The computer equipment includes memory and processor, and memory can be used for storing computer program, and processor passes through fortune The row computer program, so that computer equipment be made to execute the construction training method or above-mentioned of above-mentioned urine examination recognition classifier The function of modules in the construction training device of urine examination recognition classifier.
Memory may include storing program area and storage data area, wherein storing program area can storage program area, at least Application program needed for one function etc.;Storage data area, which can be stored, uses created data etc. according to computer equipment. In addition, memory may include high-speed random access memory, it can also include nonvolatile memory, for example, at least a magnetic Disk storage device, flush memory device or other volatile solid-state parts.
The embodiment of the invention also provides a kind of computer storage mediums, for storing used in above-mentioned computer equipment The computer program.
So far, the present invention provides construction training method, device and the computer equipments of a kind of urine examination recognition classifier, will The images to be recognized of urine test paper carries out image procossing, extracts the feature vector of area-of-interest and area-of-interest;By machine Device study is applied to urine examination field, by the thought of deep learning, establishes urine examination recognition classifier, and the urine for passing through predetermined quantity Sample this urine examination recognition classifier of construction be trained obtained the high urine examination recognition classifier of classification accuracy;It will feel emerging The feature vector in interesting region is sent into urine examination recognition classifier and obtains classification value, is closed according to classification value with the mapping between feature gear System, obtains the corresponding feature gear of urine test paper, and the recognition result of the urine test paper can be obtained according to feature gear, improves identification Precision promotes match cognization efficiency, and effectively save time cost early finds the problem for patient and races against time.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and structure in attached drawing Figure shows the system frame in the cards of the device of multiple embodiments according to the present invention, method and computer program product Structure, function and operation.In this regard, each box in flowchart or block diagram can represent a module, section or code A part, a part of the module, section or code includes one or more for implementing the specified logical function Executable instruction.It should also be noted that function marked in the box can also be to be different from the implementation as replacement The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes It can execute in the opposite order, this depends on the function involved.It is also noted that in structure chart and/or flow chart The combination of each box and the box in structure chart and/or flow chart, can function or movement as defined in executing it is dedicated Hardware based system realize, or can realize using a combination of dedicated hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention can integrate one independence of formation together Part, be also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be intelligence Can mobile phone, personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), Random access memory (RAM, Random Access Memory), magnetic or disk etc. be various to can store program code Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.

Claims (10)

1. a kind of construction training method of urine examination recognition classifier characterized by comprising
Obtain the area-of-interest of images to be recognized in each urine test paper;
Extract the feature vector of the area-of-interest;
It is a sample by the described eigenvector of each urine test paper and the corresponding classification storage of the urine test paper;
According to the sample architecture urine examination recognition classifier of the first predetermined quantity;
The urine examination recognition classifier is trained by the sample of the second predetermined quantity, and described in being adjusted according to training result Attribute node in urine examination recognition classifier repeats training process until the classification of the urine examination recognition classifier is accurate Rate reaches preset threshold.
2. the construction training method of urine examination recognition classifier according to claim 1, which is characterized in that the urine examination identification Classifier is random forest grader.
3. the construction training method of urine examination recognition classifier according to claim 2, which is characterized in that described " according to The sample architecture urine examination recognition classifier of one predetermined quantity " includes:
According to more decision tree classifiers of sample architecture of first predetermined quantity, and by the trained more decision trees Group is combined into a random forest grader.
4. the construction training method of urine examination recognition classifier according to claim 3, which is characterized in that every decision tree point The construction process of class device includes:
According to the sample of the first predetermined quantity, the information gain of each component in described eigenvector is calculated;
The maximum component of information gain is chosen as root attribute node, and will be described according to the test result of described attribute node The sample of first predetermined quantity is divided into different subsets;
In the sample of each subset, remaining the important information gain in addition to the corresponding component of root attribute node is calculated, Using the maximum component of information gain as the sub- attribute node of the subset, recurrence dividing subset and the process for generating sub- attribute node Until all samples are directed to same classification in the subset divided.
5. the construction training method of urine examination recognition classifier according to claim 1, which is characterized in that the urine test paper Reaction block including two locating pieces and predetermined quantity, two locating pieces are located at the both ends of the urine test paper, described pre- The reaction block of fixed number amount is equally distributed between two locating piece according to default distribution spacing respectively;
" area-of-interest for obtaining images to be recognized in each urine test paper " includes:
Extract the profile of the locating piece and the reaction block in each urine test paper in images to be recognized;
The profile of the locating piece is identified from each profile;
On the basis of the profile of the locating piece, the presumptive area of each reaction block between two locating pieces is obtained as region of interest Domain.
6. the construction training method of urine examination recognition classifier according to claim 5, which is characterized in that described " with described On the basis of the profile of locating piece, the presumptive area of each reaction block between two locating pieces is obtained as area-of-interest " include:
Calculate two central point apart from nearest side between the profile of two locating pieces, and calculate between two central points away from From;
The reaction block region of predetermined quantity is obtained according to the size of the default distribution spacing and reaction block;
In each reaction block region, centered on the particle in the reaction block region, predeterminable area is extracted as area-of-interest.
7. the construction training method of urine examination recognition classifier according to claim 1, which is characterized in that described " to extract institute State the feature vector of area-of-interest " include:
The color gamut space of the image of the area-of-interest is converted into HSV color gamut matrix and LAB color gamut matrix;
The HSV color gamut matrix and the LAB color gamut matrix are subjected to channel fractionation, obtain H component, S component, V component, L point Amount, A component and B component, and H component, S component, V component, L * component, A component and B component are formed into a feature vector.
8. a kind of construction training device of urine examination recognition classifier characterized by comprising
Module is obtained, for obtaining the area-of-interest of images to be recognized in each urine test paper;
Extraction module, for extracting the feature vector of the area-of-interest;
Memory module, for being one by the described eigenvector of each urine test paper and the corresponding classification storage of the urine test paper Sample;
Constructing module, for the sample architecture urine examination recognition classifier according to the first predetermined quantity;
Training module is trained the urine examination recognition classifier for the sample by the second predetermined quantity, and according to instruction Practice result and adjust the attribute node in the urine examination recognition classifier, repeats training process until urine examination identification point The classification accuracy of class device reaches preset threshold.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, the memory For storing computer program, the processor runs the computer program so that the computer equipment perform claim requires The construction training method of 1 to 7 described in any item urine examination recognition classifiers.
10. a kind of computer storage medium, which is characterized in that the computer storage medium stores meter described in claim 9 Calculate the computer program used in machine equipment.
CN201811141847.6A 2018-09-28 2018-09-28 Structure training method and device of urine test recognition classifier and computer equipment Active CN109272001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811141847.6A CN109272001B (en) 2018-09-28 2018-09-28 Structure training method and device of urine test recognition classifier and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811141847.6A CN109272001B (en) 2018-09-28 2018-09-28 Structure training method and device of urine test recognition classifier and computer equipment

Publications (2)

Publication Number Publication Date
CN109272001A true CN109272001A (en) 2019-01-25
CN109272001B CN109272001B (en) 2021-09-03

Family

ID=65198774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811141847.6A Active CN109272001B (en) 2018-09-28 2018-09-28 Structure training method and device of urine test recognition classifier and computer equipment

Country Status (1)

Country Link
CN (1) CN109272001B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919054A (en) * 2019-02-25 2019-06-21 电子科技大学 A kind of detection method that the reagent card based on machine vision is classified automatically
CN110455789A (en) * 2019-07-18 2019-11-15 深圳市象形字科技股份有限公司 It is a kind of to carry out amount of drinking water monitoring device and method using uroscopy instrument
CN110456050A (en) * 2019-07-11 2019-11-15 台州云海医疗科技有限公司 Portable intelligent digitizes helminth in-vitro diagnosis instrument

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103996287A (en) * 2014-05-26 2014-08-20 江苏大学 Vehicle forced lane changing decision-making method based on decision-making tree model
CN105160317A (en) * 2015-08-31 2015-12-16 电子科技大学 Pedestrian gender identification method based on regional blocks
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN106202886A (en) * 2016-06-29 2016-12-07 中国铁路总公司 Track circuit red band Fault Locating Method based on fuzzy coarse central Yu decision tree
CN106548213A (en) * 2016-11-30 2017-03-29 上海联影医疗科技有限公司 Blood vessel recognition methodss and device
CN106651199A (en) * 2016-12-29 2017-05-10 冶金自动化研究设计院 Steam pipe network scheduling rule system based on decision-making tree method
CN107194138A (en) * 2016-01-31 2017-09-22 青岛睿帮信息技术有限公司 A kind of fasting blood-glucose Forecasting Methodology based on physical examination data modeling
CN107206384A (en) * 2015-02-17 2017-09-26 西门子医疗保健诊断公司 For the bar coded sticker detection in the side view sample cell image of laboratory automation
CN108280440A (en) * 2018-02-09 2018-07-13 三亚中科遥感研究所 A kind of fruit-bearing forest recognition methods and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103996287A (en) * 2014-05-26 2014-08-20 江苏大学 Vehicle forced lane changing decision-making method based on decision-making tree model
CN107206384A (en) * 2015-02-17 2017-09-26 西门子医疗保健诊断公司 For the bar coded sticker detection in the side view sample cell image of laboratory automation
CN105160317A (en) * 2015-08-31 2015-12-16 电子科技大学 Pedestrian gender identification method based on regional blocks
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN107194138A (en) * 2016-01-31 2017-09-22 青岛睿帮信息技术有限公司 A kind of fasting blood-glucose Forecasting Methodology based on physical examination data modeling
CN106202886A (en) * 2016-06-29 2016-12-07 中国铁路总公司 Track circuit red band Fault Locating Method based on fuzzy coarse central Yu decision tree
CN106548213A (en) * 2016-11-30 2017-03-29 上海联影医疗科技有限公司 Blood vessel recognition methodss and device
CN106651199A (en) * 2016-12-29 2017-05-10 冶金自动化研究设计院 Steam pipe network scheduling rule system based on decision-making tree method
CN108280440A (en) * 2018-02-09 2018-07-13 三亚中科遥感研究所 A kind of fruit-bearing forest recognition methods and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
农远峰: "基于OpenCV的医疗试纸检测技术", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919054A (en) * 2019-02-25 2019-06-21 电子科技大学 A kind of detection method that the reagent card based on machine vision is classified automatically
CN109919054B (en) * 2019-02-25 2023-04-07 电子科技大学 Machine vision-based reagent card automatic classification detection method
CN110456050A (en) * 2019-07-11 2019-11-15 台州云海医疗科技有限公司 Portable intelligent digitizes helminth in-vitro diagnosis instrument
CN110456050B (en) * 2019-07-11 2022-07-19 台州云海医疗科技有限公司 Portable intelligent digital parasite in vitro diagnostic instrument
CN110455789A (en) * 2019-07-18 2019-11-15 深圳市象形字科技股份有限公司 It is a kind of to carry out amount of drinking water monitoring device and method using uroscopy instrument

Also Published As

Publication number Publication date
CN109272001B (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN103577475B (en) A kind of picture mechanized classification method, image processing method and its device
Liu et al. Automatic grape bunch detection in vineyards with an SVM classifier
CN111161243B (en) Industrial product surface defect detection method based on sample enhancement
Milyaev et al. Image binarization for end-to-end text understanding in natural images
Tan et al. Color image segmentation using adaptive unsupervised clustering approach
Mitianoudis et al. Document image binarization using local features and Gaussian mixture modeling
CN104408449B (en) Intelligent mobile terminal scene literal processing method
CN110210413A (en) A kind of multidisciplinary paper content detection based on deep learning and identifying system and method
Bianconi et al. Performance analysis of colour descriptors for parquet sorting
CN109272001A (en) Construction training method, device and the computer equipment of urine examination recognition classifier
CN103186904A (en) Method and device for extracting picture contours
CN110189383B (en) Traditional Chinese medicine tongue color and fur color quantitative analysis method based on machine learning
CN107392968B (en) The image significance detection method of Fusion of Color comparison diagram and Color-spatial distribution figure
CN104680130A (en) Chinese character recognition method for identification cards
CN106203237A (en) The recognition methods of container-trailer numbering and device
CN109241970A (en) Urine examination method, mobile terminal and computer readable storage medium
CN105320970A (en) Potato disease diagnostic device, diagnostic system and diagnostic method
CN111260645A (en) Method and system for detecting tampered image based on block classification deep learning
CN111161281A (en) Face region identification method and device and storage medium
Shih et al. An efficient automatic traffic sign detection and recognition method for smartphones
Nafchi et al. Application of phase-based features and denoising in postprocessing and binarization of historical document images
CN103185731A (en) Device for detecting beef tenderness based on color image textural features and method thereof
Aguilar et al. Classification of urban areas from geoeye-1 imagery through texture features based on histograms of equivalent patterns
CN107341487A (en) A kind of detection method and system for smearing character
CN113408573A (en) Method and device for automatically classifying and classifying tile color numbers based on machine learning

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 518000, Building B, Building 8, Shenzhen International Innovation Valley, Dashi Road, Xili Community, Xili Street, Nanshan District, Shenzhen City, Guangdong Province, China 307

Patentee after: SHENZHEN FEIDIAN HEALTH MANAGEMENT CO.,LTD.

Country or region after: China

Address before: 518000 b2-302, Kexing Science Park, No. 15, Keyuan Road, Yuehai street, Nanshan District, Shenzhen, Guangdong

Patentee before: SHENZHEN FEIDIAN HEALTH MANAGEMENT CO.,LTD.

Country or region before: China