CN109919300A - Neural network training method and device and image processing method and device - Google Patents

Neural network training method and device and image processing method and device Download PDF

Info

Publication number
CN109919300A
CN109919300A CN201910138574.8A CN201910138574A CN109919300A CN 109919300 A CN109919300 A CN 109919300A CN 201910138574 A CN201910138574 A CN 201910138574A CN 109919300 A CN109919300 A CN 109919300A
Authority
CN
China
Prior art keywords
network
training
state
nervus opticus
nerves
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
CN201910138574.8A
Other languages
Chinese (zh)
Other versions
CN109919300B (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.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to CN201910138574.8A priority Critical patent/CN109919300B/en
Publication of CN109919300A publication Critical patent/CN109919300A/en
Application granted granted Critical
Publication of CN109919300B publication Critical patent/CN109919300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

This disclosure relates to a kind of neural network training method and device and image processing method and device, it is handled the described method includes: the sample image in training set is inputted respectively in the first nerves network of N number of middle trained state, obtains the first processing result of N number of middle trained state;According to the training set and the first processing result of N number of middle trained state, training nervus opticus network.The embodiment of the present disclosure enables to the learning process of nervus opticus network by the constraint of the path optimizing of first nerves network, to obtain the nervus opticus network of higher performance.

Description

Neural network training method and device and image processing method and device
Technical field
This disclosure relates to field of artificial intelligence more particularly to a kind of neural network training method and device and image Processing method and processing device.
Background technique
In field of artificial intelligence, deep neural network achieves very good in many tasks (such as visual task) Performance.In general, the parameter amount and calculation amount of network are bigger, performance is better.In resource-constrained system (such as terminal) Upper this kind of big network model of deployment is more difficult, is only capable of the lesser network of deployment scale.However, small network is directly trained to obtain Model performance be far below big network performance.How in the case where not increasing sample image, the performance for promoting small network is One urgent problem to be solved.
Summary of the invention
The present disclosure proposes a kind of neural metwork training technical solutions.
According to the one side of the disclosure, a kind of neural network training method is provided, comprising:
Sample image in training set is inputted in the first nerves network of N number of middle trained state respectively and handled, obtains N First processing result of a middle trained state;
According to the training set and the first processing result of N number of middle trained state, nervus opticus network is trained,
Wherein, the nervus opticus network is the network for being handled image to be processed, the first nerves net Network is the network for training the nervus opticus network.
In one possible implementation, according at the first of the training set and N number of middle trained state Reason is as a result, training nervus opticus network, comprising:
It will be handled in the nervus opticus network of sample image input th state in the training set, obtain th state Second processing is as a result, the th state is one in preset N number of physical training condition, and 1≤i < N;
According to the markup information of the sample image, the second processing result of th state and i-th of middle trained state The first processing result, determine first-loss of the nervus opticus network under th state;
The nervus opticus network is trained according to the first-loss, and the nervus opticus network after training is true It is set to the nervus opticus network of i+1 state.
In one possible implementation, the first nerves network includes M physical training condition, and M is integer and M > N, The method also includes:
The first nerves network of N number of middle trained state is determined from the first nerves network of M physical training condition.
In one possible implementation, N number of middle trained is determined from the first nerves network of M physical training condition The first nerves network of state, comprising:
It is sampled with first nerves network of the equal number of states interval to M physical training condition, obtains N number of intermediate instruction Practice the first nerves network of state.
In one possible implementation, N number of middle trained is determined from the first nerves network of M physical training condition The first nerves network of state, comprising:
The first nerves network of N number of middle trained state is randomly selected from the first nerves network of M physical training condition.
In one possible implementation, the method also includes: according to the training set training first nerves Network,
Wherein, according to the training set training first nerves network, comprising:
It will handle, obtain m-th first in the first nerves network of sample image input m state in the training set Processing result, the m state are one in the M physical training condition, and 1≤m < M;
According to the markup information of the sample image and m-th of first processing results, the first nerves network is determined Second loss;
According to second loss, the network parameter of the first nerves network is adjusted, obtains the first mind of m+1 state Through network.
In one possible implementation, the image to be processed and the sample image include facial image, described The classification of nervus opticus network facial image for identification.
According to the one side of the disclosure, a kind of image processing method is provided, comprising:
Image to be processed is inputted in neural network and is handled, processing result image is obtained,
Wherein, the neural network includes the nervus opticus network obtained according to the training of above-mentioned any one method.
According to the one side of the disclosure, a kind of neural metwork training device is provided, comprising:
Processing module, for the sample image in training set to be inputted to the first nerves net of N number of middle trained state respectively It is handled in network, obtains the first processing result of N number of middle trained state;
First training module, for the first processing result according to the training set and N number of middle trained state, Training nervus opticus network,
Wherein, the nervus opticus network is the network for being handled image to be processed, the first nerves net Network is the network for training the nervus opticus network.
In one possible implementation, first training module, comprising:
First processing submodule, for the sample image in the training set to be inputted to the nervus opticus network of th state Middle processing, obtains the second processing of th state as a result, the th state is one in preset N number of physical training condition, and 1≤ i<N;
First-loss determines submodule, for the second processing knot according to the markup information of the sample image, th state First processing result of fruit and i-th of middle trained state determines first damage of the nervus opticus network under th state It loses;
Training submodule, for being trained according to the first-loss to the nervus opticus network, and will be after training Nervus opticus network be determined as the nervus opticus network of i+1 state.
In one possible implementation, the first nerves network includes M physical training condition, and M is integer and M > N, Described device further include:
Determining module, for determining the first of N number of middle trained state from the first nerves network of M physical training condition Neural network.
In one possible implementation, the determining module, comprising:
First determines submodule, for equal number of states interval to the first nerves network of M physical training condition into Row sampling, obtains the first nerves network of N number of middle trained state.
In one possible implementation, the determining module, comprising:
Second determines submodule, for randomly selecting N number of middle trained shape from the first nerves network of M physical training condition The first nerves network of state.
In one possible implementation, described device further include: the second training module, for according to the training set The training first nerves network,
Wherein, second training module, comprising:
Second processing submodule, for the sample image in the training set to be inputted to the first nerves network of m state Middle processing, obtains m-th of first processing results, and the m state is one in the M physical training condition, and 1≤m < M;
Second loses determining submodule, for according to the markup information of the sample image and m-th first processing knot Fruit determines the second loss of the first nerves network;
Network adjusting submodule, for adjusting the network parameter of the first nerves network, obtaining according to second loss To the first nerves network of m+1 state.
In one possible implementation, the image to be processed and the sample image include facial image, described The classification of nervus opticus network facial image for identification.
According to the one side of the disclosure, a kind of image processing apparatus is provided, comprising:
Image processing module handles for inputting image to be processed in neural network, obtains processing result image,
Wherein, the neural network includes the nervus opticus net that the training of the device according to above-mentioned any one obtains Network.
According to the one side of the disclosure, a kind of electronic equipment is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: execute method described in above-mentioned any one.
According to the one side of the disclosure, a kind of computer readable storage medium is provided, computer program is stored thereon with Instruction, the computer program instructions realize method described in above-mentioned any one when being executed by processor.
In the embodiments of the present disclosure, the first nerves network (teacher's network) of middle trained state can be obtained to sample graph The processing result of picture, and nervus opticus network (student network) is trained according to these processing results and sample image, so that Constraint of the learning process of nervus opticus network by the path optimizing of first nerves network, to obtain the second of higher performance Neural network.
It should be understood that above general description and following detailed description is only exemplary and explanatory, rather than Limit the disclosure.
According to below with reference to the accompanying drawings to detailed description of illustrative embodiments, the other feature and aspect of the disclosure will become It is clear.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and those figures show meet this public affairs The embodiment opened, and together with specification it is used to illustrate the technical solution of the disclosure.
Fig. 1 shows the flow chart of the neural network training method according to the embodiment of the present disclosure.
Fig. 2 shows the schematic diagrames according to the neural network training process of the embodiment of the present disclosure.
Fig. 3 shows the block diagram of the neural metwork training device according to the embodiment of the present disclosure.
Fig. 4 shows the block diagram of a kind of electronic equipment according to the embodiment of the present disclosure.
Fig. 5 shows the block diagram of a kind of electronic equipment according to the embodiment of the present disclosure.
Specific embodiment
Various exemplary embodiments, feature and the aspect of the disclosure are described in detail below with reference to attached drawing.It is identical in attached drawing Appended drawing reference indicate element functionally identical or similar.Although the various aspects of embodiment are shown in the attached drawings, remove It non-specifically points out, it is not necessary to attached drawing drawn to scale.
Dedicated word " exemplary " means " being used as example, embodiment or illustrative " herein.Here as " exemplary " Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates that there may be three kinds of passes System, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.In addition, herein Middle term "at least one" indicate a variety of in any one or more at least two any combination, it may for example comprise A, B, at least one of C can indicate to include any one or more elements selected from the set that A, B and C are constituted.
In addition, giving numerous details in specific embodiment below in order to which the disclosure is better described. It will be appreciated by those skilled in the art that without certain details, the disclosure equally be can be implemented.In some instances, for Method, means, element and circuit well known to those skilled in the art are not described in detail, in order to highlight the purport of the disclosure.
Fig. 1 shows the flow chart of the neural network training method according to the embodiment of the present disclosure.As shown in Figure 1, the method Include:
Step S11 inputs the sample image in training set respectively in the first nerves network of N number of middle trained state Reason, obtains N number of first processing result;
Step S12 trains nervus opticus network according to the training set and N number of first processing result,
Wherein, the nervus opticus network is the network for being handled image to be processed, the first nerves net Network is the network for training the nervus opticus network.
According to the neural network training method of the embodiment of the present disclosure, the first nerves network of middle trained state can be obtained (teacher's network) trains nervus opticus net according to these processing results and sample image to the processing result of sample image Network (student network), so that constraint of the learning process of nervus opticus network by the path optimizing of first nerves network, thus Obtain the nervus opticus network of higher performance.
In one possible implementation, the neural network training method can be by electricity such as terminal device or servers Sub- equipment executes, terminal device can for user equipment (User Equipment, UE), mobile device, user terminal, terminal, Cellular phone, wireless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, calculating Equipment, mobile unit, wearable device etc., the method can be computer-readable by storing in processor calling memory The mode of instruction is realized.Alternatively, the method can be executed by server.
In one possible implementation, the nervus opticus network is for being handled image to be processed Raw network, the first nerves network are teacher's network for training the nervus opticus network.The first nerves network It is different with parameter amount with the network structure of nervus opticus network, for example, first nerves network can be applied to server end, network Structure is complex and parameter amount is larger;Nervus opticus network can be applied to mobile terminal, and network structure is relatively simple and joins Quantity is smaller.The performance of student network after training is close with teacher's network.
In one possible implementation, it can be preset with training set, may include largely in training set, meet number The sample image of credit cloth, for being trained to first nerves network and nervus opticus network.
In one possible implementation, the sample image in image and training set to be processed can be, for example, face Image, the nervus opticus network such as classification of facial image for identification.It should be appreciated that image and sample image to be processed can also To be other kinds of image, nervus opticus network be can also be applied in other kinds of usage scenario, and the disclosure does not make this Limitation.
In one possible implementation, before being trained to nervus opticus network, the neural metwork training Method may also include that according to the training set training first nerves network.
For example, training set X × Y can be given, wherein X=(x1、x2、……、xn) indicate sample image set;Y =(y1、y2、……、yn) indicate that the markup information (such as label) of each sample image, n indicate the quantity of sample image.According to The training set can be used optimization algorithm (such as SGD algorithm or Adam algorithm etc.) and carry out the more first nerves net of training parameter amount Network T.The disclosure to specific optimal way used by training first nerves network with no restriction.
In one possible implementation, it can be wrapped according to the step of training set training first nerves network It includes:
It will handle, obtain m-th first in the first nerves network of sample image input m state in the training set Processing result, the m state are one in the M physical training condition, and 1≤m < M;
According to the markup information of the sample image and m-th of first processing results, the first nerves network is determined Second loss;
According to second loss, the network parameter of the first nerves network is adjusted, obtains the first mind of m+1 state Through network.
For example, in the training process, the network parameter of first nerves network T can be updated by successive ignition, often Secondary iteration can all obtain the first nerves network T of a middle trained state.
In one possible implementation, if total wheel number (MaxIters) of first nerves network T training iteration is M (M For the integer greater than 1), then for the first nerves of current m state (for one in M physical training condition, and 1≤m < M) Multiple sample images can be inputted respectively in the first nerves network of m state and be handled by network T, at export m state first Reason is as a result, namely m-th of first processing results.
In one possible implementation, according to the markup information of each sample image and corresponding multiple m shapes First processing result of state can determine the first of m state according to preset optimization algorithm (such as SGD algorithm or Adam algorithm) The network losses (the second loss) of neural network;And the network that first nerves network is reversely adjusted according to the network losses is joined Number, obtains the first nerves network of m+1 state.When first nerves network meets training condition, after available training First nerves network.
In this way, first nerves network can be trained by successive ignition, obtains high-precision teacher's network.
It, can be (big using teacher's network in such a way that knowledge is distilled after training first nerves network (teacher's network) Network) come training of students network (small network), such as by minimizing the cross entropy between big network and the output of small network, from And small network is preferably trained, reduce the performance gap between size network.In the related art, it may directly adopt and train Learning objective of the complete big network as small network, however the learning objective is more difficult, it is difficult to train high performance small net Network.
In one possible implementation, it can choose the religion of multiple intermediate state on the training path of teacher's network Teacher's network carrys out training of students network, steps up the difficulty of learning objective, to reduce the training difficulty of student network, further Promote the performance of student network.
In one possible implementation, the method may also include that from the first nerves network of M physical training condition Determine the first nerves network of N number of middle trained state.
For example, can from the first nerves network of M iteration (M physical training condition) selected section middle trained shape The first nerves network of state (N number of middle trained state, N < M).Using the first nerves network of N number of middle trained state as inspection Point (checking point model) is simultaneously stored, to embody the path optimizing of first nerves network.
In one possible implementation, N number of middle trained is determined from the first nerves network of M physical training condition The step of first nerves network of state can include: with equal number of states interval to the first nerves net of M physical training condition Network is sampled, and the first nerves network of N number of middle trained state is obtained.It (is adopted that is, can be selected at equal intervals Sample), such as the number of states interval of sampling can be M/N with value, the disclosure does not limit the specific value at number of states interval System.
In this way, checkpoint can be equably chosen, so that path optimizing more evenly is embodied in checkpoint, is reduced The training difficulty of student network.
In one possible implementation, N number of middle trained is determined from the first nerves network of M physical training condition The step of first nerves network of state can include: N number of intermediate instruction is randomly selected from the first nerves network of M physical training condition Practice the first nerves network of state.That is, (sampling) can be selected at random, from the first nerves of M physical training condition The first nerves network (checkpoint) of N number of middle trained state is sampled out in network.
In this way, checkpoint can be randomly selected, so that unfixed path optimizing is embodied in checkpoint, improves and learns The training effect of raw network.
It in one possible implementation, can be after the first nerves network for determining N number of middle trained state Each sample image in training set is inputted in step S11 in the first nerves network of N number of middle trained state respectively and is handled, Obtain the first processing result of N number of middle trained state;It, can be in step according to the first processing result of each middle trained state Training nervus opticus network in rapid S12.
In one possible implementation, step S12 can include:
It will be handled in the nervus opticus network of sample image input th state in the training set, obtain th state Second processing is as a result, the th state is one in preset N number of physical training condition, and 1≤i < N;
According to the markup information of the sample image, the second processing result of th state and i-th of middle trained state The first processing result, determine first-loss of the nervus opticus network under th state;
The nervus opticus network is trained according to the first-loss, and the nervus opticus network after training is true It is set to the nervus opticus network of i+1 state.
For example, if nervus opticus network S has N number of physical training condition, N number of middle trained with first nerves network T State is corresponding.For the nervus opticus network S of current th state (for one in N number of physical training condition, and 1≤i < N), Multiple sample images can be inputted in the nervus opticus network S of th state respectively and be handled, export the second processing knot of th state Fruit.
In one possible implementation, according to the markup information of sample image (label), the second processing of th state And the first processing result of i-th of middle trained state as a result, it may be determined that the nervus opticus network under th state One loss.Wherein, first-loss can be for example including cross entropy loss function, as shown in formula (1):
In formula (1), LOSSiIndicate the first-loss of th state, SiIndicate the nervus opticus network of th state;Indicate j-th of training image xjInput nervus opticus network SiThe second processing result obtained afterwards;yiIndicate j-th of training figure As xjLabel;It indicates to intersect entropy loss.
In formula (1), Indicate image xjIn nervus opticus network SiLast Feature is obtained before softmax layers, by this featureDivided by softmax processing is carried out again after relaxation factor τ, can be handled As a resultSimilarly, TiIndicate the first nerves network of i-th of middle trained state; Indicate image xjIn first nerves network TiFeature is obtained before last softmax layer, by this featureDivided by relaxation factor Softmax processing is carried out after τ again, processing result can be obtainedλ indicates to intersect entropy lossWeight.
Wherein, the value of relaxation factor τ can be, for example, 2-10, the disclosure to the value of relaxation factor τ with no restriction.
In one possible implementation, according to the first-loss LOSS of th statei, can be to the nervus opticus net Network is trained.For example, according to first-loss LOSSiThe network parameter of reversed gradient adjustment nervus opticus network;By multiple Adjustment can complete the training process of th state, and will be after training when nervus opticus network meets preset training condition Nervus opticus network be determined as the nervus opticus network of i+1 state.Specific training side of the disclosure to nervus opticus network Formula is with no restriction.
Fig. 2 shows the schematic diagrames according to the neural network training process of the embodiment of the present disclosure.As shown in Fig. 2, frame 21 indicates The training process of first nerves network T, frame 22 indicate the training process of nervus opticus network S.T1、T2、……、TNRespectively indicate N The first nerves network of a middle trained state, S1、S2、……、SNRespectively indicate the nervus opticus network of N number of physical training condition.
In one possible implementation, the first nerves network T of N number of middle trained state can be first determined1、 T2、……、TN;Training image in training set 23 is inputted into T1In, export the first processing knot of first middle trained state Fruit, and pass through training image and first processing result training nervus opticus network S1, obtain the second mind of next state Through network S2.And so on, the nervus opticus network S of available n-th physical training conditionN
In this way, student network (nervus opticus network) can be allowed first to learn the teacher of earlier exercise wheel number Teacher's network of exercise wheel number after network, then learning backing, so that the network parameter progressive updating of student network, to improve final The precision of obtained nervus opticus network.
In accordance with an embodiment of the present disclosure, a kind of image processing method is additionally provided, this method comprises:
Image to be processed is inputted in neural network and is handled, obtains processing result image, wherein the neural network includes The nervus opticus network obtained according to method as described above training.
In one possible implementation, image to be processed can be, for example, facial image, can input facial image To image recognition is carried out in the student network (nervus opticus network) trained, so that it is determined that the classification of facial image.Pass through this Kind mode, can be improved the accuracy of identification of image.
The student network that neural network training method according to an embodiment of the present disclosure obtains can be deployed in embedded device In (such as terminal), it can be applied to mobile phone and unlock, in the various usage scenarios such as pedestrian's identification.Deployment of the disclosure to student network Mode and usage scenario are with no restriction.
In accordance with an embodiment of the present disclosure, can be distilled using the path optimizing of big network (teacher's network) as knowledge Practise target, realize based on path optimizing constraint knowledge distillation so that small network (student network) can from easy to difficult according to The secondary big network of study, has obtained better performance on the small network of identical operation amount.In accordance with an embodiment of the present disclosure, either Randomly selected checkpoint (teacher's network of middle trained state), the checkpoint still equably selected at equal intervals, Yi Jiwu Quantity by checkpoint be how many (> 1), can effectively promote the performance of small network.
It is appreciated that above-mentioned each embodiment of the method that the disclosure refers to, without prejudice to principle logic, To engage one another while the embodiment to be formed after combining, as space is limited, the disclosure is repeated no more.
In addition, the disclosure additionally provides neural metwork training device, electronic equipment, computer readable storage medium, program, The above-mentioned any neural network training method that can be used to realize disclosure offer, corresponding technical solution is with description and referring to side The corresponding record of method part, repeats no more.
It will be understood by those skilled in the art that each step writes sequence simultaneously in the above method of specific embodiment Do not mean that the stringent sequence that executes, the specific execution sequence of each step should be determined with its function and possible internal logic.
Fig. 3 shows the block diagram of the neural metwork training device according to the embodiment of the present disclosure, as shown in figure 3, the nerve net Road training device includes:
Processing module 31, for the sample image in training set to be inputted to the first nerves of N number of middle trained state respectively It is handled in network, obtains the first processing result of N number of middle trained state;
First training module 32, for being tied according to the first of the training set and N number of middle trained state the processing Fruit, training nervus opticus network,
Wherein, the nervus opticus network is the network for being handled image to be processed, the first nerves net Network is the network for training the nervus opticus network.
In one possible implementation, first training module 32, comprising:
First processing submodule, for the sample image in the training set to be inputted to the nervus opticus network of th state Middle processing, obtains the second processing of th state as a result, the th state is one in preset N number of physical training condition, and 1≤ i<N;
First-loss determines submodule, for the second processing knot according to the markup information of the sample image, th state First processing result of fruit and i-th of middle trained state determines first damage of the nervus opticus network under th state It loses;
Training submodule, for being trained according to the first-loss to the nervus opticus network, and will be after training Nervus opticus network be determined as the nervus opticus network of i+1 state.
In one possible implementation, the first nerves network includes M physical training condition, and M is integer and M > N, Described device further include:
Determining module, for determining the first of N number of middle trained state from the first nerves network of M physical training condition Neural network.
In one possible implementation, the determining module, comprising:
First determines submodule, for equal number of states interval to the first nerves network of M physical training condition into Row sampling, obtains the first nerves network of N number of middle trained state.
In one possible implementation, the determining module, comprising:
Second determines submodule, for randomly selecting N number of middle trained shape from the first nerves network of M physical training condition The first nerves network of state.
In one possible implementation, described device further include: the second training module, for according to the training set The training first nerves network,
Wherein, second training module, comprising:
Second processing submodule, for the sample image in the training set to be inputted to the first nerves network of m state Middle processing, obtains m-th of first processing results, and the m state is one in the M physical training condition, and 1≤m < M;
Second loses determining submodule, for according to the markup information of the sample image and m-th first processing knot Fruit determines the second loss of the first nerves network;
Network adjusting submodule, for adjusting the network parameter of the first nerves network, obtaining according to second loss To the first nerves network of m+1 state.
In one possible implementation, the image to be processed and the sample image include facial image, described The classification of nervus opticus network facial image for identification.
In accordance with an embodiment of the present disclosure, a kind of image processing apparatus is additionally provided, comprising: image processing module, being used for will It is handled in image input neural network to be processed, obtains processing result image, wherein the neural network includes according to above-mentioned The nervus opticus network that the training of device described in meaning one obtains.
In some embodiments, the embodiment of the present disclosure provides the function that has of device or comprising module can be used for holding The method of row embodiment of the method description above, specific implementation are referred to the description of embodiment of the method above, for sake of simplicity, this In repeat no more.
The embodiment of the present disclosure also proposes a kind of computer readable storage medium, is stored thereon with computer program instructions, institute It states when computer program instructions are executed by processor and realizes the above method.Computer readable storage medium can be non-volatile meter Calculation machine readable storage medium storing program for executing.
The embodiment of the present disclosure also proposes a kind of electronic equipment, comprising: processor;For storage processor executable instruction Memory;Wherein, the processor is configured to the above method.
The equipment that electronic equipment may be provided as terminal, server or other forms.
Fig. 4 shows the block diagram of a kind of electronic equipment 800 according to the embodiment of the present disclosure.For example, electronic equipment 800 can be Mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building are set It is standby, the terminals such as personal digital assistant.
Referring to Fig. 4, electronic equipment 800 may include following one or more components: processing component 802, memory 804, Power supply module 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, And communication component 816.
The integrated operation of the usual controlling electronic devices 800 of processing component 802, such as with display, call, data are logical Letter, camera operation and record operate associated operation.Processing component 802 may include one or more processors 820 to hold Row instruction, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more moulds Block, convenient for the interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, with Facilitate the interaction between multimedia component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in electronic equipment 800.These data Example include any application or method for being operated on electronic equipment 800 instruction, contact data, telephone directory Data, message, picture, video etc..Memory 804 can by any kind of volatibility or non-volatile memory device or it Combination realize, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable Except programmable read only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, fastly Flash memory, disk or CD.
Power supply module 806 provides electric power for the various assemblies of electronic equipment 800.Power supply module 806 may include power supply pipe Reason system, one or more power supplys and other with for electronic equipment 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between the electronic equipment 800 and user. In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch surface Plate, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touches Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding The boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, Multimedia component 808 includes a front camera and/or rear camera.When electronic equipment 800 is in operation mode, as clapped When taking the photograph mode or video mode, front camera and/or rear camera can receive external multi-medium data.It is each preposition Camera and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when electronic equipment 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone It is configured as receiving external audio signal.The received audio signal can be further stored in memory 804 or via logical Believe that component 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 814 includes one or more sensors, for providing the state of various aspects for electronic equipment 800 Assessment.For example, sensor module 814 can detecte the state that opens/closes of electronic equipment 800, the relative positioning of component, example As the component be electronic equipment 800 display and keypad, sensor module 814 can also detect electronic equipment 800 or The position change of 800 1 components of electronic equipment, the existence or non-existence that user contacts with electronic equipment 800, electronic equipment 800 The temperature change of orientation or acceleration/deceleration and electronic equipment 800.Sensor module 814 may include proximity sensor, be configured For detecting the presence of nearby objects without any physical contact.Sensor module 814 can also include optical sensor, Such as CMOS or ccd image sensor, for being used in imaging applications.In some embodiments, which may be used also To include acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between electronic equipment 800 and other equipment. Electronic equipment 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.Show at one In example property embodiment, communication component 816 receives broadcast singal or broadcast from external broadcasting management system via broadcast channel Relevant information.In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, short to promote Cheng Tongxin.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, electronic equipment 800 can be by one or more application specific integrated circuit (ASIC), number Word signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-volatile computer readable storage medium storing program for executing is additionally provided, for example including calculating The memory 804 of machine program instruction, above-mentioned computer program instructions can be executed by the processor 820 of electronic equipment 800 to complete The above method.
Fig. 5 shows the block diagram of a kind of electronic equipment 1900 according to the embodiment of the present disclosure.For example, electronic equipment 1900 can be with It is provided as a server.Referring to Fig. 5, it further comprises one or more that electronic equipment 1900, which includes processing component 1922, Processor and memory resource represented by a memory 1932, can be by the finger of the execution of processing component 1922 for storing It enables, such as application program.The application program stored in memory 1932 may include each one or more correspondence In the module of one group of instruction.In addition, processing component 1922 is configured as executing instruction, to execute the above method.
Electronic equipment 1900 can also include that a power supply module 1926 is configured as executing the power supply of electronic equipment 1900 Management, a wired or wireless network interface 1950 is configured as electronic equipment 1900 being connected to network and an input is defeated (I/O) interface 1958 out.Electronic equipment 1900 can be operated based on the operating system for being stored in memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
In the exemplary embodiment, a kind of non-volatile computer readable storage medium storing program for executing is additionally provided, for example including calculating The memory 1932 of machine program instruction, above-mentioned computer program instructions can by the processing component 1922 of electronic equipment 1900 execute with Complete the above method.
The disclosure can be system, method and/or computer program product.Computer program product may include computer Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the disclosure.
Computer readable storage medium, which can be, can keep and store the tangible of the instruction used by instruction execution equipment Equipment.Computer readable storage medium for example can be-- but it is not limited to-- storage device electric, magnetic storage apparatus, optical storage Equipment, electric magnetic storage apparatus, semiconductor memory apparatus or above-mentioned any appropriate combination.Computer readable storage medium More specific example (non exhaustive list) includes: portable computer diskette, hard disk, random access memory (RAM), read-only deposits It is reservoir (ROM), erasable programmable read only memory (EPROM or flash memory), static random access memory (SRAM), portable Compact disk read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, for example thereon It is stored with punch card or groove internal projection structure and the above-mentioned any appropriate combination of instruction.Calculating used herein above Machine readable storage medium storing program for executing is not interpreted that instantaneous signal itself, the electromagnetic wave of such as radio wave or other Free propagations lead to It crosses the electromagnetic wave (for example, the light pulse for passing through fiber optic cables) of waveguide or the propagation of other transmission mediums or is transmitted by electric wire Electric signal.
Computer-readable program instructions as described herein can be downloaded to from computer readable storage medium it is each calculate/ Processing equipment, or outer computer or outer is downloaded to by network, such as internet, local area network, wide area network and/or wireless network Portion stores equipment.Network may include copper transmission cable, optical fiber transmission, wireless transmission, router, firewall, interchanger, gateway Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment are received from network to be counted Calculation machine readable program instructions, and the computer-readable program instructions are forwarded, for the meter being stored in each calculating/processing equipment In calculation machine readable storage medium storing program for executing.
Computer program instructions for executing disclosure operation can be assembly instruction, instruction set architecture (ISA) instructs, Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming languages The source code or object code that any combination is write, the programming language include the programming language-of object-oriented such as Smalltalk, C++ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer Readable program instructions can be executed fully on the user computer, partly execute on the user computer, be only as one Vertical software package executes, part executes on the remote computer or completely in remote computer on the user computer for part Or it is executed on server.In situations involving remote computers, remote computer can pass through network-packet of any kind It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).In some embodiments, by utilizing computer-readable program instructions Status information carry out personalized customization electronic circuit, such as programmable logic circuit, field programmable gate array (FPGA) or can Programmed logic array (PLA) (PLA), the electronic circuit can execute computer-readable program instructions, to realize each side of the disclosure Face.
Referring herein to according to the flow chart of the method, apparatus (system) of the embodiment of the present disclosure and computer program product and/ Or block diagram describes various aspects of the disclosure.It should be appreciated that flowchart and or block diagram each box and flow chart and/ Or in block diagram each box combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to general purpose computer, special purpose computer or other programmable datas The processor of processing unit, so that a kind of machine is produced, so that these instructions are passing through computer or other programmable datas When the processor of processing unit executes, function specified in one or more boxes in implementation flow chart and/or block diagram is produced The device of energy/movement.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to It enables so that computer, programmable data processing unit and/or other equipment work in a specific way, thus, it is stored with instruction Computer-readable medium then includes a manufacture comprising in one or more boxes in implementation flow chart and/or block diagram The instruction of the various aspects of defined function action.
Computer-readable program instructions can also be loaded into computer, other programmable data processing units or other In equipment, so that series of operation steps are executed in computer, other programmable data processing units or other equipment, to produce Raw computer implemented process, so that executed in computer, other programmable data processing units or other equipment Instruct function action specified in one or more boxes in implementation flow chart and/or block diagram.
The flow chart and block diagram in the drawings show system, method and the computer journeys according to multiple embodiments of the disclosure The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation One module of table, program segment or a part of instruction, the module, program segment or a part of instruction include one or more use The executable instruction of the logic function as defined in realizing.In some implementations as replacements, function marked in the box It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.
The presently disclosed embodiments is described above, above description is exemplary, and non-exclusive, and It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill Many modifications and changes are obvious for the those of ordinary skill in art field.The selection of term used herein, purport In the principle, practical application or improvement to the technology in market for best explaining each embodiment, or make the art Other those of ordinary skill can understand each embodiment disclosed herein.

Claims (10)

1. a kind of neural network training method, which is characterized in that the described method includes:
Sample image in training set is inputted in the first nerves network of N number of middle trained state respectively and handled, obtained in N number of Between physical training condition the first processing result;
According to the training set and the first processing result of N number of middle trained state, nervus opticus network is trained,
Wherein, the nervus opticus network is the network for being handled image to be processed, and the first nerves network is For training the network of the nervus opticus network.
2. the method according to claim 1, wherein according to the training set and N number of middle trained shape First processing result of state, training nervus opticus network, comprising:
It will be handled in the nervus opticus network of sample image input th state in the training set, obtain the second of th state Processing result, the th state are one in preset N number of physical training condition, and 1≤i < N;
According to the of the markup information of the sample image, the second processing result of th state and i-th of middle trained state One processing result determines first-loss of the nervus opticus network under th state;
The nervus opticus network is trained according to the first-loss, and the nervus opticus network after training is determined as The nervus opticus network of i+1 state.
3. method according to claim 1 or 2, which is characterized in that the first nerves network includes M physical training condition, M For integer and M > N, the method also includes:
The first nerves network of N number of middle trained state is determined from the first nerves network of M physical training condition.
4. according to the method described in claim 3, it is characterized in that, determining N from the first nerves network of M physical training condition The first nerves network of a middle trained state, comprising:
It is sampled with first nerves network of the equal number of states interval to M physical training condition, obtains N number of middle trained shape The first nerves network of state.
5. according to the method described in claim 3, it is characterized in that, determining N from the first nerves network of M physical training condition The first nerves network of a middle trained state, comprising:
The first nerves network of N number of middle trained state is randomly selected from the first nerves network of M physical training condition.
6. a kind of image processing method, which is characterized in that the described method includes:
Image to be processed is inputted in neural network and is handled, processing result image is obtained,
Wherein, the neural network includes the second mind that the training of method described in any one of -5 according to claim 1 obtains Through network.
7. a kind of neural metwork training device characterized by comprising
Processing module, for inputting the sample image in training set respectively in the first nerves network of N number of middle trained state Processing, obtains the first processing result of N number of middle trained state;
First training module, for the first processing result according to the training set and N number of middle trained state, training Nervus opticus network,
Wherein, the nervus opticus network is the network for being handled image to be processed, and the first nerves network is For training the network of the nervus opticus network.
8. a kind of image processing apparatus, which is characterized in that described device includes:
Image processing module handles for inputting image to be processed in neural network, obtains processing result image,
Wherein, the neural network includes the nervus opticus network that device training according to claim 7 obtains.
9. a kind of electronic equipment characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: perform claim require any one of 1 to 5 described in method.
10. a kind of computer readable storage medium, is stored thereon with computer program instructions, which is characterized in that the computer Method described in any one of claim 1 to 5 is realized when program instruction is executed by processor.
CN201910138574.8A 2019-02-25 2019-02-25 Neural network training method and device and image processing method and device Active CN109919300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910138574.8A CN109919300B (en) 2019-02-25 2019-02-25 Neural network training method and device and image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910138574.8A CN109919300B (en) 2019-02-25 2019-02-25 Neural network training method and device and image processing method and device

Publications (2)

Publication Number Publication Date
CN109919300A true CN109919300A (en) 2019-06-21
CN109919300B CN109919300B (en) 2021-03-05

Family

ID=66962246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910138574.8A Active CN109919300B (en) 2019-02-25 2019-02-25 Neural network training method and device and image processing method and device

Country Status (1)

Country Link
CN (1) CN109919300B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472681A (en) * 2019-08-09 2019-11-19 北京市商汤科技开发有限公司 The neural metwork training scheme and image procossing scheme of knowledge based distillation
CN110569709A (en) * 2019-07-16 2019-12-13 浙江大学 Scene analysis method based on knowledge reorganization
CN111191722A (en) * 2019-12-30 2020-05-22 支付宝(杭州)信息技术有限公司 Method and device for training prediction model through computer
CN111242303A (en) * 2020-01-14 2020-06-05 北京市商汤科技开发有限公司 Network training method and device, and image processing method and device
CN111428613A (en) * 2020-03-19 2020-07-17 北京市商汤科技开发有限公司 Data processing method, device, equipment and storage medium
CN112541577A (en) * 2020-12-16 2021-03-23 上海商汤智能科技有限公司 Neural network generation method and device, electronic device and storage medium
WO2021077529A1 (en) * 2019-10-24 2021-04-29 北京小米智能科技有限公司 Neural network model compressing method, corpus translation method and device thereof
CN112825143A (en) * 2019-11-20 2021-05-21 北京眼神智能科技有限公司 Deep convolutional neural network compression method, device, storage medium and equipment
CN113660038A (en) * 2021-06-28 2021-11-16 华南师范大学 Optical network routing method based on deep reinforcement learning and knowledge distillation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898168A (en) * 2018-06-19 2018-11-27 清华大学 The compression method and system of convolutional neural networks model for target detection
CN108921294A (en) * 2018-07-11 2018-11-30 浙江大学 A kind of gradual piece of knowledge distillating method accelerated for neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898168A (en) * 2018-06-19 2018-11-27 清华大学 The compression method and system of convolutional neural networks model for target detection
CN108921294A (en) * 2018-07-11 2018-11-30 浙江大学 A kind of gradual piece of knowledge distillating method accelerated for neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GEOFFREY HINTON等: "Distilling the Knowledge in a Neural Network", 《ARXIV:1503.02531V1》 *
YOSHUA BENGIO等: "Curriculum Learning", 《ICML 09:PROCEEDINGS OF THE 26TH ANNUAL INTERNATIONAL CONFERENCE ON MACHINE LEARNING》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569709A (en) * 2019-07-16 2019-12-13 浙江大学 Scene analysis method based on knowledge reorganization
CN110472681A (en) * 2019-08-09 2019-11-19 北京市商汤科技开发有限公司 The neural metwork training scheme and image procossing scheme of knowledge based distillation
US11556723B2 (en) 2019-10-24 2023-01-17 Beijing Xiaomi Intelligent Technology Co., Ltd. Neural network model compression method, corpus translation method and device
WO2021077529A1 (en) * 2019-10-24 2021-04-29 北京小米智能科技有限公司 Neural network model compressing method, corpus translation method and device thereof
CN112825143A (en) * 2019-11-20 2021-05-21 北京眼神智能科技有限公司 Deep convolutional neural network compression method, device, storage medium and equipment
CN111191722A (en) * 2019-12-30 2020-05-22 支付宝(杭州)信息技术有限公司 Method and device for training prediction model through computer
CN111191722B (en) * 2019-12-30 2022-08-09 支付宝(杭州)信息技术有限公司 Method and device for training prediction model through computer
CN111242303A (en) * 2020-01-14 2020-06-05 北京市商汤科技开发有限公司 Network training method and device, and image processing method and device
CN111242303B (en) * 2020-01-14 2023-12-01 北京市商汤科技开发有限公司 Network training method and device, and image processing method and device
CN111428613A (en) * 2020-03-19 2020-07-17 北京市商汤科技开发有限公司 Data processing method, device, equipment and storage medium
CN112541577A (en) * 2020-12-16 2021-03-23 上海商汤智能科技有限公司 Neural network generation method and device, electronic device and storage medium
CN113660038A (en) * 2021-06-28 2021-11-16 华南师范大学 Optical network routing method based on deep reinforcement learning and knowledge distillation
CN113660038B (en) * 2021-06-28 2022-08-02 华南师范大学 Optical network routing method based on deep reinforcement learning and knowledge distillation

Also Published As

Publication number Publication date
CN109919300B (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN109919300A (en) Neural network training method and device and image processing method and device
CN109800737A (en) Face recognition method and device, electronic equipment and storage medium
CN110348537A (en) Image processing method and device, electronic equipment and storage medium
CN110210535A (en) Neural network training method and device and image processing method and device
CN109800744A (en) Image clustering method and device, electronic equipment and storage medium
CN109089133A (en) Method for processing video frequency and device, electronic equipment and storage medium
CN109801270A (en) Anchor point determines method and device, electronic equipment and storage medium
CN109241835A (en) Image processing method and device, electronic equipment and storage medium
CN110287874A (en) Target tracking method and device, electronic equipment and storage medium
CN109614613A (en) The descriptive statement localization method and device of image, electronic equipment and storage medium
CN110909815B (en) Neural network training method, neural network training device, neural network processing device, neural network training device, image processing device and electronic equipment
CN109165738A (en) Optimization method and device, electronic equipment and the storage medium of neural network model
CN109766954A (en) A kind of target object processing method, device, electronic equipment and storage medium
CN109816764A (en) Image generating method and device, electronic equipment and storage medium
CN109783256A (en) Artificial intelligence tutoring system and method, electronic equipment, storage medium
CN109543537A (en) Weight identification model increment training method and device, electronic equipment and storage medium
CN109145213A (en) Inquiry recommended method and device based on historical information
CN109858614A (en) Neural network training method and device, electronic equipment and storage medium
CN110458218A (en) Image classification method and device, sorter network training method and device
CN109635920A (en) Neural network optimization and device, electronic equipment and storage medium
CN109978891A (en) Image processing method and device, electronic equipment and storage medium
CN110188865A (en) Information processing method and device, electronic equipment and storage medium
CN109902738A (en) Network module and distribution method and device, electronic equipment and storage medium
CN110245757A (en) A kind of processing method and processing device of image pattern, electronic equipment and storage medium
CN109145970A (en) Question and answer treating method and apparatus, electronic equipment and storage medium based on image

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