CN112101383B - Color cast image identification method - Google Patents

Color cast image identification method Download PDF

Info

Publication number
CN112101383B
CN112101383B CN202010969696.4A CN202010969696A CN112101383B CN 112101383 B CN112101383 B CN 112101383B CN 202010969696 A CN202010969696 A CN 202010969696A CN 112101383 B CN112101383 B CN 112101383B
Authority
CN
China
Prior art keywords
channel
color cast
color
picture
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.)
Active
Application number
CN202010969696.4A
Other languages
Chinese (zh)
Other versions
CN112101383A (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.)
Hefei Wisdom Dragon Machinery Design Co ltd
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

Landscapes

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

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, and constructing a training set used for training the neural network model 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 superposes layer by layer, and mines the characteristics and the rules hidden in the data to achieve 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 a different number of neurons as a data processing basic unit. The more the number of layers is, the more the number of neurons in each layer is, the larger the information amount 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 inclusion 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 still 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 adopts a VGG16 algorithm.
The neural network model is obtained by performing transfer learning through a VGG16 pre-training model.
The neural network model adds a Drapout layer on the basis of a VGG16 pre-training model; dropout layer ratio was 0.6.
The neural network model is trained by adopting a learning rate of sectional attenuation.
Example 1
Constructing a training set: constructing a color cast picture training set and a verification set
(1) Copying normal picture sets
The method comprises the steps of downloading a Pascal VOC2012 picture set (or downloading other picture sets, wherein the number of the recommended pictures is more than 5000) on the Internet, copying a JPEGImages folder in the Pascal VOC2012 picture set to a folder 0 as a normal picture set of a picture training set, and using the folder as 17125 pictures.
(2) Generating a set of colour cast pictures
Taking out all the pictures in the folder 0 one by one, processing a normal picture without color cast through the following steps (1) - (3) to generate a corresponding color cast picture, storing the processed picture in the folder 1, and generating 17125 color cast pictures by the folder 1 to 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 starting point is set to start =16, and the step size step =2.
(4) Generating channel selection random numbers and offset random numbers
The generation channel selects random integer n1, range 1-6, generates gray scale shift random integers n2, n3, range 0-100. Wherein, n1 determines which channel is selected for color cast processing, and 6 channel selection modes are set in the 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 the channel selection random number, n1 is 1-6, and the R channel, the G channel, the B channel, the RG combined channel, the RB combined channel and the GB combined channel correspond to the channel selection random number respectively.
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, the R channel and the B channel are changed, 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 open-source-based vgg16 model is built, xxx.h5 weight files of open sources are 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.
(1) Adding Dropout layer
Dropout is used to discard some parameters according to a certain ratio, so that the parameters and the samples are matched to prevent the overfitting phenomenon. The invention sets Dropout layer according to the proportion of 0.6 on the basis of the original model.
(2) Setting segment 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 specific embodiment, a training set and a verification set are introduced, 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. And identifying the pictures outside the library, wherein 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: the method comprises the following steps of adopting a neural network model to identify whether an input image is a color cast image, constructing a training set used for training the neural network model by adopting a normal picture set and a color cast picture set generated on the basis of the normal picture set, and generating the color cast picture set, wherein the specific steps of:
processing a normal picture without color cast through the following steps (1) to (3) to generate a corresponding color cast picture, storing the processed picture in a folder 1, wherein 17125 color cast pictures are generated by the folder 1 and correspond to the folder 0 to jointly form a color cast picture training set;
(1) setting a starting point and a step length
Setting a gray scale change starting point as start =16 and step =2 for any normal input picture;
(2) generating channel selection random numbers and offset random numbers
Generating a channel selection random integer n1 in a range of 1-6, and generating gray scale offset random integers n2 and n3 in a range of 0-100;
(3) color cast picture generation from random numbers
Setting a color cast starting point and a step length and generating a random number, wherein the step is to select the random number according to a channel to determine the channel for color cast pollution, n1 is 1-6, and the R channel, the G channel, the B channel, the RG combined channel, the RB combined channel and the GB combined channel correspond to the channel respectively; then, the gray scale change amount is determined according to the offset random number, and the formula is as follows:
Figure FDA0003829538170000021
wherein R, G and B respectively represent original gray scales, R _, G _andb _ respectively represent processed gray scales, 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, the R channel and the B channel are changed, 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, the selection of the channel is random, and the value of the amount of change is random.
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 represents selecting a single color channel, and 4-6 represents selecting two color combination channels.
4. The color cast image recognition method as claimed in claim 1, wherein: the neural network model adopts a 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 CN112101383A (en) 2020-12-18
CN112101383B true 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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ITTO20011080A1 (en) * 2001-11-19 2003-05-19 Olivetti Tecnost Spa ,, METHOD AND DEVICE FOR DETERMINING A CHROMATIC DOMINANT IN AN IMAGE ,,
CN104601971B (en) * 2014-12-31 2019-06-14 小米科技有限责任公司 Color adjustment method and device
US10318848B2 (en) * 2015-12-15 2019-06-11 Qualcomm Incorporated Methods for object localization and image classification

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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回归网络的遥感图像颜色自动校正;杜尚尚,等;《计算机与现代化》;20171215(第12期);第28-32页 *
基于机器学习的图像偏色检测;马成前,等;《计算机应用与软件》;20180315;第35卷(第03期);第199-204页 *
结合深度卷积神经网络的智能白平衡研究;黄成强;《光电子·激光》;20201215;第31卷(第12期);第1278-1287页 *

