CN112101383A - Color cast image identification method - Google Patents

Color cast image identification method Download PDF

Info

Publication number
CN112101383A
CN112101383A CN202010969696.4A CN202010969696A CN112101383A CN 112101383 A CN112101383 A CN 112101383A CN 202010969696 A CN202010969696 A CN 202010969696A CN 112101383 A CN112101383 A CN 112101383A
Authority
CN
China
Prior art keywords
color cast
neural network
color
network model
picture set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010969696.4A
Other languages
Chinese (zh)
Other versions
CN112101383B (en
Inventor
黄成强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zunyi Normal University
Original Assignee
Zunyi Normal University
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 Zunyi Normal University filed Critical Zunyi Normal University
Priority to CN202010969696.4A priority Critical patent/CN112101383B/en
Publication of CN112101383A publication Critical patent/CN112101383A/en
Application granted granted Critical
Publication of CN112101383B publication Critical patent/CN112101383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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
    • 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

Abstract

The invention provides a color cast image identification method; and adopting a neural network model to identify whether the input image is a color cast image, wherein a training set used for training the neural network model is constructed by adopting a normal picture set and a color cast picture set generated on the basis of the normal picture set. The invention can effectively solve the problem of data set classification of color cast pictures and realize effective identification of the color cast pictures based on the mode of generating the color cast picture set on the basis of the normal picture set.

Description

Color cast image identification method
Technical Field
The invention relates to a color cast image identification method.
Background
The convolutional neural network imitates the structure of human cerebral cortex, carries out layered processing on input data, then carries out layer-by-layer superposition, and mines the characteristics and the rules implicit in the data, thereby achieving the purposes of distinguishing and identifying. In the process of carrying out layered processing on data, the front layers are processed to extract the shallow features such as image outline colors and the like, and the rear layer focuses on extracting more abstract features. Each layer comprises different numbers of neurons as data processing basic units. The more the number of layers is, the more the number of neurons in each layer is, the larger the amount of information carried by the deep learning network is, and the stronger the processing function is. In the process of superposing the data, the extracted features are superposed together, and then the softmax and other related functions are applied to process to obtain the classification vector. The development of the convolutional neural network is subjected to the development of LeNet5, AlexNet, VGG-Net, GoogLeNet and Incep series, and the network depth is changed from shallow to deep, the number of neurons is changed from small to large, and the function is changed from simple to complex.
At present, a convolutional neural network has made a full progress, but there are some problems to be solved in color cast picture classification. First, the picture training set and the validation set are essential elements in machine training. However, at present, there is no picture training set and test set for color cast picture differentiation, so that further machine learning work cannot be carried out.
Disclosure of Invention
In order to solve the technical problems, the invention provides a color cast image identification method, which is based on a mode of generating a color cast picture set on the basis of the normal picture set, can effectively solve the problem of a data set for classifying color cast pictures and realizes effective identification of the color cast pictures.
The invention is realized by the following technical scheme.
The invention provides a color cast image identification method; and adopting a neural network model to identify whether the input image is a color cast image, wherein a training set used for training the neural network model is constructed by adopting a normal picture set and a color cast picture set generated on the basis of the normal picture set.
The color cast picture set is obtained by selecting a color channel by a random number on the basis of a normal picture set and then performing random offset on the selected color channel.
The range of the random number is 1-6, wherein 1-3 represent selecting a single color channel, and 4-6 represent selecting two color combination channels.
The neural network model employs the VGG16 algorithm.
The neural network model is obtained by performing transfer learning through a VGG16 pre-training model.
The neural network model adds a Dropout layer on the basis of a VGG16 pre-training model; dropout layer ratio is 0.6.
The neural network model is trained by adopting a learning rate of sectional attenuation.
The invention has the beneficial effects that: based on the mode of generating the color cast picture set on the basis of the normal picture set, the problem of the data set for classifying the color cast pictures can be effectively solved, and the color cast pictures can be effectively identified.
Detailed Description
The technical solution of the present invention is further described below, but the scope of the claimed invention is not limited to the described.
The invention provides a color cast image identification method; and adopting a neural network model to identify whether the input image is a color cast image, wherein a training set used for training the neural network model is constructed by adopting a normal picture set and a color cast picture set generated on the basis of the normal picture set.
The color cast picture set is obtained by selecting a color channel by a random number on the basis of a normal picture set and then carrying out random offset on the selected color channel.
The range of the random number is 1-6, wherein 1-3 represents selecting a single color channel, and 4-6 represents selecting two color combination channels.
The neural network model employs the VGG16 algorithm.
The neural network model is obtained by performing transfer learning through a VGG16 pre-training model.
The neural network model adds a Dropout layer on the basis of a VGG16 pre-training model; dropout layer ratio is 0.6.
The neural network model is trained by adopting a learning rate of sectional attenuation.
Example 1
Constructing a training set: constructing color cast picture training set and verification set
(1) Copying normal picture sets
The Pascal VOC2012 picture set (other picture sets can also be downloaded on the internet, the number of the suggested pictures is more than 5000), and the JPEGImages folder in the Pascal VOC2012 picture set is copied to the folder 0 as a normal picture set of the picture training set, and the folder contains 17125 pictures.
(2) Generating a set of colour cast pictures
All pictures in the folder 0 are taken out one by one, a normal picture without color cast is processed through the following steps of (i) - (iii), corresponding color cast pictures are generated, the processed pictures are stored in the folder 1, and the folder 1 generates 17125 color cast pictures which correspond to the folder 0 to form a color cast picture training set together. And taking partial pictures as a verification set, and recommending that about 500 pictures are taken for each type.
(3) Setting a starting point and a step length
For any normal input picture, the gray scale change start point is set to 16, and the step size step is set to 2.
(4) Generating channel selection random numbers and offset random numbers
Channel selection random integers n1 are generated, ranging from 1 to 6, and grayscale offset random integers n2, n3 are generated, ranging from 0 to 100. Wherein n1 determines which channel is selected for color shift processing, and 6 channel selection modes are set in the present invention.
(5) Color cast picture generation from random numbers
The two steps are completed to set the color cast starting point and the step size and generate the random number. In the step, a channel for color cast pollution is determined according to a channel selection random number, n1 is 1-6, and the channel is respectively corresponding to an R channel, a G channel, a B channel, an RG combined channel, an RB combined channel and a GB combined channel.
Then, the gray scale change amount is determined according to the offset random number, and the formula is as follows:
Figure BDA0002683657350000041
wherein, r, g, b represent the original gray scale respectively, and r _, g _, b _representthe processed gray scale respectively. When n1 is 1, only the R channel is changed, when n1 is 2, only the G channel is changed, when n1 is 3, only the B channel is changed, when n1 is 4, the R channel and the G channel are changed, when n1 is 5, and when n1 is 6, the G channel and the B channel are changed. The amount of change is determined by the random numbers n2 and n3 according to the above formula. Therefore, the selection of the channel is random and the amount of change is random.
Model training: deep convolutional neural network model training
The purpose of the step is to train the picture training set and the verification set, optimize parameters of each layer, obtain a high-precision classifier and realize accurate distinguishing of normal pictures and color cast pictures. The method is built based on an open source vgg16 model, the xxx.h5 weight file of the open source is imported for transfer learning, a Dropout layer is added, the learning rate is set to be attenuated in a segmented mode, and the classifier can be obtained by training for 100 periods.
Adding Dropout layer
Dropout has the function of discarding part of the parameters according to a certain proportion, so that the parameters are matched with the samples, and the overfitting phenomenon is prevented. The invention sets Dropout layer according to the proportion of 0.6 on the basis of the original model.
② setting sectional learning rate attenuation
On the basis of the original vgg16 model, learning rate piecewise attenuation is set, and values of the learning rates of all nodes are summarized according to all machine learning experiments. The training is carried out for 100 periods, the learning rate is updated every 10 periods, and the formula is as follows:
Figure BDA0002683657350000051
where LR represents the learning rate and epoch represents the training period.
Effects of the implementation
By adopting the flow of the above specific embodiment, a training set and a verification set are imported, a set vgg16 convolutional neural network model is started, and 100 periods are trained to obtain a classifier file. By adopting the scheme of the invention, through testing 549 normal pictures and 576 color cast pictures, the accuracy of identifying the normal pictures is 0.979964, and the accuracy of identifying the color cast pictures is 0.843750. The pictures outside the library are identified, the accuracy rate of identifying 300 normal pictures is 0.87, and the accuracy rate of identifying 300 color cast pictures is 0.910000. Through verification, the obtained classifier has higher distinguishing degree on the normal picture and the color cast picture.

Claims (7)

1. A color cast image recognition method is characterized in that: and adopting a neural network model to identify whether the input image is a color cast image, wherein a training set used for training the neural network model is constructed by adopting a normal picture set and a color cast picture set generated on the basis of the normal picture set.
2. The color cast image recognition method as claimed in claim 1, wherein: the color cast picture set is obtained by selecting a color channel by a random number on the basis of a normal picture set and then performing random offset on the selected color channel.
3. The color cast image recognition method as claimed in claim 2, wherein: the range of the random number is 1-6, wherein 1-3 represent selecting a single color channel, and 4-6 represent selecting two color combination channels.
4. The color cast image recognition method as claimed in claim 1, wherein: the neural network model employs the VGG16 algorithm.
5. The color cast image recognition method as claimed in claim 1, wherein: the neural network model is obtained by performing transfer learning through a VGG16 pre-training model.
6. The color cast image recognition method as claimed in claim 5, wherein: the neural network model adds a Dropout layer on the basis of a VGG16 pre-training model; dropout layer ratio is 0.6.
7. The color cast image recognition method as claimed in claim 1, wherein: the neural network model is trained by adopting a learning rate of sectional attenuation.
CN202010969696.4A 2020-09-15 2020-09-15 Color cast image identification method Active CN112101383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010969696.4A CN112101383B (en) 2020-09-15 2020-09-15 Color cast image identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010969696.4A CN112101383B (en) 2020-09-15 2020-09-15 Color cast image identification method

Publications (2)

Publication Number Publication Date
CN112101383A true CN112101383A (en) 2020-12-18
CN112101383B CN112101383B (en) 2022-10-21

Family

ID=73759315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010969696.4A Active CN112101383B (en) 2020-09-15 2020-09-15 Color cast image identification method

Country Status (1)

Country Link
CN (1) CN112101383B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050008222A1 (en) * 2001-11-19 2005-01-13 Paolo Gallina Method and device for detecting a color cast in an image
CN102750713A (en) * 2012-07-18 2012-10-24 山东神思电子技术股份有限公司 Image color shift detection method
CN105096265A (en) * 2015-06-04 2015-11-25 杭州中威电子股份有限公司 Colour offset classification method based on histogram features
US20160189399A1 (en) * 2014-12-31 2016-06-30 Xiaomi Inc. Color adjustment method and device
CN106709511A (en) * 2016-12-08 2017-05-24 华中师范大学 Urban rail transit panoramic monitoring video fault detection method based on depth learning
US20170169314A1 (en) * 2015-12-15 2017-06-15 Qualcomm Incorporated Methods for object localization and image classification
CN109460738A (en) * 2018-11-14 2019-03-12 吉林大学 A kind of road surface types evaluation method of the depth convolutional neural networks based on free of losses function
CN110400275A (en) * 2019-07-22 2019-11-01 中电健康云科技有限公司 One kind being based on full convolutional neural networks and the pyramidal color calibration method of feature
CN110751699A (en) * 2019-10-15 2020-02-04 西安电子科技大学 Color reconstruction method of optical remote sensing image based on convolutional neural network

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050008222A1 (en) * 2001-11-19 2005-01-13 Paolo Gallina Method and device for detecting a color cast in an image
CN102750713A (en) * 2012-07-18 2012-10-24 山东神思电子技术股份有限公司 Image color shift detection method
US20160189399A1 (en) * 2014-12-31 2016-06-30 Xiaomi Inc. Color adjustment method and device
CN105096265A (en) * 2015-06-04 2015-11-25 杭州中威电子股份有限公司 Colour offset classification method based on histogram features
US20170169314A1 (en) * 2015-12-15 2017-06-15 Qualcomm Incorporated Methods for object localization and image classification
CN106709511A (en) * 2016-12-08 2017-05-24 华中师范大学 Urban rail transit panoramic monitoring video fault detection method based on depth learning
CN109460738A (en) * 2018-11-14 2019-03-12 吉林大学 A kind of road surface types evaluation method of the depth convolutional neural networks based on free of losses function
CN110400275A (en) * 2019-07-22 2019-11-01 中电健康云科技有限公司 One kind being based on full convolutional neural networks and the pyramidal color calibration method of feature
CN110751699A (en) * 2019-10-15 2020-02-04 西安电子科技大学 Color reconstruction method of optical remote sensing image based on convolutional neural network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杜尚尚,等: "基于CNN回归网络的遥感图像颜色自动校正", 《计算机与现代化》 *
马成前,等: "基于机器学习的图像偏色检测", 《计算机应用与软件》 *
黄成强: "结合深度卷积神经网络的智能白平衡研究", 《光电子·激光》 *

Also Published As

Publication number Publication date
CN112101383B (en) 2022-10-21

Similar Documents

Publication Publication Date Title
CN111563841B (en) High-resolution image generation method based on generation countermeasure network
CN107464210B (en) Image style migration method based on generating type countermeasure network
De Vries et al. Guesswhat?! visual object discovery through multi-modal dialogue
CN109447906B (en) Picture synthesis method based on generation countermeasure network
CN113870371B (en) Picture color transformation device and method based on generation countermeasure network and storage medium
CN107832725A (en) Video front cover extracting method and device based on evaluation index
CN108765512B (en) Confrontation image generation method based on multi-level features
CN112307714B (en) Text style migration method based on dual-stage depth network
CN107918656A (en) Video front cover extracting method and device based on video title
CN112990385B (en) Active crowdsourcing image learning method based on semi-supervised variational self-encoder
CN109712165A (en) A kind of similar foreground picture image set dividing method based on convolutional neural networks
CN109325516A (en) A kind of integrated learning approach and device towards image classification
CN109214407A (en) Event detection model, calculates equipment and storage medium at method, apparatus
Zhang et al. Inkthetics: a comprehensive computational model for aesthetic evaluation of Chinese ink paintings
CN108345889A (en) A kind of application process carrying out registration identification to communication cabinet using Raspberry Pi
CN113724354A (en) Reference image color style-based gray level image coloring method
CN112101383B (en) Color cast image identification method
CN111914617B (en) Face attribute editing method based on balanced stack type generation type countermeasure network
CN108510483A (en) A kind of calculating using VLAD codings and SVM generates color image tamper detection method
Narvaez et al. Painting authorship and forgery detection challenges with AI image generation algorithms: Rembrandt and 17th century Dutch painters as a case study
CN115018729A (en) White box image enhancement method for content
Benato et al. Linking data separation, visual separation, and classifier performance using pseudo-labeling by contrastive learning
CN114638743A (en) Image artistic style migration method, system, electronic device and storage medium
Zhao et al. Making generated images hard to spot: A transferable attack on synthetic image detectors
CN113516199A (en) Image data generation method based on differential privacy

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