CN108710945A - Downsapling method, device and the computer equipment of deep neural network - Google Patents

Downsapling method, device and the computer equipment of deep neural network Download PDF

Info

Publication number
CN108710945A
CN108710945A CN201810421634.2A CN201810421634A CN108710945A CN 108710945 A CN108710945 A CN 108710945A CN 201810421634 A CN201810421634 A CN 201810421634A CN 108710945 A CN108710945 A CN 108710945A
Authority
CN
China
Prior art keywords
signal
sampling
bulk
input signal
neural network
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.)
Pending
Application number
CN201810421634.2A
Other languages
Chinese (zh)
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.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology 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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201810421634.2A priority Critical patent/CN108710945A/en
Publication of CN108710945A publication Critical patent/CN108710945A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

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

Abstract

The present invention provides a kind of Downsapling method of deep neural network, device and computer equipment, to solve the technical issues of information is lost during deep neural network down-sampling in existing way.The method includes step:Obtain the input signal of multiple dimensions, wherein the dimension includes first passage number and the first bulk;According to the first passage number, first bulk and setting ratio, determine second channel number and second space size, wherein, the first passage number is equal with the second channel number and the product of second space size with the product of first bulk, and first bulk is more than the second space size;According to the second channel number and the second space size, down-sampling is carried out to the input signal, obtains the output signal after down-sampling.The embodiment of the present invention can carry out the down-sampling of deep neural network in the case where keeping all pixels information.

Description