Also Published As

Publication number Publication date
CN112101383A (en) 2020-12-18

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
CN109447906B (en) Picture synthesis method based on generation countermeasure network
CN108711138B (en) Gray level picture colorizing method based on generation countermeasure network
Rombach et al. Text-guided synthesis of artistic images with retrieval-augmented diffusion models
Yang et al. A blind stereoscopic image quality evaluator with segmented stacked autoencoders considering the whole visual perception route
CN107832725A (en) Video front cover extracting method and device based on evaluation index
CN113870371B (en) Picture color transformation device and method based on generation countermeasure network and storage medium
CN113642621B (en) Zero sample image classification method based on generation countermeasure network
CN109712165A (en) A kind of similar foreground picture image set dividing method based on convolutional neural networks
CN112784790B (en) Generalization false face detection method based on meta-learning
CN112307714A (en) Character style migration method based on double-stage deep network
CN113724354B (en) Gray image coloring method based on reference picture color style
CN111914617B (en) Face attribute editing method based on balanced stack type generation type countermeasure network
CN114581356B (en) Image enhancement model generalization method based on style migration data augmentation
CN109214407A (en) Event detection model, calculates equipment and storage medium at method, apparatus
CN111652822A (en) Single image shadow removing method and system based on generation countermeasure network
CN114529484B (en) Deep learning sample enhancement method for direct current component change in imaging
CN108259893A (en) Virtual reality method for evaluating video quality based on double-current convolutional neural networks
CN113822160B (en) Evaluation method, system and equipment of depth counterfeiting detection model
CN112101383B (en) Color cast image identification method
Zhao et al. Making generated images hard to spot: a transferable attack on synthetic image detectors
CN107767367A (en) It is a kind of for HDR figures without reference mass method for objectively evaluating
Narvaez et al. Painting authorship and forgery detection challenges with ai image generation algorithms: Rembrandt and 17th century dutch painters as a case study
CN112487799B (en) Crowdsourcing task recommendation method utilizing outer product attention

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

Effective date of registration: 20240923

Address after: 230000 b-1018, Woye Garden commercial office building, 81 Ganquan Road, Shushan District, Hefei City, Anhui Province

Patentee after: HEFEI WISDOM DRAGON MACHINERY DESIGN Co.,Ltd.

Country or region after: China

Address before: 563000 No. 830 Shanghai Road, Huichuan District, Zunyi City, Guizhou Province

Patentee before: ZUNYI NORMAL College

Country or region before: China

TR01 Transfer of patent right