Fiber check and measure method, apparatus and electronic equipment
Technical field
The present invention relates to image identification technical field, more particularly, to a kind of fiber check and measure method, apparatus and electronic equipment.
Background technology
With the sustained and rapid development of China's economy, booming situation is presented in all trades and professions.It is it follows that each
Material of the kind comprising fibre structure is increasingly abundanter, its species, fiber composition, form etc. are multifarious.Current fiber
Detection identification method is carried out based on artificial mode, it usually needs collection image, is then observed above-mentioned image,
According to existing experience and knowledge, the fiber type in the image is determined, calculate its fibre diameter and quantity etc..This process is time-consuming to take
Power, and inefficiency, for the material comprising mixed fiber structure, it is identified difficult.
The content of the invention
In view of this, it is an object of the invention to provide a kind of fiber check and measure method, apparatus and electronic equipment, can pass through
A variety of deep learning models based on convolutional neural networks, carry out independent neutral net to every kind of fiber and detect identification, so that
When being detected to composite fibre, interference of other fibers to identification is excluded, achievees the purpose that to accurately identify fiber.
In a first aspect, an embodiment of the present invention provides a kind of fiber check and measure method, including:
Obtain fibre image to be detected;
The fiber characteristics of fibre image to be detected are extracted according to predetermined deep learning model, predetermined deep learning model includes
A variety of deep learning models based on convolutional neural networks;
Fiber characteristics are identified using the grader trained based on predetermined deep learning model, generate fiber to be detected
The recognition result of image.
With reference to first aspect, an embodiment of the present invention provides the first possible embodiment of first aspect, wherein, obtain
Fibre image to be detected is taken, is specifically included:
Obtain electron microscope and acquired image of taking pictures is carried out to target detection thing, obtain fibre image to be detected;Mesh
Mark detectable substance includes fibre structure.
With reference to first aspect, an embodiment of the present invention provides second of possible embodiment of first aspect, wherein, it is fine
Dimensional feature includes:Fiber type, fibre diameter, fiber number.
With reference to first aspect, an embodiment of the present invention provides the third possible embodiment of first aspect, wherein, base
It is that the fiber samples data for exceeding certain threshold value by quantity are trained in the deep learning model of convolutional neural networks, it is fine
Dimension sample data includes the corresponding picture of different types of fiber.
With reference to first aspect, an embodiment of the present invention provides the 4th kind of possible embodiment of first aspect, wherein, lead to
Cross in the following manner and obtain the grader based on the training of predetermined deep learning model:
Utilize the further feature of a variety of deep learning model extraction fiber samples data based on convolutional neural networks;
Based on machine learning algorithm, grader is trained to further feature;
Wherein fiber samples data include fiber characteristics, matching degree and recognition result.
With reference to first aspect, an embodiment of the present invention provides the 5th kind of possible embodiment of first aspect, wherein, profit
Fiber characteristics are identified with the grader trained based on predetermined deep learning model, generate the identification of fibre image to be detected
As a result, specifically include:
Determine the data format corresponding to the grader based on the training of predetermined deep learning model;
If data format includes binary data format, base is inputted after fiber characteristics are converted to binary data format
In the grader of predetermined deep learning model training, with the recognition result of the corresponding fibre image to be detected of generation.
With reference to first aspect, an embodiment of the present invention provides the 6th kind of possible embodiment of first aspect, wherein,
Fiber characteristics are identified using the grader trained based on predetermined deep learning model, generate the knowledge of fibre image to be detected
After other result, further include:
It is stored in the recognition result of fibre image to be detected as new fiber samples data in fiber samples database.
Second aspect, the embodiment of the present invention provide a kind of fiber detection device, and device includes:
Image collection module, for obtaining fibre image to be detected;
Characteristic extracting module, for extracting the fiber characteristics of fibre image to be detected according to predetermined deep learning model, in advance
If deep learning model includes a variety of deep learning models based on convolutional neural networks;
Fiber recognition module, for being known using the grader trained based on predetermined deep learning model to fiber characteristics
Not, the recognition result of fibre image to be detected is generated.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, including memory, processor, are stored on memory
There is the computer program that can be run on a processor, processor realizes the method described in first aspect when performing computer program
Step.
Fourth aspect, the embodiment of the present invention also provide a kind of meter for the non-volatile program code that can perform with processor
Calculation machine computer-readable recording medium, program code make processor perform the method described in first aspect.
The embodiment of the present invention brings following beneficial effect:
In fiber check and measure method provided in an embodiment of the present invention, fibre image to be detected is obtained first, then according to pre-
If the fiber characteristics of deep learning model extraction fibre image to be detected, wherein, predetermined deep learning model includes a variety of be based on
The deep learning model of convolutional neural networks, finally utilizes the grader based on the training of predetermined deep learning model to fiber characteristics
It is identified, generates the recognition result of fibre image to be detected.The fiber check and measure method can be based on convolutional Neural by a variety of
The deep learning model of network, carries out independent neutral net to every kind of fiber and detects identification, so as to be detected to composite fibre
When, interference of other fibers to identification is excluded, achievees the purpose that to accurately identify fiber.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages are in specification, claims
And specifically noted structure is realized and obtained in attached drawing.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate
Appended attached drawing, is described in detail below.
Brief description of the drawings
, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution of the prior art
Embodiment or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, in describing below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
Put, other attached drawings can also be obtained according to these attached drawings.
Fig. 1 is a kind of flow chart for fiber check and measure method that the embodiment of the present invention one provides;
Fig. 2 is the flow chart for another fiber check and measure method that the embodiment of the present invention one provides;
Fig. 3 is the flow chart for another fiber check and measure method that the embodiment of the present invention one provides;
Fig. 4 is the flow chart for another fiber check and measure method that the embodiment of the present invention one provides;
Fig. 5 is a kind of structure diagram of fiber detection device provided by Embodiment 2 of the present invention;
Fig. 6 is the structure diagram for a kind of electronic equipment that the embodiment of the present invention three provides.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with attached drawing to the present invention
Technical solution be clearly and completely described, it is clear that described embodiment is part of the embodiment of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Lower all other embodiments obtained, belong to the scope of protection of the invention.
Current existing fiber check and measure identification method is carried out based on artificial mode, not only time-consuming and laborious, but also
Inefficiency, for the material comprising mixed fiber structure, it is identified difficult.It is of the invention based on this
The fiber check and measure method, apparatus and electronic equipment that embodiment provides, can pass through a variety of depth based on convolutional neural networks
Model is practised, carrying out independent neutral net to every kind of fiber detects identification, so that when being detected to composite fibre, it is fine to exclude other
The interference to identification is tieed up, achievees the purpose that to accurately identify fiber.
For ease of understanding the present embodiment, first to a kind of fiber check and measure method disclosed in the embodiment of the present invention into
Row is discussed in detail.
Embodiment one:
An embodiment of the present invention provides a kind of fiber check and measure method, this method can be applied to the fiber check and measure of multiple fields
In scene, such as:The fabric fibre in garment production field detects, plant fiber detects etc..Shown in Figure 1, this method includes:
S101:Obtain fibre image to be detected.
Specifically, obtain electron microscope carries out acquired image of taking pictures to target detection thing, fiber to be detected is obtained
Image.Wherein, target detection thing is the material comprising fibre structure, such as cloth, high polymer composite material, plant specimen
Deng.Electron microscope can be different type, the microscope of different size, and skilled addressee is treated using electron microscope collection
The fibre image to be detected of detectable substance.
S102:The fiber characteristics of fibre image to be detected, predetermined depth study mould are extracted according to predetermined deep learning model
Type includes a variety of deep learning models based on convolutional neural networks.
Deep learning model based on convolutional neural networks is that the fiber samples data for exceeding certain threshold value by quantity are instructed
Get, fiber samples data include the corresponding picture of different types of fiber.
In one preferred embodiment, above-mentioned a variety of deep learning models based on convolutional neural networks can pass through
Caffe deep learnings frame is realized.
Specifically, the quantity of the fibre image in fiber samples data is The more the better, and species is The more the better, and data are more,
The versatility of the deep learning model based on convolutional neural networks of training generation is better.The embodiment of the present invention using fabric fibre as
Example, above-mentioned fibre image includes fiber type, fibre diameter and the different multiple fiber sample data of fiber number, so favourable
In subsequently being accurately identified to fibre image to be detected, the identification energy of the deep learning model based on convolutional neural networks is improved
Power, even if fiber to be detected is composite fibre, can also identify it exactly.
Step S102 is specifically included:Wrapped using fibre image to be detected as input picture in predetermined deep learning model
Carry out feature training successively in the multiple basic units contained, after the completion of training, extract it is multiple it is integrated in full articulamentum or other
The feature vector of basic unit's output is specified as corresponding fiber characteristics in the fibre image to be detected.Wherein, fiber characteristics include:
Fiber type, fibre diameter, fiber number.
S103:Fiber characteristics are identified using the grader trained based on predetermined deep learning model, generation is to be checked
Survey the recognition result of fibre image.
By grader of the fiber characteristics input based on the training of predetermined deep learning model of said extracted, pass through the grader
After identification, final recognition result is obtained.Specifically, recognition result is fiber type, fibre diameter and fiber number.
In an optional embodiment, the classification based on the training of predetermined deep learning model is obtained in the following manner
Device, it is shown in Figure 2:
S201:It is special using the deep layer of a variety of deep learning model extraction fiber samples data based on convolutional neural networks
Sign.
S202:Based on machine learning algorithm, grader is trained to further feature.
Wherein fiber samples data include fiber characteristics, matching degree and recognition result.Above-mentioned machine learning algorithm can be with
It is nearest neighbor algorithm, EM algorithm and algorithm of support vector machine etc., specific algorithm can select as the case may be, here not
It is construed as limiting.
In an optional embodiment, above-mentioned fiber sample data include triple data;The wherein triple data
Including:Source data, belong to the source data same category of forward data and adhered to separately with the source data different classes of anti-
To data.
Wherein, source data is the identical sample data of the recognition result got at random from fiber sample data.It is positive
Data are the sample data consistent with the recognition result of source data obtained at random from fiber samples data;Of the source data
Matching degree with degree higher than forward data.Reverse data is the identification knot with source data obtained at random from fiber samples data
The inconsistent sample data of fruit.
In a specific embodiment, triple data are respectively:Fibre image performance is good in fiber samples data
The first good picture, the second picture of fibre image poor-performing in fiber samples data, and with the first picture and the second figure
The 3rd different picture of piece recognition result.Specific first picture is the highest source data of matching degree, and second picture is clear
There are gap, its matching degree be less than the first picture, but still be fibre image for degree, resolution ratio etc. and the first picture, to be positive
Data.The reverse data that it is progress reverse contrast in training that 3rd picture, which is then, with secondary by positive and negative contrast, further enhancing
The recognition capability of grader, improves neutral net fiber check and measure identification accuracy.
Fiber characteristics are identified using the grader trained based on predetermined deep learning model, generate fiber to be detected
The recognition result of image, specifically includes following steps, shown in Figure 3:
S301:Determine the data format corresponding to the grader based on the training of predetermined deep learning model.
S302:If data format includes binary data format, after fiber characteristics are converted to binary data format
The grader based on the training of predetermined deep learning model is inputted, with the recognition result of the corresponding fibre image to be detected of generation.
Specifically, if the grader of predetermined deep learning model training supports binary data format, then just by fiber
Feature is changed, and is converted to binary data format, then is input in the grader of above-mentioned training, is identified, due to
Machine language is binary system, therefore by binary data format, can accelerate the process identified, when being identified, no
Need to carry out extra data conversion again, state this can improve the efficiency of identification.
In addition, after the recognition result of fibre image to be detected is generated, it is further comprising the steps of, it is shown in Figure 4:
S401:Fiber samples data are stored in using the recognition result of fibre image to be detected as new fiber samples data
In storehouse.
Pass through the data being continuously updated in fiber samples database so that the classification gone out based on deep learning model training
The fiber recognition effect of device is more accurate.
In fiber check and measure method provided in an embodiment of the present invention, fibre image to be detected is obtained first, then according to pre-
If the fiber characteristics of deep learning model extraction fibre image to be detected, wherein, predetermined deep learning model includes a variety of be based on
The deep learning model of convolutional neural networks, finally utilizes the grader based on the training of predetermined deep learning model to fiber characteristics
It is identified, generates the recognition result of fibre image to be detected.The fiber check and measure method can be based on convolutional Neural by a variety of
The deep learning model of network, carries out independent neutral net to every kind of fiber and detects identification, so as to be detected to composite fibre
When, interference of other fibers to identification is excluded, achievees the purpose that to accurately identify fiber.
Embodiment two:
The embodiment of the present invention provides a kind of fiber detection device, and shown in Figure 5, which includes:Image collection module
51st, characteristic extracting module 52, fiber recognition module 53.
Wherein, image collection module 51, for obtaining fibre image to be detected;Characteristic extracting module 52, for according to pre-
If the fiber characteristics of deep learning model extraction fibre image to be detected, predetermined deep learning model includes a variety of based on convolution god
Deep learning model through network;Fiber recognition module 53, for utilizing the grader based on the training of predetermined deep learning model
Fiber characteristics are identified, generate the recognition result of fibre image to be detected.
In the fiber detection device that the embodiment of the present invention is provided, the course of work of modules and foregoing fiber check and measure side
Method has identical technical characteristic, therefore, can equally realize above-mentioned function, details are not described herein.
Embodiment three:
The embodiment of the present invention also provides a kind of electronic equipment, shown in Figure 6, which includes:Processor 60, is deposited
Reservoir 61, bus 62 and communication interface 63, the processor 60, communication interface 63 and memory 61 are connected by bus 62;Place
Reason device 60 is used to perform the executable module stored in memory 61, such as computer program.Processor performs computer program
The step of methods of the Shi Shixian as described in embodiment of the method.
Wherein, memory 61 may include high-speed random access memory (RAM, RandomAccessMemory), also may be used
Non-labile memory (non-volatile memory), for example, at least a magnetic disk storage can be further included.By at least
One communication interface 63 (can be wired or wireless) realizes the communication between the system network element and at least one other network element
Connection, can use internet, wide area network, local network, Metropolitan Area Network (MAN) etc..
Bus 62 can be isa bus, pci bus or eisa bus etc..The bus can be divided into address bus, data
Bus, controlling bus etc..Only represented for ease of representing, in Fig. 6 with a four-headed arrow, it is not intended that an only bus or
A type of bus.
Wherein, memory 61 is used for storage program, and the processor 60 performs the journey after execute instruction is received
Sequence, the method performed by device that the stream process that foregoing any embodiment of the embodiment of the present invention discloses defines can be applied to handle
In device 60, or realized by processor 60.
Processor 60 is probably a kind of IC chip, has the disposal ability of signal.During realization, above-mentioned side
Each step of method can be completed by the integrated logic circuit of the hardware in processor 60 or the instruction of software form.Above-mentioned
Processor 60 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network
Processor (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal
Processing, abbreviation DSP), application-specific integrated circuit (Application Specific Integrated Circuit, referred to as
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or other are programmable
Logical device, discrete gate or transistor logic, discrete hardware components.It can realize or perform in the embodiment of the present invention
Disclosed each method, step and logic diagram.General processor can be microprocessor or the processor can also be appointed
What conventional processor etc..The step of method with reference to disclosed in the embodiment of the present invention, can be embodied directly in hardware decoding processing
Device performs completion, or performs completion with the hardware in decoding processor and software module combination.Software module can be located at
Machine memory, flash memory, read-only storage, programmable read only memory or electrically erasable programmable memory, register etc. are originally
In the storage medium of field maturation.The storage medium is located at memory 61, and processor 60 reads the information in memory 61, with reference to
Its hardware completes the step of above method.
The computer program product of the localization method for the network equipment that the embodiment of the present invention is provided, including store processing
The computer-readable recording medium for the non-volatile program code that device can perform, the instruction that said program code includes can be used for holding
Method described in row previous methods embodiment, specific implementation can be found in embodiment of the method, and details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
And the specific work process of electronic equipment, the corresponding process in preceding method embodiment is may be referred to, details are not described herein.
Flow chart and block diagram in attached drawing show multiple embodiment method and computer program products according to the present invention
Architectural framework in the cards, function and operation.At this point, each square frame in flow chart or block diagram can represent one
A part for module, program segment or code, a part for the module, program segment or code are used for realization comprising one or more
The executable instruction of defined logic function.It should also be noted that at some as the work(in the realization replaced, marked in square frame
Energy can also be with different from the order marked in attached drawing generation.For example, two continuous square frames can essentially be substantially parallel
Ground performs, they can also be performed in the opposite order sometimes, this is depending on involved function.It is also noted that block diagram
And/or the combination of each square frame and block diagram in flow chart and/or the square frame in flow chart, work(as defined in performing can be used
Can or the dedicated hardware based system of action realize, or reality can be carried out with the combination of specialized hardware and computer instruction
It is existing.
In the description of the present invention, it is necessary to explanation, term " " center ", " on ", " under ", "left", "right", " vertical ",
The orientation or position relationship of the instruction such as " level ", " interior ", " outer " be based on orientation shown in the drawings or position relationship, merely to
Easy to describe the present invention and simplify description, rather than instruction or imply signified device or element must have specific orientation,
With specific azimuth configuration and operation, therefore it is not considered as limiting the invention.In addition, term " first ", " second ",
" the 3rd " is only used for description purpose, and it is not intended that instruction or hint relative importance.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, can be with
Realize by another way.Device embodiment described above is only schematical, for example, the division of the unit,
Only a kind of division of logic function, can there is other dividing mode when actually realizing, in another example, multiple units or component can
To combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or beg for
The mutual coupling, direct-coupling or communication connection of opinion can be by some communication interfaces, device or unit it is indirect
Coupling or communication connection, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
In network unit.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units integrate in a unit.
If the function is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can be with
It is stored in the non-volatile computer read/write memory medium that a processor can perform.Based on such understanding, the present invention
The part that substantially contributes in other words to the prior art of technical solution or the part of the technical solution can be with software
The form of product embodies, which is stored in a storage medium, including some instructions use so that
One computer equipment (can be personal computer, server, or network equipment etc.) performs each embodiment institute of the present invention
State all or part of step of method.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-
Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with
The medium of store program codes.
Finally it should be noted that:Embodiment described above, is only the embodiment of the present invention, to illustrate the present invention
Technical solution, rather than its limitations, protection scope of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, it will be understood by those of ordinary skill in the art that:Any one skilled in the art
The invention discloses technical scope in, it can still modify the technical solution described in previous embodiment or can be light
It is readily conceivable that change, or equivalent substitution is carried out to which part technical characteristic;And these modifications, change or replacement, do not make
The essence of appropriate technical solution departs from the spirit and scope of technical solution of the embodiment of the present invention, should all cover the protection in the present invention
Within the scope of.Therefore, protection scope of the present invention answers the scope of the claims of being subject to.