Downsapling method, device and the computer equipment of deep neural network
Technical field
The present invention relates to field of computer technology, specifically, the present invention relates to a kind of down-samplings of deep neural network Method, apparatus and computer equipment.
Background technology
In time closely less than 10 years, artificial intelligence achieves huge progress.And such progress is mainly by depth Deep neural network pushes in other words for study.Deep learning is a kind of machine learning method of stacked multilayer neural network. Since the number of plies of neural network is more much more than traditional method number of plies, therefore referred to as deep learning.Numbers are trained with a large amount of in recent years According to the raising of the possibility and computer calculated performance (the mainly calculated performance of video card) of acquisition, training large size deep learning Model is possibly realized.With the development of deep learning algorithm, deep learning has all reached state-of-the-art level in many fields.Example Such as image recognition, image segmentation and natural language processing field.
Since deep neural network volume is larger, if carrying out down-sampling to input signal without Downsapling method appropriate To reduce occupancy demand of the deep neural network to memory, many deep neural networks can not be all trained.It adopts below The method of sample is very important a part for deep neural network, it may also be said to, the basic frame of deep neural network Input signal is exactly gradually carried out down-sampling by structure, is continuously available the abstract characteristics after converting and is used again.
The Downsapling method of deep neural network includes that the step-length (stride) of convolution is set greater than 1, maximum at present It is worth pond (max pooling) and average value pond (average pooling) etc..But above-mentioned three kinds of methods can all lead to letter The loss of breath causes deep neural network performance poor.
Invention content
The present invention is directed to the problem of information is lost during deep neural network down-sampling in existing way, proposes a kind of depth Downsapling method, device and the computer equipment for spending neural network, to carry out depth in the case where keeping all pixels information The down-sampling of neural network improves the performance of deep neural network.
The embodiment of the present invention provides a kind of Downsapling method of deep neural network according to the first aspect, including Step:
Obtain the input signal of multiple dimensions, wherein the dimension includes first passage number and the first bulk;
According to the first passage number, first bulk and setting ratio, second channel number and the second sky are determined Between size, wherein the product of the first passage number and first bulk and the second channel number and described second The product of bulk is equal, and first bulk is more than the second space size;
According to the second channel number and the second space size, down-sampling is carried out to the input signal, under acquisition Output signal after sampling.
In one embodiment, described according to the first passage number, first bulk and setting ratio, it determines Second channel number and second space size, including:
By the first passage number with it is described setting ratio Nth power is multiplied, obtain second channel number, wherein N for more than Positive integer equal to 1;
First bulk and the Nth power of the setting ratio are divided by, second space size is obtained.
In one embodiment, first bulk includes first level direction size and the first vertical direction ruler Very little, the second space size includes the second horizontal direction size and the second vertical direction size;
It is described that first bulk and the Nth power of the setting ratio are divided by, second space size is obtained, is wrapped It includes:
First level direction size and the X powers of the setting ratio are divided by, the second horizontal direction size is obtained, Wherein, X is the positive integer less than or equal to N;
The first vertical direction size and (N-X) power of the setting ratio are divided by, the second vertical direction is obtained Size.
In one embodiment, the N is 2, and the X is 1.
In one embodiment, described according to the second channel number and the second space size, the input is believed Number carry out down-sampling, obtain down-sampling after output signal, including:
It is successively read from the input signal and the equal number of pixel of second channel number;
Each pixel of reading is stored in one by one in the corresponding signal of each second channel;
The corresponding signal of each second channel obtained after the input signal all pixels will be gone through to stack, formed Output signal after down-sampling.
In one embodiment, described according to the second channel number and the second space size, the input is believed Number carry out down-sampling, obtain down-sampling after output signal, including:
It is successively read from the input signal and the equal number of pixel of second space size;
A signal for not storing pixel, each picture that will be successively read are chosen from the corresponding signal of each second channel Element is stored in the signal of selection one by one;
The each signal obtained after the input signal all pixels will be gone through to stack, it is defeated after formation down-sampling Go out signal.
In one embodiment, described according to the second channel number and the second space size, the input is believed Number carry out down-sampling, obtain down-sampling after output signal, including:
The pixel of preset number is successively read from the input signal;
It is chosen from the corresponding signal of each second channel there are the signal of empty position, each pixel one that will be successively read One is stored in the signal of selection;
The each signal obtained after the input signal all pixels will be gone through to stack, it is defeated after formation down-sampling Go out signal.
The embodiment of the present invention additionally provides a kind of downsampling device of deep neural network according to the second aspect, packet It includes:
Input signal acquisition module, the input signal for obtaining multiple dimensions, wherein the dimension includes first passage Number and the first bulk;
Dimension determining module, for according to the first passage number, first bulk and setting ratio, determining the Two port numbers and second space size, wherein the product and described second of the first passage number and first bulk The product of port number and the second space size is equal, and first bulk is more than the second space size;
Down sample module, for according to the second channel number and the second space size, to the input signal into Row down-sampling obtains the output signal after down-sampling.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, stores thereon according in terms of third There is computer program, which realizes the down-sampling side of the deep neural network described in above-mentioned any one when being executed by processor Method.
The embodiment of the present invention additionally provides a kind of computer equipment, the computer equipment packet according to the 4th aspect It includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processing Device realizes the Downsapling method of the deep neural network described in above-mentioned any one.
Downsapling method, device and the computer equipment of above-mentioned deep neural network, the first bulk is compressed to First passage number is extended to second channel number by second space size, and the product of first passage number and the first bulk with The product of second channel number and second space size is equal, therefore by resetting the Pixel Information above spatial domain to channel region Above, so that it may to realize the down-sampling to input signal in the case where keeping all pixels information, efficiently solve depth god The problem of being lost through information during network down-sampling, improves performance and the performance of neural network.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description Obviously, or practice through the invention is recognized.
Description of the drawings
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, wherein:
Fig. 1 is the flow diagram of the Downsapling method of the deep neural network of one embodiment of the invention;
Fig. 2 is the schematic diagram of the input signal and the output signal after down-sampling of one embodiment of the invention;
Fig. 3 is the schematic diagram of the output signal preparation method after the down-sampling of one embodiment of the invention;
Fig. 4 is the schematic diagram of the output signal preparation method after the down-sampling of another embodiment of the present invention;
Fig. 5 is the schematic diagram of the output signal preparation method after the down-sampling of another embodiment of the present invention;
Fig. 6 is the structural schematic diagram of the lower device for picking of the deep neural network of one embodiment of the invention;
Fig. 7 is the structural schematic diagram of the computer equipment of one embodiment of the invention.
Specific implementation mode
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that is used in the specification of the present invention arranges It refers to there are the feature, integer, step, operation, element and/or component, but it is not excluded that presence or addition to take leave " comprising " Other one or more features, integer, step, operation, element, component and/or their group.It is to be further understood that " first " and " second " used herein are only used for distinguishing same technical term, not to the sequence of the technical term and quantity etc. It is defined.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific terminology), there is meaning identical with the general understanding of the those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless by specific definitions as here, the meaning of idealization or too formal otherwise will not be used To explain.
It is necessary to first the research background of the present invention, technical concept and its application scenarios are carried out with following guiding explanation.
The Downsapling method of deep neural network includes mainly that the step-length (stride) of convolution is set greater than 1 at present, Maximum value pond (max pooling) and average value pond (average pooling).For by the step-length (stride) of convolution Be set greater than 1 Downsapling method, following formula illustrate input signal X obtained by a convolution algorithm (weight W) it is defeated Go out the process of Y:
Wherein, s indicates step-length, and when s is more than 1, the bulk ratio X for exporting Y is small, after then having obtained down-sampling Signal.But the increase in sampling interval so that certain patterns of input layer can be missed, and lead to the loss of Pixel Information.And pond Change (pooling) and only act on input signal with the sliding window of a particular size, (max is maximized in each position Pooling) or average value (average pooling), to obtain output signal, the ginseng that pond layer can not learn Number, and because be only maximized or average value, each many Pixel Informations of pond window are lost.
For deep neural network existing for above-mentioned three kinds of modes Downsapling method there are the defect that Pixel Information is lost, The embodiment of the present invention carries out down-sampling using the method for the rearrangement of pixel and the transformation of dimension, by the pixel above original space domain Information is reset to above channel region, then can not lost using whole Pixel Informations, realization during down-sampling Down-sampling is carried out to input signal in the case of Pixel Information, greatly improves the receptive field (receptive of deep neural network Field), detailed information and is remained simultaneously, to improving performance and the performance of deep neural network, huge compression depth The calculation amount of neural network.
A lot of product functions have used deep neural network at present, for example, many technologies that noise small video is used are all Based on deep learning in other words deep neural network, many functions in yy live streamings, such as super-resolution, stingy figure and gesture Identification etc. has all used deep learning deep neural network in other words.So using depth provided in an embodiment of the present invention nerve The Downsapling method of network can improve the performance of Related product function, reduce the volume of Related product so that it can be deployed to The operation that mobile terminal smoothness is stablized.For example, the deep neural network that uses is adopted using under this in the outdoor scene segmentation of yy live streamings Quadrat method can obtain the model that performance is good, small and small calculation amount, can the deep neural network be deployed to mobile terminal And smooth stable operation.
Below in conjunction with the accompanying drawings, the specific implementation mode of the present invention is described in detail.
As shown in Figure 1, in one embodiment, a kind of Downsapling method of deep neural network, including step:
S110, the input signal for obtaining multiple dimensions, wherein the dimension includes first passage number and the first space ruler It is very little.
Input signal is to input the signal of deep neural network, and the application scenarios of deep neural network are different, input signal Form it is different, for example, for deep neural network be broadcast live in product, usually picture signal that input signal refers to. Input signal has multiple dimensions, and one is port number, the other is bulk, in general, bulk refer to level The size in size and vertical direction on direction that is to say wide and high.By taking picture signal as an example, the picture signal of input has three A dimension (c, h, w), i.e. port number c, high h and width w.
S120, according to the first passage number, first bulk and setting ratio, determine second channel number and the Two bulks, wherein the product of the first passage number and first bulk and the second channel number and described The product of second space size is equal, and first bulk is more than the second space size.
Setting ratio can be configured according to actual needs, for example, setting ratio as 2.Determine second channel number and When second space size, the product and second channel number and second space ruler that ensure first passage number and the first bulk are needed Very little product is equal, that is to say and ensures that the total number of pixel is constant.By compressing the first bulk, (i.e. by original space domain Dimension is bulk) Pixel Information above resets to channel region (i.e. dimension is port number), so that it may not lost in guarantee Down-sampling is carried out to input signal in the case of Pixel Information.
S130, input signal progress down-sampling is obtained according to the second channel number and the second space size Obtain the output signal after down-sampling.
After determining second channel number and second space size, so that it may with according to the second channel number and second space size To all pixels of input signal into rearrangement, the output signal after down-sampling is obtained.
The present embodiment carries out down-sampling in the case where keeping all pixels information to the first bulk of input signal, First bulk can be down sampled to the size of very little, therefore the receptive field of deep neural network can be carried greatly Height, so as to allow deep neural network to learn to more global informations.In addition, due to the pixel letter above original space domain Breath is reset and has been arrived above channel region, and each receptive field not only obtains more global informations, and can touch more thin Save information.
In the case where keeping pixel total number constant, determine that second channel number and the mode of second space size have very It is more.For example, in one embodiment, it is described according to the first passage number, first bulk and setting ratio, it determines Second channel number and second space size, including:
S121, the first passage number is multiplied with the Nth power of the setting ratio, obtains second channel number, wherein N For the positive integer more than or equal to 1.
In view of the number of pixel is positive integer, so optionally, setting ratio as the positive integer more than 1, N is in addition to meeting Except the positive integer more than or equal to 1, it is also necessary to meet the first bulk and set result that the Nth power of ratio is divided by as just Integer.For example, the dimension of input signal is (1,64), set ratio as 2, then N can be 2 or 4 etc..
First passage number is multiplied with the Nth power of setting ratio, so that it may to obtain second channel number.For example, first passage Number is 1, sets ratio as 2, N 2, then second channel number is 1*22=4.
S122, first bulk and the Nth power of the setting ratio are divided by, obtain second space size.
The Nth power of first bulk and setting ratio is divided by, so that it may to obtain second space size.For example, first Bulk is 64, sets ratio as 2, N 2, then second channel number is 64/22=16.
In one embodiment, first bulk includes first level direction size and the first vertical direction ruler Very little, the second space size includes the second horizontal direction size and the second vertical direction size;It is described by first space Size and the Nth power of the setting ratio are divided by, and second space size is obtained, including:
S1221, first level direction size and the X powers of the setting ratio are divided by, obtain the second level side To size, wherein X is the positive integer less than or equal to N.
In view of the number of pixel is positive integer, so need to meet in the value for determining X, first level direction size with The result that the X powers for setting ratio are divided by is positive integer, (N-X) power phase of the first vertical direction size and setting ratio The result removed is positive integer.
First level direction size and the X powers of the setting ratio are divided by, so that it may to obtain the second level side To size.For example, first level direction size is 8, ratio is set as 2, N 2, X 1, then the second horizontal direction size is 8/ 21=4.
S1222, the first vertical direction size and (N-X) power of the setting ratio are divided by, it is perpendicular obtains second Histogram is to size.
The first vertical direction size and (N-X) power of the setting ratio are divided by, so that it may perpendicular to obtain second Histogram is to size.For example, the first vertical direction size is 8, ratio is set as 2, N 2, X 1, then the second vertical direction size It is 8/21=4.
Optionally, the N is 2, and the X is 1.For example, input signal, there are three dimension (c, h, w), port number c is high It is w for h and width, then:
(c,h,w)->(c,(h/r)*r,(w/r)*r)->(c*r2,h/r,w/r)
The present embodiment is down sampled to the high h of input signal and width w in the case where keeping all pixels information original 1/r.Since the method for this down-sampling can ensure that no Pixel Information is lost, r can compare larger, and such h and w can be with It is down sampled to the size of very little.The benefit brought in this way, which is exactly the receptive field of network, to be greatly improved.Improve impression Open country can allow e-learning to more global informations.Lead in addition, having been arrived due to the Pixel Information rearrangement above original space domain Above road domain, each receptive field not only obtains more global informations, and can touch more detailed information.
In order to better understand the present invention, it is illustrated below with a specific example.
Fig. 2 gives the example of a r=2.From the input signal (left figure) that a dimension is (1,8,8) by twice Down-sampling is converted to the output signal (right figure) that dimension is (4,4,4).The number 1*8*8=4*4*4 of pixel is remained unchanged.Right figure The receptive field of dashed box corresponds to left figure gray portion, and receptive field increases twice.Therefore down-sampling side provided in an embodiment of the present invention Method does not have Pixel Information loss in down-sampling, and receptive field expands.This has pole to the performance for improving deep neural network Big help.If using the r values of bigger, receptive field will get a greater increase.
The detailed process of the output signal after obtaining down-sampling is described in detail with reference to several embodiments, should manage Solution, the present invention is not restricted to following manner, after determining second channel number and second space size, can also take other sides The formula pixel all to input signal is into rearrangement, to obtain the output signal after down-sampling.
In one embodiment, described according to the second channel number and the second space size, the input is believed Number carry out down-sampling, obtain down-sampling after output signal, including:
S131, it is successively read from the input signal and the equal number of pixel of second channel number.
Assuming that second channel number is c, then c pixel is first read from input signal, after the completion of step S132, then from input C pixel is read in the residual pixel of signal, and so on, until pixel all in input signal is read.
Reading the sequence of pixel can be determined according to actual needs, for example, can be according to line number from low to high suitable Sequence is successively read, and can also be successively read, can also be successively read in the way of region unit according to the sequence of columns from low to high It takes, wherein the region unit not only includes some pixels of certain a line, further includes the pixel adjacent with those pixel vertical directions.
S132, each pixel of reading is stored in one by one in the corresponding signal of each second channel.
It reads with after the equal number of pixel of second channel number, these pixels is respectively stored into each second channel In corresponding signal, a pixel is stored in the corresponding signal of each second channel.The sequence of each signal storage pixel can To be determined according to actual needs, for example, can be stored according to the sequence of line number from low to high, it can also be according to columns Sequence from low to high is stored, and can also be stored according to the storage rule of other settings.
S133, the corresponding signal progress heap of each second channel obtained after the input signal all pixels will be gone through It is folded, form the output signal after down-sampling.
After obtaining the corresponding signal of each second channel, these signals are stacked up, just form the output that port number is c Signal.
It is illustrated with an example.As shown in figure 3, being adopted under the signal that a dimension is (1,8,8) is passed through twice Sample is converted to dimension:First from the upper left corner of left figure, (having filling content part) reads four Then four pixels are corresponded the shown position (having filling location of content) for being aligned to four signals of right figure by pixel.So Four pixels are read from the upper left corner adjacent area of left figure again afterwards, four pixel one-to-one correspondence are then aligned to right figure four The adjacent position of the shown position of signal.And so on, until all signals are filled and finish.Four signal heaps in right figure Gather into folds the output signal for just forming that port number is 4.
In another embodiment, described according to the second channel number and the second space size, to the input Signal carries out down-sampling, obtains the output signal after down-sampling, including:
S13-1, it is successively read from the input signal and the equal number of pixel of second space size.
Assuming that second space size is m, then m pixel is first read from input signal, after the completion of step S13-3, then from M pixel is read in the residual pixel of input signal, and so on, until pixel all in input signal is read.
Reading the sequence of pixel can be determined according to actual needs, for example, can be according to line number from low to high suitable Sequence is successively read, and can also be successively read, can also be successively read in the way of region unit according to the sequence of columns from low to high It takes, wherein the region unit not only includes some pixels of certain a line, further includes the pixel adjacent with those pixel vertical directions.
S13-2, a signal for not storing pixel is chosen from the corresponding signal of each second channel, by what is be successively read Each pixel is stored in the signal of selection one by one.
Due to the present embodiment be take be read m pixel, the m pixel is once then filled up into a signal, institute Rule whether can not also store any pixel according to signal is chosen.For example, there are four second channels altogether The signal of signal, four second channels does not store pixel, then can arbitrarily choose a signal, if a signal is Pixel is stored, then can choose a signal from remaining three signals.
It reads with after the equal number of pixel of second space size, those pixels is stored in the signal of selection.It is depositing It can directly be stored according to the arrangement mode of these pixels in the input signal when storage, it can also be in storage to these pictures Element is defined into rearrangement, the present invention not to this.
S13-3, each signal obtained after the input signal all pixels will be gone through stack, formed down-sampling it Output signal afterwards.
After obtaining the corresponding signal of each second channel, these signals are stacked up, it is just defeated after formation down-sampling Go out signal.
It is illustrated with an example.As shown in figure 4, being adopted under the signal that a dimension is (1,8,8) is passed through twice Sample is converted to dimension:First from the upper left corner of left figure, (having filling content part) reads 16 Pixel chooses a signal for not storing pixel from four signals in right figure, such as first signal in right figure, then will 16 pixel correspondences are aligned in first signal.Then 16 pixels are read from the upper left corner adjacent area of left figure again, from A signal is chosen in remaining three signals of right figure, it then will be in 16 pixel arrangements to the signal of selection.And so on, Until all signals are filled and finish.Four signals in right figure are stacked up the output signal for just forming that port number is 4.
In another embodiment, described according to the second channel number and the second space size, to the input Signal carries out down-sampling, obtains the output signal after down-sampling, including:
S13a, the pixel that preset number is successively read from the input signal.
Preset number n can be set according to actual needs.N pixel, step S13c are first read from input signal After the completion, then from the residual pixel of input signal n pixel is read, and so on, until pixel all in input signal It is read.
Reading the sequence of pixel can be determined according to actual needs, for example, can be according to line number from low to high suitable Sequence is successively read, and can also be successively read, can also be successively read in the way of region unit according to the sequence of columns from low to high It takes, wherein the region unit not only includes some pixels of certain a line, further includes the pixel adjacent with those pixel vertical directions.
S13b, there are the signals of empty position for selection from each second channel corresponding signal, each by what is be successively read Pixel is stored in the signal of selection one by one.
There are empty positions to refer to also having position not store pixel in signal.There are many kinds of the modes of selection, for example, if Only existing a signal, there are empty positions, then directly choose the signal, and if there is multiple signals, there are empty positions, can be from this Choose that empty position is most, two signals etc. in can accommodate n pixel or multiple signals in multiple signals, The present invention defines not to this.
After reading n pixel, those pixels are stored in the signal of selection.It can exist according to these pixels in storage Arrangement mode in input signal is directly stored, can also storage when to these pixels into rearrangement, the present invention is not This is defined.
S13c, each signal obtained after the input signal all pixels will be gone through stack, formed down-sampling it Output signal afterwards.
After obtaining the corresponding signal of each second channel, these signals are stacked up, it is just defeated after formation down-sampling Go out signal.
It is illustrated with an example.As shown in figure 5, being adopted under the signal that a dimension is (1,8,8) is passed through twice Sample is converted to dimension:8 pixels first are read from the upper left corner of left figure, from four in right figure A signal for not storing pixel is chosen in a signal, and such as first signal in right figure, 8 pixels are then corresponded into arrangement Into first signal.And so on, it is elected to after getting 8 pixels for having filling content part shown in left figure, it is surplus from right figure A signal is chosen in three remaining signals, such as second signal in right figure, then by 8 pixel arrangements to the letter of selection In number.And so on, until all signals are filled and finish.Four signals in right figure, which are stacked up, just forms port number For 4 output signal.
Based on same inventive concept, the present invention also provides a kind of downsampling devices of deep neural network, with reference to attached The specific implementation mode of apparatus of the present invention is described in detail in figure.
As shown in fig. 6, in one embodiment, a kind of downsampling device of deep neural network, including:
Input signal acquisition module 110, the input signal for obtaining multiple dimensions, wherein the dimension includes first Port number and the first bulk;
Dimension determining module 120 is used for according to the first passage number, first bulk and setting ratio, really Determine second channel number and second space size, wherein the product of the first passage number and first bulk with it is described The product of second channel number and the second space size is equal, and first bulk is more than the second space size;
Down sample module 130 is used for according to the second channel number and the second space size, to the input signal Down-sampling is carried out, the output signal after down-sampling is obtained.
In one embodiment, dimension determining module 120 includes:
Port number determination unit obtains second for the first passage number to be multiplied with the Nth power of the setting ratio Port number, wherein N is the positive integer more than or equal to 1;
Bulk determination unit is obtained for first bulk and the Nth power of the setting ratio to be divided by Second space size.
In one embodiment, first bulk includes first level direction size and the first vertical direction ruler Very little, the second space size includes the second horizontal direction size and the second vertical direction size;Bulk determination unit is used It is divided by by first level direction size and the X powers of the setting ratio, obtains the second horizontal direction size, wherein X For the positive integer less than or equal to N;The first vertical direction size and (N-X) power of the setting ratio are divided by, obtained Second vertical direction size.
In one embodiment, the N is 2, and the X is 1.
In one embodiment, down sample module 130 includes:
Pixel reading unit, for being successively read from the input signal and the equal number of picture of second channel number Element;
Pixel storage location, for each pixel read to be stored in one by one in the corresponding signal of each second channel;
Output signal obtaining unit, for each second channel pair obtained after the input signal all pixels will to be gone through The signal answered is stacked, and the output signal after down-sampling is formed.
In another embodiment, down sample module 130 includes:
Pixel reading unit, it is equal number of with the second space size for being successively read from the input signal Pixel;
Pixel storage location, for choosing a signal for not storing pixel from the corresponding signal of each second channel, Each pixel of reading is stored in the signal of selection one by one;
Output signal obtaining unit carries out heap for that will go through each signal obtained after the input signal all pixels It is folded, form the output signal after down-sampling.
In another embodiment, down sample module 130 includes:
Pixel reading unit, the pixel for being successively read preset number from the input signal;
Pixel storage location, for from the corresponding signal of each second channel choose there are the signals of empty position, will read The each pixel taken is stored in the signal of selection one by one;
Output signal obtaining unit carries out heap for that will go through each signal obtained after the input signal all pixels It is folded, form the output signal after down-sampling.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored thereon with computer program, the program The Downsapling method of the deep neural network described in above-mentioned any one is realized when being executed by processor.Wherein, the storage is situated between Matter includes but not limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, read-only memory), RAM (Random AcceSS Memory, immediately memory), EPROM (EraSable Programmable Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically EraSable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card Or light card.It is, storage medium include by equipment (for example, computer) in the form of it can read storage or transmission information Any medium.Can be read-only memory, disk or CD etc..
The embodiment of the present invention also provides a kind of computer equipment, and the computer equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processing Device realizes the Downsapling method of the deep neural network described in above-mentioned any one.
Fig. 7 is the structural schematic diagram of computer equipment of the present invention, including processor 220, storage device 230, input unit The devices such as 240 and display unit 250.It will be understood by those skilled in the art that the structure devices shown in Fig. 7 are not constituted to institute The restriction for having computer equipment may include than illustrating more or fewer components, or the certain components of combination.Storage device 230 can be used for storing application program 210 and each function module, and processor 220 runs the application journey for being stored in storage device 230 Sequence 210, to execute various function application and the data processing of equipment.Storage device 230 can be built-in storage or external memory Reservoir, or including both built-in storage and external memory.Built-in storage may include read-only memory, programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory or random storage Device.External memory may include hard disk, floppy disk, ZIP disks, USB flash disk, tape etc..Storage device disclosed in this invention includes but not It is limited to the storage device of these types.Storage device 230 disclosed in this invention is only used as example rather than as restriction.
Input unit 240 is used to receive the input of signal, and receives the input signal of multiple dimensions.Input unit 240 It may include touch panel and other input equipments.Touch panel collect user on it or neighbouring touch operation (such as User uses the operations of any suitable object or attachment on touch panel or near touch panel such as finger, stylus), and Corresponding attachment device is driven according to a pre-set procedure;Other input equipments can include but is not limited to physical keyboard, work( It is one or more in energy key (such as broadcasting control button, switch key etc.), trace ball, mouse, operating lever etc..Display unit 250 can be used for showing information input by user or be supplied to the information of user and the various menus of computer equipment.Display is single The forms such as liquid crystal display, Organic Light Emitting Diode can be used in member 250.Processor 220 is the control centre of computer equipment, profit With the various pieces of various interfaces and the entire computer of connection, by run or execute be stored in it is soft in storage device 230 Part program and/or module, and the data being stored in storage device are called, perform various functions and handle data.
In one embodiment, computer equipment includes one or more processors 220, and one or more storage dresses 230 are set, one or more application program 210, wherein one or more of application programs 210 are stored in storage device 230 In and be configured as being executed by one or more of processors 220, one or more of application programs 210 are configured to hold The Downsapling method of deep neural network described in row above example.
It should be understood that although each step in the flow chart of attached drawing is shown successively according to the instruction of arrow, These steps are not that the inevitable sequence indicated according to arrow executes successively.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing Part steps may include that either these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, execution sequence is also not necessarily to be carried out successively, but can be with other Either the sub-step of other steps or at least part in stage execute step in turn or alternately.
It should be understood that each functional unit in various embodiments of the present invention can be integrated in a processing module, Can be physically existed alone with each unit, can also two or more units be integrated in a module.It is above-mentioned integrated The form that hardware had both may be used in module is realized, can also be realized in the form of software function module.
The above is only some embodiments of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of Downsapling method of deep neural network, which is characterized in that including step:
Obtain the input signal of multiple dimensions, wherein the dimension includes first passage number and the first bulk;
According to the first passage number, first bulk and setting ratio, second channel number and second space ruler are determined It is very little, wherein the product and the second channel number and the second space of the first passage number and first bulk The product of size is equal, and first bulk is more than the second space size;
According to the second channel number and the second space size, down-sampling is carried out to the input signal, obtains down-sampling Output signal later.
2. the Downsapling method of deep neural network according to claim 1, which is characterized in that described according to described first Port number, first bulk and setting ratio, determine second channel number and second space size, including:
By the first passage number with it is described setting ratio Nth power is multiplied, obtain second channel number, wherein N for more than or equal to 1 positive integer;
First bulk and the Nth power of the setting ratio are divided by, second space size is obtained.
3. the Downsapling method of deep neural network according to claim 2, which is characterized in that first bulk Including first level direction size and the first vertical direction size, the second space size include the second horizontal direction size and Second vertical direction size;
It is described that first bulk and the Nth power of the setting ratio are divided by, second space size is obtained, including:
First level direction size and the X powers of the setting ratio are divided by, the second horizontal direction size is obtained, In, X is the positive integer less than or equal to N;
The first vertical direction size and (N-X) power of the setting ratio are divided by, the second vertical direction size is obtained.
4. the Downsapling method of deep neural network according to claim 3, which is characterized in that the N is 2, and the X is 1。
5. the Downsapling method of deep neural network according to any one of claims 1 to 4, which is characterized in that described According to the second channel number and the second space size, down-sampling is carried out to the input signal, after obtaining down-sampling Output signal, including:
It is successively read from the input signal and the equal number of pixel of second channel number;
Each pixel of reading is stored in one by one in the corresponding signal of each second channel;
The corresponding signal of each second channel obtained after the input signal all pixels will be gone through to stack, adopted under formation Output signal after sample.
6. the Downsapling method of deep neural network according to any one of claims 1 to 4, which is characterized in that described According to the second channel number and the second space size, down-sampling is carried out to the input signal, after obtaining down-sampling Output signal, including:
It is successively read from the input signal and the equal number of pixel of second space size;
A signal for not storing pixel, each pixel one that will be successively read are chosen from the corresponding signal of each second channel One is stored in the signal of selection;
The each signal obtained after the input signal all pixels will be gone through to stack, form the output letter after down-sampling Number.
7. the Downsapling method of deep neural network according to any one of claims 1 to 4, which is characterized in that described According to the second channel number and the second space size, down-sampling is carried out to the input signal, after obtaining down-sampling Output signal, including:
The pixel of preset number is successively read from the input signal;
There are the signals of empty position for selection from each second channel corresponding signal, and each pixel being successively read is deposited one by one Storage is in the signal of selection;
The each signal obtained after the input signal all pixels will be gone through to stack, form the output letter after down-sampling Number.
8. a kind of downsampling device of deep neural network, which is characterized in that including:
Input signal acquisition module, the input signal for obtaining multiple dimensions, wherein the dimension include first passage number and First bulk;
Dimension determining module, for according to the first passage number, first bulk and setting ratio, determining that second is logical Road number and second space size, wherein product and the second channel of the first passage number with first bulk Number is equal with the product of second space size, and first bulk is more than the second space size;
Down sample module, for according to the second channel number and the second space size, being carried out down to the input signal Sampling obtains the output signal after down-sampling.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The Downsapling method of deep neural network as claimed in any of claims 1 to 7 in one of claims is realized when row.
10. a kind of computer equipment, which is characterized in that the computer equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processors are real The now Downsapling method of deep neural network as claimed in any of claims 1 to 7 in one of claims.
CN201810421634.2A 2018-05-04 2018-05-04 Downsapling method, device and the computer equipment of deep neural network Pending CN108710945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810421634.2A CN108710945A (en) 2018-05-04 2018-05-04 Downsapling method, device and the computer equipment of deep neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810421634.2A CN108710945A (en) 2018-05-04 2018-05-04 Downsapling method, device and the computer equipment of deep neural network

Publications (1)

Publication Number Publication Date
CN108710945A true CN108710945A (en) 2018-10-26

Family

ID=63867820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810421634.2A Pending CN108710945A (en) 2018-05-04 2018-05-04 Downsapling method, device and the computer equipment of deep neural network

Country Status (1)

Country Link
CN (1) CN108710945A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674741A (en) * 2019-09-24 2020-01-10 广西师范大学 Machine vision gesture recognition method based on dual-channel feature fusion
CN110852385A (en) * 2019-11-12 2020-02-28 北京百度网讯科技有限公司 Image processing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960415A (en) * 2017-03-17 2017-07-18 深圳市唯特视科技有限公司 A kind of method for recovering image based on pixel-recursive super-resolution model
CN107464227A (en) * 2017-08-24 2017-12-12 深圳市唯特视科技有限公司 A kind of method that reflection and smoothed image are removed based on deep neural network
CN107480707A (en) * 2017-07-26 2017-12-15 天津大学 A kind of deep neural network method based on information lossless pond

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960415A (en) * 2017-03-17 2017-07-18 深圳市唯特视科技有限公司 A kind of method for recovering image based on pixel-recursive super-resolution model
CN107480707A (en) * 2017-07-26 2017-12-15 天津大学 A kind of deep neural network method based on information lossless pond
CN107464227A (en) * 2017-08-24 2017-12-12 深圳市唯特视科技有限公司 A kind of method that reflection and smoothed image are removed based on deep neural network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674741A (en) * 2019-09-24 2020-01-10 广西师范大学 Machine vision gesture recognition method based on dual-channel feature fusion
CN110674741B (en) * 2019-09-24 2023-06-09 青岛海之晨工业装备有限公司 Gesture recognition method in machine vision based on double-channel feature fusion
CN110852385A (en) * 2019-11-12 2020-02-28 北京百度网讯科技有限公司 Image processing method, device, equipment and storage medium
CN110852385B (en) * 2019-11-12 2022-07-12 北京百度网讯科技有限公司 Image processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104937927B (en) 2 tie up images or video to the real-time automatic conversion of 3-dimensional stereo-picture or video
US8564623B2 (en) Integrated data visualization for multi-dimensional microscopy
CN101595728B (en) Imaging apparatus, and control method and program for the same
CN109919869A (en) A kind of image enchancing method, device and storage medium
CN108520223A (en) Dividing method, segmenting device, storage medium and the terminal device of video image
CN107609575A (en) Calligraphy evaluation method, calligraphy evaluating apparatus and electronic equipment
CN107767380A (en) A kind of compound visual field skin lens image dividing method of high-resolution based on global empty convolution
Cheng et al. Zero-shot image super-resolution with depth guided internal degradation learning
US20150055017A1 (en) Relational Display of Images
CN110533594A (en) Model training method, image rebuilding method, storage medium and relevant device
CN108710945A (en) Downsapling method, device and the computer equipment of deep neural network
CN115100334B (en) Image edge tracing and image animation method, device and storage medium
CN110163211A (en) A kind of image-recognizing method, device and storage medium
CN104036482B (en) Facial image super-resolution method based on dictionary asymptotic updating
CN114331831A (en) Light-weight single-image super-resolution reconstruction method
CN109584197A (en) A kind of image interfusion method and relevant apparatus
CN107133631A (en) A kind of method and device for recognizing TV station's icon
CN104104961B (en) A kind of method for video coding, coding/decoding method and device
CN103106412B (en) Flaky medium recognition methods and recognition device
CN114373050A (en) Chemistry experiment teaching system and method based on HoloLens
CN109242919A (en) A kind of image down sampling method
CN114972611B (en) Depth texture synthesis method based on guide matching loss and related equipment
CN110414593A (en) Image processing method and device, processor, electronic equipment and storage medium
CN110866866A (en) Image color-matching processing method and device, electronic device and storage medium
CN115331126A (en) Small target detection model construction and detection method based on Yolov5

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210115

Address after: 511442 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 511442 29 floor, block B-1, Wanda Plaza, Huambo business district, Panyu District, Guangzhou, Guangdong.

Applicant before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20181026

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000054

Denomination of invention: Down sampling method, device and computer equipment of deep neural network

License type: Common License

Record date: 20210208

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181026