CN109741264A - The excessive representation method of image, device, electronic equipment and readable storage medium storing program for executing - Google Patents
The excessive representation method of image, device, electronic equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN109741264A CN109741264A CN201910055356.8A CN201910055356A CN109741264A CN 109741264 A CN109741264 A CN 109741264A CN 201910055356 A CN201910055356 A CN 201910055356A CN 109741264 A CN109741264 A CN 109741264A
- Authority
- CN
- China
- Prior art keywords
- image
- gradient
- input picture
- size
- amplified
- 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
Links
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The excessive representation method of image provided by the embodiments of the present application, device, electronic equipment and readable storage medium storing program for executing, first, it scales input picture progress equal proportion to obtain the different input picture of multiple sizes, and by the gradient increasing function of the input picture of minimum dimension input convolutional neural networks, corresponding gradient image is obtained;Then, after gradient image being amplified in input gradient increasing function, the amplified gradient image of size is obtained;Finally, amplified after amplified gradient image is added with error image, and by amplified image input gradient increasing function, until the size of new amplified gradient image is identical as the size of input picture.Above scheme can be exported the expression effect of articulamentums different in convolutional neural networks to excessive by gradient increasing function indicates image, pass through the image of the multiple and different sizes of creation simultaneously, iteration executes, and continues to optimize the detailed information in gradient image, enhances the image effect for excessively indicating image.
Description
Technical field
This application involves field of image processings, set in particular to a kind of excessive representation method of image, device, electronics
Standby and readable storage medium storing program for executing.
Background technique
The excessive expression effect of image can be used as art pattern use.Logic can be full of on the image excessively indicated
It day-dreams pattern (for example, eyes of animal), different logic fantasy patterns can be by image data set (for example, ImageNet
Data set) training network parameter realize.
The excessive expression effect of image can be used as the visual effect of convolutional neural networks, different in convolutional neural networks
The image information that articulamentum is characterized is different.Specifically, in convolutional neural networks, lower articulamentum is for characterizing texture letter
How breath, higher articulamentum carried out image by the different articulamentums of convolutional neural networks for characterizing classification information
Degree indicates to be those skilled in the art's technical problem urgently to be solved.
Summary of the invention
Embodiments herein describes a kind of excessive representation method of image, device, electronic equipment and readable storage medium storing program for executing.
In a first aspect, embodiments herein provides a kind of excessive representation method of image, which comprises
Input picture is subjected to equal proportion scaling according to pre-set zoom ratio, obtains the different input picture of multiple sizes;
By in the gradient increasing function of smallest size of input picture input convolutional neural networks, corresponding gradient map is obtained
Picture;
By the gradient image according to the pre-set zoom ratio enlargement after, input in the gradient increasing function, obtain
The amplified gradient image of size;
Judge whether the size of amplified gradient image is identical as the size of the input picture, if not identical, weighs
It is multiple to execute following operation, until the size of amplified gradient image is identical as the size of the input picture, wherein with it is described
The identical gradient image of the size of input picture is the image after excessively indicating:
By size it is smaller than the size of the amplified gradient image input picture amplification, obtain with it is described amplified
The identical enlarged drawing of the size of gradient image, calculate identical with the size of amplified gradient image input picture and
Difference between the enlarged drawing, obtains error image;
The image that the amplified gradient image is added with the error image is according to the pre-set zoom ratio
Example amplifies, and the image of amplification is inputted in the gradient increasing function, new amplified gradient image is obtained.
Optionally, in the embodiment of the present application, the gradient increasing function include loss gradient function, it is described by size most
In the gradient increasing function of small input picture input convolutional neural networks, corresponding gradient image is obtained, comprising:
The smallest size of input picture is inputted in the loss gradient function, the smallest size of input is obtained
The corresponding penalty values of image and gradient matrix;
After the gradient matrix and predetermined gradient multiplied by weight, it is added with the smallest size of input picture
Image is as new images;
The penalty values are compared with preset loss threshold value, if the penalty values are not more than the preset loss
Threshold value then repeats following operation, and until the penalty values are greater than the preset loss threshold value, the penalty values are greater than institute
New images when stating preset loss threshold value are the gradient image:
New images are inputted in the loss gradient function, the corresponding penalty values of the new images and gradient matrix are obtained;
After the gradient matrix and predetermined gradient multiplied by weight, the image being added with the new images is as update
New images afterwards.
Optionally, in the embodiment of the present application, the loss gradient function includes loss function, it is described by the size most
Small input picture inputs in the loss gradient function, obtains the corresponding penalty values of the smallest size of input picture and ladder
Spend matrix, comprising:
The smallest size of input picture is inputted into the loss function and obtains penalty values;
The smallest size of input picture is inputted in the derived function of the loss function, is obtained described smallest size of
The gradient matrix of input picture;
Regularization is carried out to the gradient matrix, obtains the gradient matrix of regularization.
Optionally, in the embodiment of the present application, described that the smallest size of input picture is inputted into the loss function
Obtain penalty values, comprising:
By in the smallest size of input picture input convolutional neural networks, the defeated of selected neural network articulamentum is obtained
Characteristic pattern out;
The output characteristic pattern is handled, the marginal value of the output characteristic pattern surrounding is removed;
It is special to obtain output according to the quadratic sum of each value for the quadratic sum that each value in characteristic pattern is exported after calculation processing
Levy the mean value of figure;
The mean value of the output characteristic pattern of each selected neural network articulamentum is connect with each selected neural network
It adds up after the default multiplied by weight of layer, obtains the penalty values.
Optionally, in the embodiment of the present application, the method also includes:
The pixel value of each pixel of the gradient image is handled, the gradient image that makes that treated it is each
The pixel value of a pixel is located in preset pixel value range.
Second aspect, embodiments herein, which also provides a kind of image, excessively indicates device, and described device includes:
Input picture Zoom module obtains more for input picture to be carried out equal proportion scaling according to pre-set zoom ratio
Open the different input picture of size;
Gradient image obtains module, for the gradient of smallest size of input picture input convolutional neural networks to be risen letter
In number, corresponding gradient image is obtained;
By the gradient image according to the pre-set zoom ratio enlargement after, input in the gradient increasing function, obtain
The amplified gradient image of size;
The gradient image obtains module, be also used to judge amplified gradient image size whether with the input figure
The size of picture is identical, if not identical, repeats following operation, until the size and the input of amplified gradient image
The size of image is identical, wherein gradient image identical with the size of the input picture is the image after excessively indicating:
By size it is smaller than the size of the amplified gradient image input picture amplification, obtain with it is described amplified
The identical enlarged drawing of the size of gradient image, calculate identical with the size of amplified gradient image input picture and
Difference between the enlarged drawing, obtains error image;
The image that the amplified gradient image is added with the error image is according to the pre-set zoom ratio
Example amplifies, and the image of amplification is inputted in the gradient increasing function, new amplified gradient image is obtained.
Optionally, in the embodiment of the present application, the gradient increasing function includes loss gradient function, the gradient image
Obtaining module includes:
Penalty values and gradient matrix obtain submodule, for the smallest size of input picture to be inputted the loss ladder
It spends in function, obtains the corresponding penalty values of the smallest size of input picture and gradient matrix;
New images obtain submodule, for by after the gradient matrix and predetermined gradient multiplied by weight, most with the size
The image that small input picture is added is as new images;
The new images obtain submodule, are also used to for the penalty values being compared with preset loss threshold value, if institute
Penalty values are stated no more than the preset loss threshold value, then repeat following operation, until the penalty values are greater than described pre-
If loss threshold value, the penalty values be greater than it is described it is preset loss threshold value when new images be the gradient image:
New images are inputted in the loss gradient function, the corresponding penalty values of the new images and gradient matrix are obtained;
After the gradient matrix and predetermined gradient multiplied by weight, the image being added with the new images is as update
New images afterwards.
Optionally, in the embodiment of the present application, the loss gradient function includes loss function, the penalty values and gradient
Matrix obtains submodule and is specifically used for:
The smallest size of input picture is inputted into the loss function and obtains penalty values;
The smallest size of input picture is inputted in the derived function of the loss function, is obtained described smallest size of
The gradient matrix of input picture;
Regularization is carried out to the gradient matrix, obtains the gradient matrix of regularization.
Optionally, in the embodiment of the present application, the penalty values and gradient matrix obtain submodule and are further used for:
By in the smallest size of input picture input convolutional neural networks, the defeated of selected neural network articulamentum is obtained
Characteristic pattern out;
The output characteristic pattern is handled, the marginal value of the output characteristic pattern surrounding is removed;
It is special to obtain output according to the quadratic sum of each value for the quadratic sum that each value in characteristic pattern is exported after calculation processing
Levy the mean value of figure;
The mean value of the output characteristic pattern of each selected neural network articulamentum is connect with each selected neural network
It adds up after the default multiplied by weight of layer, obtains the penalty values.
Optionally, in the embodiment of the present application, described device further include:
Pixel value processing module, the pixel value for each pixel to the gradient image handle, make to handle
The pixel value of each pixel of the gradient image afterwards is located in preset pixel value range.
The third aspect, embodiments herein also provide a kind of electronic equipment, and the electronic equipment includes processor and deposits
The nonvolatile memory of several computer instructions is contained, when the computer instruction is executed by the processor, the electronics
Equipment, which executes image described in first aspect, excessively indicates device.
Fourth aspect, embodiments herein also provide a kind of readable storage medium storing program for executing, and the readable storage medium storing program for executing includes meter
Calculation machine program, electronic equipment executes described in first aspect the computer program controls the readable storage medium storing program for executing when running where
The excessive representation method of image.
In terms of existing technologies, the excessive representation method of image, the device, electronics of the application preferred embodiment offer
Equipment and readable storage medium storing program for executing have the advantages that
Application software management method, device, electronic equipment and readable storage medium storing program for executing provided by the embodiments of the present application, firstly,
Input picture progress equal proportion is scaled to obtain the different input picture of multiple sizes, and the input picture of minimum dimension is inputted
In the gradient increasing function of convolutional neural networks, corresponding gradient image is obtained;Then, input gradient after gradient image being amplified
In increasing function, the amplified gradient image of size is obtained;Finally, amplified gradient image is added with error image
After amplify, and by amplified image input gradient increasing function, until the size of new amplified gradient image
It is identical as the size of input picture.Above scheme can be by articulamentums different in convolutional neural networks by gradient increasing function
Indicating that effect is exported to excessive indicates image, while the image by creating multiple and different sizes, and iteration executes, and continues to optimize ladder
The detailed information in image is spent, the image effect for excessively indicating image is enhanced.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, the application preferred embodiment is cited below particularly,
And cooperate appended attached drawing, it is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair
The restriction of the claim of this application protection scope, for those of ordinary skill in the art, what is do not made the creative labor
Under the premise of, it can also be obtained according to these attached drawings other relevant attached drawings.
Fig. 1 is the structural schematic block diagram of electronic equipment provided by the embodiments of the present application;
Fig. 2 is a kind of flow diagram of the excessive representation method of image provided by the embodiments of the present application;
Fig. 3 is the sub-step flow diagram of step S120 in Fig. 2;
Fig. 4 is the sub-step flow diagram of step S121 in Fig. 3;
Fig. 5 is another flow diagram of the excessive representation method of image provided by the embodiments of the present application;
Fig. 6 is the comparative diagram of the image excessively indicated and original input picture provided by the embodiments of the present application;
Fig. 7 is a kind of functional block diagram that image provided by the embodiments of the present application excessively indicates device;
Fig. 8 is another functional block diagram that image provided by the embodiments of the present application excessively indicates device.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.The application being usually described and illustrated herein in the accompanying drawings is implemented
The component of example can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiments herein provided in the accompanying drawings is not intended to limit below claimed
Scope of the present application, but be merely representative of the selected embodiment of the application.Based on the embodiment in the application, this field is common
Technical staff's every other embodiment obtained without creative efforts belongs to the model of the application protection
It encloses.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
With reference to the accompanying drawing, it elaborates to some embodiments of the application.In the absence of conflict, following
Feature in embodiment and embodiment can be combined with each other.
Fig. 1 is please referred to, Fig. 1 is the block diagram for the electronic equipment 100 that the application preferred embodiment provides.The application is real
Applying electronic equipment 100 described in example may include server, mobile terminal etc., and wherein mobile terminal may be, but not limited to, intelligence
It can mobile phone, PC (personal computer, PC), tablet computer, personal digital assistant (personal digital
Assistant, PDA), mobile internet surfing equipment (mobile Internet device, MID) etc..As shown in Figure 1, the electronics
Equipment 100 includes: that memory 110, processor 120 and image excessively indicate device 130.
The memory 110 and processor 120 are directly or indirectly electrically connected between each other, to realize the transmission of data
Or interaction.It is electrically connected for example, these elements can be realized between each other by one or more communication bus or signal wire.Storage
Image is stored in device 110 excessively indicates device 130, and described image excessively indicates that device 130 can be with software including at least one
Or the form of firmware (firmware) is stored in the software function module in the memory 110, the processor 120 passes through fortune
The software program and module that row is stored in memory 110, if the image in the embodiment of the present application excessively indicates device 130,
Thereby executing various function application and data processing, the i.e. excessive representation method of image in realization the embodiment of the present application.
Wherein, the memory 110 may be, but not limited to, random access memory (Random Access
Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable
Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only
Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only
Memory, EEPROM) etc..Wherein, memory 110 is for storing program, the processor 120 after receiving and executing instruction,
Execute described program.
The processor 120 may be a kind of IC chip, the processing capacity with signal.Above-mentioned processor
120 can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit
(Network Processor, NP) etc..It can also be digital signal processor (DSP), specific integrated circuit (ASIC), ready-made
Programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware group
Part.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present application.General processor can be with
It is that microprocessor or the processor are also possible to any conventional processor etc..
It is appreciated that structure shown in FIG. 1 is only to illustrate, electronic equipment 100 may also include it is more than shown in Fig. 1 or
Less component, or with the configuration different from shown in Fig. 1.Each component shown in Fig. 1 can using hardware, software or its
Combination is realized.
Referring to figure 2., the flow diagram of the excessive representation method of a kind of image provided by the embodiments of the present application, the image mistake
It spends representation method and is applied to electronic equipment 100 shown in FIG. 1, this method can specifically include following steps.
Input picture is carried out equal proportion scaling according to pre-set zoom ratio, it is different to obtain multiple sizes by step S110
Input picture.
It in the embodiment of the present application, can be using the image in ImageNet data set as input picture, ImageNet
Data set is a large-scale visible database for being used for the research of visual object recognizer, including artificial more than 14,000,000 width
Mark image.
Assuming that the size of input picture is A × A, pre-set zoom ratio is a, wherein A is positive integer, and a is between 0~1
Input picture is carried out equal proportion scaling by decimal, and available is respectively A × A, (A × a) × (A × a), (A × a × a) × (A
The input picture for × a × a) ... wait several sizes different.
Step S120 inputs smallest size of input picture in the gradient increasing function of convolutional neural networks, acquisition pair
The gradient image answered.
In the embodiment of the present application, it can be realized using the convolutional neural networks in InceptionV3 model, wherein
InceptionV3 model is to modify to obtain to traditional convolutional layer in network by GoogleNet, and depth nerve can be improved
The performance of network.Of course, it should be understood that the embodiment of the present application can also be realized using other convolutional neural networks, than
Such as, VGG16, VGG19, Xception, ResNet50 etc., since different convolutional neural networks structures is different, the spy learnt
Sign also there is difference, therefore the visual effect generated also can be different, in the embodiment of the present application in InceptionV3 model
It is introduced for convolutional neural networks.
Referring to figure 3., in the embodiment of the present application, gradient increasing function includes loss gradient function, and step S120 can be with
It is realized using following steps:
Step S121 obtains smallest size of input figure in smallest size of input picture entrance loss gradient function
As corresponding penalty values and gradient matrix.
In the application implementation, loss gradient function may include loss function, specifically, referring to figure 4., step S121
It can be realized by following sub-step.
Smallest size of input picture entrance loss function is obtained penalty values by sub-step S1211.
The penalty values that loss function defines input picture are as follows: by the output characteristic pattern of each selected neural network articulamentum
After removing edge data, then the quadratic sum of each value in output characteristic pattern is calculated, further according to each value in output characteristic pattern
Quadratic sum be calculated output characteristic pattern mean value, finally by the default power of the mean value of each output characteristic value and each articulamentum
Heavy phase adds up after multiplying and obtains.
Lower mask body introduces input picture and is input to the process for calculating penalty values in loss function:
Firstly, smallest size of input picture is inputted in convolutional neural networks, selected neural network articulamentum is obtained
Export characteristic pattern;
In the embodiment of the present application, it can choose in the convolutional neural networks of InceptionV3 model in 9 articulamentums
4 articulamentums can choose at random as selected neural network articulamentum, 4 articulamentums.It is assumed that the smallest input image size
For (A × a × a) × (A × a × a), the output characteristic pattern of each articulamentum of acquisition is (A × a × a) × (A × a × a) × B,
Wherein, B is the port number of neural network articulamentum.
Then, output characteristic pattern is handled, removes the marginal value of output characteristic pattern surrounding.
In the embodiment of the present application, optionally, remove output most marginal 2 values of characteristic pattern surrounding, obtain that treated
Output characteristic pattern is (A × a × a-4) × (A × a × a-4) × B.
Followed by, after calculation processing export characteristic pattern in each value quadratic sum, obtained according to the quadratic sum of each value defeated
The mean value of characteristic pattern out.
Finally, by the mean value of the output characteristic pattern of each selected neural network articulamentum and each selected neural network articulamentum
It adds up after adding up after default multiplied by weight, obtains the penalty values.
Sub-step S1212 inputs smallest size of input picture in the derived function of the loss function, obtains size most
The gradient matrix of small input picture.
Sub-step S1213 carries out Regularization to gradient matrix, obtains the gradient matrix of regularization.
Specifically, the absolute value of each element in gradient matrix is sought, then seeks the equal of the absolute value of each element in gradient matrix
The absolute value of each element in gradient matrix, is finally divided by by value with mean value, the gradient matrix after obtaining regularization.
Step S122 is added to obtain after gradient matrix and predetermined gradient multiplied by weight with smallest size of input picture
Image as new images.
Step S123, judges whether penalty values are greater than preset loss threshold value, if penalty values are not more than preset penalty values
Execute step S124;If penalty values, which are greater than preset penalty values, executes step S126.
Step S124 obtains the corresponding penalty values of new images and gradient matrix in new images entrance loss gradient function.
The specific process for calculating the corresponding penalty values of new images and gradient matrix, it is the smallest with slide ruler in step S121 cun
The corresponding penalty values of input picture and gradient matrix are identical, and details are not described herein.
Step S125, after gradient matrix and predetermined gradient multiplied by weight, the image being added with new images is as more
New images after new.
Step S126, new images when using penalty values greater than preset loss threshold value are as gradient image.
In the embodiment of the present application, in the step s 120, the input picture, the number of iterations, default in gradient increasing function
Gradient weight and default loss threshold value, it can ultimately generate gradient image.
Step S130, by gradient image according to pre-set zoom ratio enlargement after, in input gradient increasing function, obtain size
Amplified gradient image.
Step S140 judges whether the size of amplified gradient image is identical as the size of input picture, if not identical
Step S150 is executed, executes step S170 if they are the same.
Step S150 amplifies the size input picture smaller than the size of amplified gradient image, after obtaining and amplifying
Gradient image the identical enlarged drawing of size, calculate identical with the size of amplified gradient image input picture and put
Difference between big image, obtains error image.
Assuming that the size of input picture is 1334 × 1334, the input figure of three continuous sizes is obtained after equal proportion scaling
Picture, respectively 1334 × 1334,952 × 952,680 × 680.In the first iteration, the size of gradient image be 680 ×
680, subtracted each other using 680 × 680 input picture and 680 × 680 input picture itself, obtained error image is 0.?
In second iteration, the size of amplified gradient image is 952 × 952, and the input picture having a size of 680 × 680 is amplified to
Enlarged drawing is obtained having a size of 952 × 952, using the input picture having a size of 952 × 952 and the amplification having a size of 952 × 952
Image subtraction obtains the error image of characterization image detail information.Similarly, in third time iteration, amplified gradient image
Size be 1334 × 1334, the input picture having a size of 952 × 952 is amplified to and obtains enlarged drawing having a size of 1334 × 1334
Picture is subtracted each other with the enlarged drawing having a size of 1334 × 1334 using the input picture having a size of 1334 × 1334, obtains phenogram
As the error image of detailed information.
Step S160, the image that amplified gradient image and error image are added according to pre-set zoom ratio into
Row amplification, by the image input gradient increasing function of amplification, obtains new amplified gradient image.
The return step S140 after obtaining new amplified gradient image;In the size for judging amplified gradient image
When identical as the size of input picture, step S170 is executed.
Step S170, using gradient image identical with the size of input picture as the image after excessive indicate.
Referring to figure 5., in the embodiment of the present application, the excessive representation method of described image further includes step S180.
Step S180 handles the pixel value of each pixel of gradient image, the gradient image that makes that treated
The pixel value of each pixel is located in preset pixel value range.
The pixel value range of each pixel is 0~1 in gradient image, and the pixel value of pixel each in gradient image is extended
To between 0~255, specifically, can using following methods realize: by the pixel value of pixel each in gradient image divided by 2 it
0.5 is added afterwards, finally multiplied by 255, and will be more than that 255 pixel is replaced with prime number value 255.It so can be improved excessively
The color saturation for indicating image, obtains better effect of visualization.
Please refer to Fig. 6, Fig. 6 be using in InceptionV3 model convolutional neural networks, in ImageNet data set
Image carries out the comparative diagram for excessively indicating treated image and original input picture as input picture.With original input picture
It compares, excessively indicates in treated image added with type pattern as such as animal eyes.
The above method can be exported the expression effect of articulamentums different in convolutional neural networks by gradient increasing function
Image, while the image by creating multiple and different sizes are indicated to excessive, and iteration is executed, continued to optimize thin in gradient image
Information is saved, the image effect for excessively indicating image is enhanced.
Please refer to Fig. 7, the embodiment of the present application, which also provides a kind of image, excessively indicates device 130, unlike the embodiments above
, the embodiment of the present application is that application scheme is described from virtual bench angle.It is understood that next to retouch
The image stated excessively indicates that content involved in device 130 has been noted above in the examples above, and specific image excessively indicates
The exhaustive of function performed by each functional module of device 130 can refer to above embodiment description, below only to figure
As excessively indicating that each functional module is briefly described in device 130.
Image excessively indicates that device 130 may include:
Input picture Zoom module 131 is obtained for input picture to be carried out equal proportion scaling according to pre-set zoom ratio
The different input picture of multiple sizes.
Gradient image obtains module 132, for smallest size of input picture to be inputted to the gradient of convolutional neural networks
It rises in function, obtains corresponding gradient image;
By gradient image according to pre-set zoom ratio enlargement after, in input gradient increasing function, it is amplified to obtain size
Gradient image;
The gradient image obtains module 132, be also used to judge amplified gradient image size whether with input figure
The size of picture is identical, if not identical, repeats following operation, until the size and input picture of amplified gradient image
Size it is identical, wherein gradient image identical with the size of input picture be excessively indicate after image:
By the size input picture amplification smaller than the size of amplified gradient image, obtain and amplified gradient image
The identical enlarged drawing of size, calculate and the identical input picture of size and enlarged drawing of amplified gradient image between
Difference, obtain error image;
The image that amplified gradient image and error image are added is amplified according to pre-set zoom ratio, it will
In the image input gradient increasing function of amplification, new amplified gradient image is obtained.
Fig. 8 is please referred to, in the embodiment of the present application, gradient increasing function includes loss gradient function, and gradient image obtains
Module 132 includes:
Penalty values and gradient matrix obtain submodule 1321, are used for smallest size of input picture entrance loss gradient letter
In number, the corresponding penalty values of the smallest size of input picture and gradient matrix are obtained;
New images obtain submodule 1322, and smallest size of for by after gradient matrix and predetermined gradient multiplied by weight
The image that input picture is added is as new images;
New images obtain submodule 1322, are also used to for penalty values being compared with preset loss threshold value, if penalty values
No more than the preset loss threshold value, then following operation is repeated, until penalty values are greater than preset loss threshold value, loss
New images when value is greater than preset loss threshold value are gradient image:
By in new images entrance loss gradient function, the corresponding penalty values of new images and gradient matrix are obtained;
After gradient matrix and predetermined gradient multiplied by weight, the image being added with new images is as updated new figure
Picture.
In the embodiment of the present application, loss gradient function includes loss function, and penalty values and gradient matrix obtain submodule
1321 are specifically used for:
Smallest size of input picture entrance loss function is obtained into penalty values;
By in the derived function of smallest size of input picture entrance loss function, the ladder of smallest size of input picture is obtained
Spend matrix;
Regularization is carried out to gradient matrix, obtains the gradient matrix of regularization.
In the embodiment of the present application, penalty values and gradient matrix obtain submodule 1321 and are further used for:
Smallest size of input picture is inputted in convolutional neural networks, the output for obtaining selected neural network articulamentum is special
Sign figure;
The output characteristic pattern is handled, the marginal value of output characteristic pattern surrounding is removed;
The quadratic sum that each value in characteristic pattern is exported after calculation processing obtains output characteristic pattern according to the quadratic sum of each value
Mean value;
By the mean value of output characteristic pattern and presetting for each selected neural network articulamentum of each selected neural network articulamentum
It adds up after multiplied by weight, obtains penalty values.
Referring once again to Fig. 8, image excessively indicates that device 130 can also include pixel value processing module 133,
Pixel value processing module 133, the pixel value for each pixel to gradient image is handled, after making processing
The pixel value of each pixel of gradient image be located in preset pixel value range.
It, can be with if above-mentioned function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are with so that corresponding equipment executes each reality of the application
Apply all or part of the steps of the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (English
Text: Read-Only Memory, referred to as: ROM), random access memory (English: Random Access Memory, referred to as:
RAM), the various media that can store program code such as magnetic or disk.
In specific embodiment provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the application, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code
Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held
Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement
The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes
It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart
The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement
It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.
Claims (12)
1. a kind of excessive representation method of image, which is characterized in that the described method includes:
Input picture is subjected to equal proportion scaling according to pre-set zoom ratio, obtains the different input picture of multiple sizes;
By in the gradient increasing function of smallest size of input picture input convolutional neural networks, corresponding gradient image is obtained;
By the gradient image according to the pre-set zoom ratio enlargement after, input in the gradient increasing function, obtain size
Amplified gradient image;
Judge whether the size of amplified gradient image is identical as the size of the input picture, if not identical, repeats to hold
The following operation of row, until the size of amplified gradient image is identical as the size of the input picture, wherein with the input
The identical gradient image of the size of image is the image after excessively indicating:
By the size input picture amplification smaller than the size of the amplified gradient image, obtain and the amplified gradient
The identical enlarged drawing of the size of image, calculate identical with the size of amplified gradient image input picture with it is described
Difference between enlarged drawing, obtains error image;
The image that the amplified gradient image and the error image are added according to the pre-set zoom ratio into
Row amplification, the image of amplification is inputted in the gradient increasing function, new amplified gradient image is obtained.
2. the excessive representation method of image as described in claim 1, which is characterized in that the gradient increasing function includes loss ladder
Function is spent, it is described by the gradient increasing function of smallest size of input picture input convolutional neural networks, obtain corresponding ladder
Spend image, comprising:
The smallest size of input picture is inputted in the loss gradient function, the smallest size of input picture is obtained
Corresponding penalty values and gradient matrix;
The image that after the gradient matrix and predetermined gradient multiplied by weight, will be added with the smallest size of input picture
As new images;
The penalty values are compared with preset loss threshold value, if the penalty values are not more than the preset loss threshold
Value, then repeat following operation, and until the penalty values are greater than the preset loss threshold value, the penalty values are greater than described
New images when preset loss threshold value are the gradient image:
New images are inputted in the loss gradient function, the corresponding penalty values of the new images and gradient matrix are obtained;
After the gradient matrix and predetermined gradient multiplied by weight, the image being added with the new images is as updated
New images.
3. the excessive representation method of image as claimed in claim 2, which is characterized in that the loss gradient function includes loss letter
Number, it is described to input the smallest size of input picture in the loss gradient function, obtain the smallest size of input
The corresponding penalty values of image and gradient matrix, comprising:
The smallest size of input picture is inputted into the loss function and obtains penalty values;
The smallest size of input picture is inputted in the derived function of the loss function, the smallest size of input is obtained
The gradient matrix of image;
Regularization is carried out to the gradient matrix, obtains the gradient matrix of regularization.
4. the excessive representation method of image as claimed in claim 3, which is characterized in that described to scheme the smallest size of input
Penalty values are obtained as inputting the loss function, comprising:
By in the smallest size of input picture input convolutional neural networks, the output for obtaining selected neural network articulamentum is special
Sign figure;
The output characteristic pattern is handled, the marginal value of the output characteristic pattern surrounding is removed;
The quadratic sum that each value in characteristic pattern is exported after calculation processing obtains output characteristic pattern according to the quadratic sum of each value
Mean value;
By the mean value of the output characteristic pattern of each selected neural network articulamentum and each selected neural network articulamentum
It adds up after default multiplied by weight, obtains the penalty values.
5. the excessive representation method of image as described in any one of claim 1-4, which is characterized in that the method is also wrapped
It includes:
The pixel value of each pixel of the gradient image is handled, each picture for the gradient image that makes that treated
The pixel value of vegetarian refreshments is located in preset pixel value range.
6. a kind of image excessively indicates device, which is characterized in that described device includes:
Input picture Zoom module obtains multiple rulers for input picture to be carried out equal proportion scaling according to pre-set zoom ratio
Very little different input picture;
Gradient image obtains module, for smallest size of input picture to be inputted to the gradient increasing function of convolutional neural networks
In, obtain corresponding gradient image;
By the gradient image according to the pre-set zoom ratio enlargement after, input in the gradient increasing function, obtain size
Amplified gradient image;
The gradient image obtains module, be also used to judge amplified gradient image size whether with the input picture
Size is identical, if not identical, repeats following operation, size and the input picture until amplified gradient image
Size it is identical, wherein gradient image identical with the size of the input picture be excessively indicate after image:
By the size input picture amplification smaller than the size of the amplified gradient image, obtain and the amplified gradient
The identical enlarged drawing of the size of image, calculate identical with the size of amplified gradient image input picture with it is described
Difference between enlarged drawing, obtains error image;
The image that the amplified gradient image and the error image are added according to the pre-set zoom ratio into
Row amplification, the image of amplification is inputted in the gradient increasing function, new amplified gradient image is obtained.
7. image as claimed in claim 6 excessively indicates device, which is characterized in that the gradient increasing function includes loss ladder
Function is spent, the gradient image obtains module and includes:
Penalty values and gradient matrix obtain submodule, for the smallest size of input picture to be inputted the loss gradient letter
In number, the corresponding penalty values of the smallest size of input picture and gradient matrix are obtained;
New images obtain submodule, and described smallest size of for by after the gradient matrix and predetermined gradient multiplied by weight
The image that input picture is added is as new images;
The new images obtain submodule, are also used to for the penalty values being compared with preset loss threshold value, if the damage
Mistake value is not more than the preset loss threshold value, then repeats following operation, until the penalty values are greater than described preset
Threshold value is lost, the new images when penalty values are greater than the preset loss threshold value are the gradient image:
New images are inputted in the loss gradient function, the corresponding penalty values of the new images and gradient matrix are obtained;
After the gradient matrix and predetermined gradient multiplied by weight, the image being added with the new images is as updated
New images.
8. image as claimed in claim 7 excessively indicates device, which is characterized in that the loss gradient function includes loss letter
Number, the penalty values and gradient matrix obtain submodule and are specifically used for:
The smallest size of input picture is inputted into the loss function and obtains penalty values;
The smallest size of input picture is inputted in the derived function of the loss function, the smallest size of input is obtained
The gradient matrix of image;
Regularization is carried out to the gradient matrix, obtains the gradient matrix of regularization.
9. image as claimed in claim 8 excessively indicates device, which is characterized in that the penalty values and gradient matrix obtain son
Module is further used for:
By in the smallest size of input picture input convolutional neural networks, the output for obtaining selected neural network articulamentum is special
Sign figure;
The output characteristic pattern is handled, the marginal value of the output characteristic pattern surrounding is removed;
The quadratic sum that each value in characteristic pattern is exported after calculation processing obtains output characteristic pattern according to the quadratic sum of each value
Mean value;
By the mean value of the output characteristic pattern of each selected neural network articulamentum and each selected neural network articulamentum
It adds up after default multiplied by weight, obtains the penalty values.
10. the image as described in any one of claim 6-9 excessively indicates device, which is characterized in that described device is also wrapped
It includes:
Pixel value processing module, the pixel value for each pixel to the gradient image are handled, and make that treated
The pixel value of each pixel of the gradient image is located in preset pixel value range.
11. a kind of electronic equipment, the electronic equipment includes processor and is stored with the non-volatile of several computer instructions and deposits
Reservoir, which is characterized in that when the computer instruction is executed by the processor, the electronic equipment perform claim requires 1-5
Any one of described in the excessive representation method of image.
12. a kind of readable storage medium storing program for executing, the readable storage medium storing program for executing includes computer program, it is characterised in that:
The electronic equipment perform claim computer program controls the readable storage medium storing program for executing when running where requires any in 1-5
The excessive representation method of image described in one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910055356.8A CN109741264B (en) | 2019-01-21 | 2019-01-21 | Image over-representation method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910055356.8A CN109741264B (en) | 2019-01-21 | 2019-01-21 | Image over-representation method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109741264A true CN109741264A (en) | 2019-05-10 |
CN109741264B CN109741264B (en) | 2022-11-01 |
Family
ID=66365490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910055356.8A Active CN109741264B (en) | 2019-01-21 | 2019-01-21 | Image over-representation method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109741264B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111260559A (en) * | 2020-02-18 | 2020-06-09 | 芯颖科技有限公司 | Image zooming display method and device and terminal equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018184194A1 (en) * | 2017-04-07 | 2018-10-11 | Intel Corporation | Methods and systems using improved convolutional neural networks for image processing |
CN108711137A (en) * | 2018-05-18 | 2018-10-26 | 西安交通大学 | A kind of image color expression pattern moving method based on depth convolutional neural networks |
CN109102469A (en) * | 2018-07-04 | 2018-12-28 | 华南理工大学 | A kind of panchromatic sharpening method of remote sensing images based on convolutional neural networks |
-
2019
- 2019-01-21 CN CN201910055356.8A patent/CN109741264B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018184194A1 (en) * | 2017-04-07 | 2018-10-11 | Intel Corporation | Methods and systems using improved convolutional neural networks for image processing |
CN108711137A (en) * | 2018-05-18 | 2018-10-26 | 西安交通大学 | A kind of image color expression pattern moving method based on depth convolutional neural networks |
CN109102469A (en) * | 2018-07-04 | 2018-12-28 | 华南理工大学 | A kind of panchromatic sharpening method of remote sensing images based on convolutional neural networks |
Non-Patent Citations (1)
Title |
---|
王晨琛等: "基于卷积神经网络的中国水墨画风格提取", 《图学学报》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111260559A (en) * | 2020-02-18 | 2020-06-09 | 芯颖科技有限公司 | Image zooming display method and device and terminal equipment |
CN111260559B (en) * | 2020-02-18 | 2023-09-22 | 芯颖科技有限公司 | Image zooming display method and device and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109741264B (en) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101298393B1 (en) | Training convolutional neural networks on graphics processing units | |
CN109767000A (en) | Neural network convolution method and device based on Winograd algorithm | |
CN107729935B (en) | The recognition methods of similar pictures and device, server, storage medium | |
Zeilmann et al. | Geometric numerical integration of the assignment flow | |
CN109636730B (en) | Method for filtering pseudo pixels in a depth map | |
CN109859204A (en) | Convolutional neural networks Model Checking and device | |
Kim et al. | Fast domain decomposition for global image smoothing | |
Chen et al. | Removing Gaussian noise for colour images by quaternion representation and optimisation of weights in non‐local means filter | |
CN111444807B (en) | Target detection method, device, electronic equipment and computer readable medium | |
Liu et al. | Underwater image colour constancy based on DSNMF | |
CN116012263A (en) | Image noise removing method and device, storage medium and electronic equipment | |
CN111179276A (en) | Image processing method and device | |
CN111640188A (en) | Anti-noise three-dimensional grid optimization method based on Mumford-Shah algorithm framework | |
CN110163095B (en) | Loop detection method, loop detection device and terminal equipment | |
Pendu et al. | Preconditioned plug-and-play admm with locally adjustable denoiser for image restoration | |
CN109741264A (en) | The excessive representation method of image, device, electronic equipment and readable storage medium storing program for executing | |
Fang et al. | Learning explicit smoothing kernels for joint image filtering | |
Zineddin et al. | Cellular neural networks, the Navier–Stokes equation, and microarray image reconstruction | |
JP2021144428A (en) | Data processing device and data processing method | |
CN115496993B (en) | Target detection method, device, equipment and storage medium based on frequency domain fusion | |
CN115511262A (en) | Transformer quality detection method and device | |
CN110084759B (en) | Image filling method, terminal equipment and storage medium | |
Che et al. | The fractional differential enhancement of image texture features and its parallel processing optimization | |
CN114782336A (en) | Method and device for predicting fiber bundle orientation distribution based on graph convolution neural network | |
Zhou et al. | Directional relative total variation for structure–texture decomposition |
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 |