CN111242063A - Construction method of small sample classification model based on transfer learning and application of iris classification - Google Patents
Construction method of small sample classification model based on transfer learning and application of iris classification Download PDFInfo
- Publication number
- CN111242063A CN111242063A CN202010053032.3A CN202010053032A CN111242063A CN 111242063 A CN111242063 A CN 111242063A CN 202010053032 A CN202010053032 A CN 202010053032A CN 111242063 A CN111242063 A CN 111242063A
- Authority
- CN
- China
- Prior art keywords
- model
- small sample
- fully connected
- classification
- 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.)
- Granted
Links
- 238000013145 classification model Methods 0.000 title claims abstract description 17
- 238000010276 construction Methods 0.000 title claims abstract description 7
- 238000013526 transfer learning Methods 0.000 title claims description 10
- 230000006870 function Effects 0.000 claims abstract description 42
- 238000012549 training Methods 0.000 claims abstract description 38
- 238000000034 method Methods 0.000 claims abstract description 35
- 230000004913 activation Effects 0.000 claims abstract description 17
- 238000013508 migration Methods 0.000 claims abstract description 10
- 230000005012 migration Effects 0.000 claims abstract description 10
- 238000007781 pre-processing Methods 0.000 claims abstract description 6
- 238000012360 testing method Methods 0.000 claims description 14
- 210000002569 neuron Anatomy 0.000 claims description 9
- 238000013527 convolutional neural network Methods 0.000 claims description 7
- 238000013136 deep learning model Methods 0.000 abstract description 6
- 238000013135 deep learning Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000011176 pooling Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000002123 temporal effect Effects 0.000 description 3
- 238000013434 data augmentation Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 241000282414 Homo sapiens Species 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 230000008014 freezing Effects 0.000 description 1
- 238000007710 freezing Methods 0.000 description 1
- 210000002364 input neuron Anatomy 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000004205 output neuron Anatomy 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/18—Eye characteristics, e.g. of the iris
- G06V40/197—Matching; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/082—Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Ophthalmology & Optometry (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种基于迁移学习的小样本分类模型构造方法及利用该方法所构造的小样本分类模型在虹膜图像分类上的应用,基于VGG16模型迁移学习,构造ICP‑VGG模型;根据虹膜图像任务配置自定义网络中全连接层的的激活函数,Dropout层的dropout比率;微调网络,设置模型训练相关参数;获取小样本虹膜数据集,对该数据集进行数据预处理和数据增强;训练和验证模型,输出识别结果图像;本发明所提出的方法能将深度学习模型更好地应用在小样本虹膜领域中,降低过拟合,提高识别准确率。
The invention discloses a small sample classification model construction method based on migration learning and the application of the small sample classification model constructed by the method in iris image classification. Based on the migration learning of VGG16 model, an ICP-VGG model is constructed; The task is to configure the activation function of the fully connected layer in the custom network and the dropout ratio of the Dropout layer; fine-tune the network, set the relevant parameters of model training; obtain a small sample iris dataset, perform data preprocessing and data enhancement on the dataset; train and The model is verified, and the recognition result image is output; the method proposed by the present invention can better apply the deep learning model in the field of small sample iris, reduce overfitting and improve the recognition accuracy.
Description
技术领域technical field
本发明属于计算机图像技术领域,尤其是一种基于迁移学习的小样本分类模型构造方法及虹膜图像分类应用。The invention belongs to the technical field of computer images, in particular to a small sample classification model construction method based on migration learning and an iris image classification application.
背景技术Background technique
随着人类跨入大数据时代以及计算设备的快速发展,深度学习进入了一个飞速发展的时期。近年来,凭借深度学习模型强大的表达能力和大规模的训练数据集,深度学习在计算机视觉、语音识别等领域获得了显著的成果,特别是在图像分类领域,呈现了一种爆发式的增长,在大规模数据集上的图像分类准确率不断提高。大规模数据集是深度学习在各个领域取得显著成效的基石,但是在实际应用中,由于大规模数据集的获取需要花费昂贵的人力和物力或者由于某些领域本身的局限性。因此相比于大规模数据集,小样本数据集在实际应用中更加常见。例如在虹膜领域,由于其生理结构的特殊性,虹膜图像采集困难度较大,因此带标注的虹膜图像数据集也相对较小。As human beings enter the era of big data and the rapid development of computing equipment, deep learning has entered a period of rapid development. In recent years, with the powerful expressive ability of deep learning models and large-scale training data sets, deep learning has achieved remarkable results in computer vision, speech recognition and other fields, especially in the field of image classification, showing an explosive growth , the accuracy of image classification on large-scale datasets continues to improve. Large-scale data sets are the cornerstone for deep learning to achieve remarkable results in various fields, but in practical applications, the acquisition of large-scale data sets requires expensive manpower and material resources or due to the limitations of certain fields. Therefore, compared with large-scale datasets, small-sample datasets are more common in practical applications. For example, in the field of iris, due to the particularity of its physiological structure, iris image acquisition is difficult, so the annotated iris image dataset is relatively small.
在小样本虹膜数据集中,由于缺乏训练数据,应用传统的深度学习模型,很难得到理想的结果,往往会出现过拟合现象,即该模型在训练数据集上会表现得非常好,往往误差会趋向零,但是在测试数据集上表现非常差,准确率低。这是因为当深度模型十分复杂时,容易将小样本虹膜数据集的训练数据集的噪声当作整体样本的特征,学习到的模型在测试数据集上表现糟糕。为了能够将深度学习模型更好地应用在小样本虹膜领域中,降低过拟合,减小虹膜图像分类检测结果的误差,提高识别准确率,本发明提出了一种基于卷积神经网络迁移学习的虹膜图像识别方法。In the small-sample iris data set, due to the lack of training data, it is difficult to obtain ideal results by applying traditional deep learning models, and overfitting often occurs, that is, the model will perform very well on the training data set, and often errors will tend to zero, but the performance on the test data set is very poor and the accuracy rate is low. This is because when the deep model is very complex, it is easy to regard the noise of the training dataset of the small-sample iris dataset as a feature of the whole sample, and the learned model performs poorly on the test dataset. In order to better apply the deep learning model in the field of small sample iris, reduce overfitting, reduce the error of iris image classification detection results, and improve the recognition accuracy, the present invention proposes a transfer learning based on convolutional neural network. iris image recognition method.
发明内容SUMMARY OF THE INVENTION
针对现有技术中的不足,本发明提出了一种基于迁移学习的小样本分类模型构造方法及虹膜图像分类应用,可以将深度学习模型更好地应用在小样本虹膜领域中,降低过拟合,提高识别准确率。In view of the deficiencies in the prior art, the present invention proposes a small sample classification model construction method and iris image classification application based on migration learning, which can better apply the deep learning model in the small sample iris field and reduce overfitting. , to improve the recognition accuracy.
本发明所采用的技术方案如下:The technical scheme adopted in the present invention is as follows:
一种基于迁移学习的小样本分类模型构造方法,包括以下步骤:A method for constructing a small sample classification model based on transfer learning, comprising the following steps:
步骤1,去除预训练好的P-VGG16模型中三个全连接层,保留5个卷积块;并在卷积块之后添加自定义网络,构造ICP-VGG模型;所述自定义网络依次为为Flatten层、第一全连接层、Dropout层和第二全连接层;
步骤2,配置自定义网络中全连接层的神经元个数、全连接层的激活函数以及Dropout层的dropout比率;所述第一全连接层和第二全连接层中的激活函数从Sigmoid、Tanh、ReLU、PReLu、ELU或SoftMax中选择;第一全连接层的神经元个数为512或者1024,第二全连接层的神经元个数和待测样本集中类别数一致;设定Dropout层中的dropout比率;
步骤3,训练ICP-VGG模型网络;根据要解决的问题的类型,确定IC-VGG模型中的损失函数;设置模型训练相关参数;确定ICP-VGG模型的优化器;进而获得适用于图像识别的卷积神经网络模型。Step 3, train the ICP-VGG model network; determine the loss function in the IC-VGG model according to the type of the problem to be solved; set the relevant parameters for model training; determine the optimizer of the ICP-VGG model; Convolutional Neural Network Model.
进一步,所述优化器选择RMSProp,且设置RMSProp的学习率其中,为初始学习率,Epoch为模型在数据集上运行的次数,rate为衰减值;Further, the optimizer selects RMSProp, and sets the learning rate of RMSProp in, is the initial learning rate, Epoch is the number of times the model runs on the data set, and rate is the decay value;
进一步,所述训练ICP-VGG模型的方法为:保持模型前4个卷积块中网络的权重不变,只训练该模型最后一个卷积块和自定义网络;Further, the method for training the ICP-VGG model is: keeping the weights of the network in the first four convolution blocks of the model unchanged, and only training the last convolution block and the custom network of the model;
进一步,所述损失函数选择为:对于二分类问题,使用二元交叉熵损失函数;对于多分类问题,使用分类交叉熵损失函数;对于回归问题,使用均方误差损失函数;对于序列学习问题,使用联结主义时序分类函数;Further, the loss function is selected as: for binary classification problems, use binary cross-entropy loss function; for multi-classification problems, use categorical cross-entropy loss function; for regression problems, use mean square error loss function; for sequence learning problems, use Use the connectionist temporal classification function;
进一步,所述模型训练相关参数包括模型的运行次数、模型的批处理大小(batchSize);Further, the model training-related parameters include the running times of the model and the batch size (batchSize) of the model;
基于上述方法所构造的一种适用于图像识别的卷积神经网络模型,本发明还提出了一种虹膜图像识别方法,获取小样本虹膜图像数据集,并将该数据集分为训练集和测试集,分别对训练集和测试集进行数据预处理和数据增强;将处理后的训练集和测试集在上述方法构造的适用于图像识别的卷积神经网络模型上进行训练和测试,获得虹膜图像的分类结果。Based on a convolutional neural network model suitable for image recognition constructed by the above method, the present invention also proposes an iris image recognition method, which obtains a small sample iris image data set, and divides the data set into a training set and a test set. The training set and the test set are respectively subjected to data preprocessing and data enhancement; the processed training set and test set are trained and tested on the convolutional neural network model suitable for image recognition constructed by the above method, and the iris image is obtained. classification results.
进一步,所述数据预处理的方法为:将数据集中虹膜图像的尺寸修改为224*224;同时将单通道图像转变为三通道图像;Further, the data preprocessing method is: modifying the size of the iris image in the data set to 224*224; converting the single-channel image into a three-channel image at the same time;
进一步,所述数据增强的方法为:使用Keras中的ImageDataGenerator方法对训练集和测试集中的数据进行数据增强;设置参数rescale=1./255;设置参数shear_range=0.2;设置参数zoom_range=0.2;设置参数horizontal-flip=True。Further, the data enhancement method is: using the ImageDataGenerator method in Keras to perform data enhancement on the data in the training set and the test set; setting the parameter rescale=1./255; setting the parameter shear_range=0.2; setting the parameter zoom_range=0.2; setting Parameter horizontal-flip=True.
本发明的有益效果:Beneficial effects of the present invention:
(1)本发明基于迁移学习的构造小样本分类模型能够降低过拟合,提高识别准确率,获得到理想结果。(1) The small sample classification model constructed based on the transfer learning of the present invention can reduce overfitting, improve the recognition accuracy, and obtain ideal results.
(2)采用已预训练好的VGG16模型进行迁移,构造应用在小样本虹膜数据集中ICP-VGG模型,不仅可以充分利用具有良好分类基础的网络,而且可以通过源域和目标域学习模型的共享参数来传递知识,是一种将深度学习应用于小型图像数据集中的非常高效的方法。(2) The pre-trained VGG16 model is used for migration, and the ICP-VGG model is constructed and applied in the small-sample iris dataset, which can not only make full use of the network with a good classification foundation, but also learn the model through the sharing of the source domain and the target domain. parameters to transfer knowledge, is a very efficient way to apply deep learning to small image datasets.
(3)根据虹膜图像任务配置自定义网络中全连接层的的激活函数,Dropout层的dropout比率。第一全连接层激活函数选择ReLU激活函数,增强ICP-VGG模型的拟合能力。第二全连接层激活函数用SoftMax函数进行分类。Dropout层中的dropout比率设置为0.5,在训练过程中将第一层全连接层的一半特征随机舍弃,进一步降低ICP-VGG模型过拟合。(3) According to the iris image task, configure the activation function of the fully connected layer in the custom network and the dropout ratio of the dropout layer. The activation function of the first fully connected layer selects the ReLU activation function to enhance the fitting ability of the ICP-VGG model. The activation function of the second fully connected layer is classified with the SoftMax function. The dropout ratio in the dropout layer is set to 0.5, and half of the features of the first fully connected layer are randomly discarded during the training process to further reduce the overfitting of the ICP-VGG model.
(4)微调网络,设置模型训练相关参数。微调ICP-VGG16模型,冻结部分网络权重,可以避免从头开始训练的困难,有效地防止网络过拟合,相对于从头训练,微调将省去大量的计算资源和计算时间,提高计算效率及准确率。选择分类交叉熵作为损失函数,可以更好地衡量网络输出地概率分布和标签地真实分布。选择RMSProp作为模型的优化器,并且赋值动态的学习率,可以更好地基于训练数据和损失函数来更新网络的权重。(4) Fine-tune the network and set the relevant parameters for model training. Fine-tuning the ICP-VGG16 model and freezing some network weights can avoid the difficulty of training from scratch and effectively prevent network overfitting. Compared with training from scratch, fine-tuning will save a lot of computing resources and computing time, and improve computing efficiency and accuracy. . Choosing categorical cross-entropy as the loss function can better measure the probability distribution of network output and the true distribution of labels. Choosing RMSProp as the optimizer of the model and assigning a dynamic learning rate can better update the weights of the network based on the training data and loss function.
(5)获取小样本虹膜数据集,对该数据集进行数据预处理和数据增强。对数据进行预处理,使原始数据更适于用神经网络处理,提高算法效果。使用数据增强技术,从现有的训练样本中生成更多的训练数据,让模型观察到数据更多内容,从而具有更好的泛化能力。(5) Obtain a small sample iris dataset, and perform data preprocessing and data enhancement on the dataset. The data is preprocessed to make the original data more suitable for processing by the neural network and improve the algorithm effect. Use data augmentation techniques to generate more training data from existing training samples, allowing the model to observe more of the data and thus have better generalization capabilities.
附图说明Description of drawings
图1是本发明的方法实现原理流程图;Fig. 1 is the method realization principle flow chart of the present invention;
图2为本发明迁移模型VGG16的模型结构图;Fig. 2 is the model structure diagram of the migration model VGG16 of the present invention;
图3为本发明CP-VGG16模型的简化网络结构图;Fig. 3 is the simplified network structure diagram of CP-VGG16 model of the present invention;
图4为本发明ICP-VGG模型的简化网络结构图;Fig. 4 is the simplified network structure diagram of ICP-VGG model of the present invention;
图5为本发明ICP-VGG模型的微调简化网络结构图;Fig. 5 is the fine-tuning simplified network structure diagram of the ICP-VGG model of the present invention;
图6为本发明ICP-VGG模型在小样本虹膜数据集上输出识别结果图像。FIG. 6 is an image of the recognition result output by the ICP-VGG model of the present invention on a small sample iris data set.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用于解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
为了将深度学习模型更好地应用在小样本虹膜领域中,降低过拟合,提高识别准确率,如图1所示,本发明提出了一种基于迁移学习的小样本分类模型构造方法,包括以下步骤实现:In order to better apply the deep learning model in the field of small sample iris, reduce overfitting and improve the recognition accuracy, as shown in Figure 1, the present invention proposes a method for constructing a small sample classification model based on transfer learning, including: The following steps are implemented:
步骤1:基于VGG16模型迁移学习,构造ICP-VGG模型Step 1: Construct ICP-VGG model based on VGG16 model transfer learning
(1)使用已在大型数据集ImageNet(包含140万张图片)上预训练好的VGG16模型记为P-VGG16,该模型初始输入大小是224*224,网络结构如图2所示,由卷积块和三个全连接层(fully connected)构成,其中卷积块由13层卷积层(convolution)和3层池化层(maxpooling)构成并分成五组,第一、二组均由两个卷积层和一个池化层构成,第三、四、五组均由三个卷积层和池化层构造。(1) Use the VGG16 model that has been pre-trained on the large dataset ImageNet (including 1.4 million images) and record it as P-VGG16. The initial input size of the model is 224*224, and the network structure is shown in Figure 2. The accumulation block is composed of three fully connected layers. The convolution block is composed of 13 layers of convolution layers (convolution) and 3 layers of pooling layers (maxpooling) and is divided into five groups. The first and second groups are composed of two layers. It consists of three convolutional layers and one pooling layer, and the third, fourth, and fifth groups are all constructed by three convolutional layers and pooling layers.
(2)去除P-VGG16中的最后三层全连接层,保留P-VGG16中的卷积基(Convolutional basis)为CP-VGG16,如图3所示。(2) Remove the last three fully connected layers in P-VGG16, and keep the convolutional basis in P-VGG16 as CP-VGG16, as shown in Figure 3.
(3)将CP-VGG16作为卷积基迁移到小样本虹膜(Iris)数据集上,并在CP-VGG16后面添加四层自定义网络,构造ICP-VGG模型,共计22层,如图4所示。自定义网络依次为Flatten层、第一全连接层Dropout层和第二全连接层。其中,Flatten层的作用:将输入“压平”即把多维的输入一维化。全连接层的作用:将学习到的特征映射到样本标签中进行分类。Dropout层的作用:为了降低模型在小样本数据集中的过拟合现象,在训练过程中随机将该层的一些输出特征舍弃。(3) Migrate CP-VGG16 as a convolution base to the small-sample iris (Iris) dataset, and add four layers of custom network behind CP-VGG16 to construct an ICP-VGG model with a total of 22 layers, as shown in Figure 4 Show. The custom network is the Flatten layer, the first fully connected layer, the Dropout layer, and the second fully connected layer. Among them, the role of the Flatten layer: to "flatten" the input, that is, to make the multi-dimensional input one-dimensional. The role of the fully connected layer: map the learned features to sample labels for classification. The role of the Dropout layer: In order to reduce the overfitting phenomenon of the model in the small sample data set, some output features of this layer are randomly discarded during the training process.
步骤2:根据虹膜图像分类任务,配置自定义网络中全连接层的神经元个数和激活函数,Dropout层的dropout比率。Step 2: According to the iris image classification task, configure the number of neurons and activation function of the fully connected layer in the custom network, and the dropout ratio of the dropout layer.
2.1,确定全连接层中的激活函数。在模型中,激活函数定义了从输入神经元到输出神经元的映射关系,它的作用主要是能够给神经网络加入一些非线性的因素,使得神经网络具有更好的拟合能力,能够解决较复杂的问题。常见的激活函数有Sigmoid、Tanh、ReLU、PReLu、ELU和SoftMax。一般来说,在分类问题上使用ReLU激活函数或者ELU激活函数,本发明研究的是虹膜图像分类问题,因此第一全连接层中的激活函数使用ReLU,第二全连接层中的激活函数使用Softmax进行分类。2.1, Determine the activation function in the fully connected layer. In the model, the activation function defines the mapping relationship from the input neuron to the output neuron. Its function is mainly to add some nonlinear factors to the neural network, so that the neural network has a better fitting ability and can solve the problem of more complex problems. complicated question. Common activation functions are Sigmoid, Tanh, ReLU, PReLu, ELU, and SoftMax. Generally speaking, the ReLU activation function or the ELU activation function is used in the classification problem. The present invention studies the iris image classification problem. Therefore, the activation function in the first fully connected layer uses ReLU, and the activation function in the second fully connected layer uses ReLU. Softmax for classification.
2.2,设定第一全连接层的神经元个数为1024,第二全连接层的神经元个数和虹膜数据集中类别数一致,在本实施例中为407。2.2. The number of neurons in the first fully connected layer is set to 1024, and the number of neurons in the second fully connected layer is the same as the number of categories in the iris data set, which is 407 in this embodiment.
2.3,设定Dropout层中的dropout比率设置为0.5,在训练过程中将第一全连接层的一半特征随机舍弃,进一步降低ICP-VGG模型过拟合。2.3, set the dropout ratio in the Dropout layer to 0.5, and randomly discard half of the features of the first fully connected layer during the training process to further reduce the overfitting of the ICP-VGG model.
步骤3:微调网络,设置模型训练相关参数Step 3: Fine-tune the network and set the relevant parameters for model training
3.1,冻结ICP-VGG16中前4个卷积块,即让这4个卷积块在模型训练过程中保持其权重不变,只训练该模型第5个卷积块和自定义网络(三个卷积层,一个池化层,一个Flatten层,一个第一全连接层,一个Dropout层,一个第二全连接层),如图5所示。3.1. Freeze the first 4 convolution blocks in ICP-VGG16, that is, keep the weights of these 4 convolution blocks unchanged during the model training process, and only train the 5th convolution block of the model and the custom network (three Convolutional layer, a pooling layer, a Flatten layer, a first fully connected layer, a dropout layer, a second fully connected layer), as shown in Figure 5.
3.2,根据要解决的问题的类型,确定IC-VGG模型中的损失函数。例如,对于二分类问题,可以使用二元交叉熵(binary crossentropy)损失函数;对于多分类问题,可以使用分类交叉熵(categorical crossentropy)损失函数;对于回归问题,可以使用均方误差(mean-squared-error)损失函数;对于序列学习问题,可以用联结主义时序分类(CTC,connection temporal classification)函数。本发明研究的问题是虹膜图像分类问题,因此选择的损失函数为分类交叉熵(categorical crossentropy)。3.2, Determine the loss function in the IC-VGG model according to the type of problem to be solved. For example, for binary classification problems, you can use the binary crossentropy loss function; for multiclass problems, you can use the categorical crossentropy loss function; for regression problems, you can use the mean-squared error -error) loss function; for sequence learning problems, the connection temporal classification (CTC, connection temporal classification) function can be used. The problem studied in the present invention is the iris image classification problem, so the selected loss function is categorical crossentropy.
3.3,设置模型的运行次数(Epoch)为50,即该模型在整个数据集上运行50次。设置模型的批处理大小(batchSize)设置为10,即模型一次训练的样本数为10。3.3, set the number of runs (Epoch) of the model to 50, that is, the model runs 50 times on the entire dataset. Set the batch size (batchSize) of the model to 10, that is, the number of samples for the model to be trained at a time is 10.
3.4,确定ICP-VGG模型的优化器。在模型中,优化器可以用来更新和影响模型训练和模型输出的网络参数,使其逼近或达到最优值,从而最小化损失函数的值。本发明研究的问题是虹膜图像分类问题,选择RMSProp作为ICP-VGG模型的优化器。RMSProp优化器中学习率lr根据式(1)设置为动态学习率。3.4, Determine the optimizer of the ICP-VGG model. In the model, the optimizer can be used to update and influence the network parameters of the model training and model output to approximate or reach the optimal value, thereby minimizing the value of the loss function. The problem studied in the present invention is the iris image classification problem, and RMSProp is selected as the optimizer of the ICP-VGG model. The learning rate lr in the RMSProp optimizer is set to the dynamic learning rate according to equation (1).
其中,Epoch为模型在数据集上运行的次数,为初始学习率,本发明设置为0.0001,rate为衰减值,本实用发明取1.8×10-8。本发明选择RMSProp作为模型的优化器,并且赋值动态的学习率,可以更好地基于训练数据和损失函数来更新网络的权重。where Epoch is the number of times the model runs on the dataset, is the initial learning rate, which is set to 0.0001 in the present invention, and the rate is the attenuation value, which is 1.8×10 -8 in the present invention. The present invention selects RMSProp as the optimizer of the model, and assigns a dynamic learning rate, which can better update the weight of the network based on the training data and the loss function.
基于上述方法所构造的基于迁移学习的小样本分类模型,本发明还提出了一种虹膜图像识别方法,Based on the small sample classification model based on migration learning constructed by the above method, the present invention also proposes an iris image recognition method,
1.1,在中国科学院自动化研究所网站上下载虹膜数据集CASIA-Iris-Lamp,该数据集包含左右眼,取右眼为研究对象,有407个类别,共8050张图片。将每类中3/5数量的图片划分为训练集,每类中2/5数量的图片划分为测试集。1.1. Download the iris dataset CASIA-Iris-Lamp on the website of the Institute of Automation, Chinese Academy of Sciences. The dataset contains left and right eyes, and the right eye is taken as the research object. There are 407 categories and a total of 8050 pictures. Divide 3/5 of the pictures in each class into the training set and 2/5 of the pictures in each class into the test set.
2.2,对训练集和测试集中的图片进行预处理。数据集中原始图片的大小为640*480像素,且为单通道图像,为了便于网络训练,将数据集中图片的尺寸修改为224*224,单通道图像转变为三通道图像。2.2, preprocess the images in the training set and test set. The size of the original image in the dataset is 640*480 pixels, and it is a single-channel image. In order to facilitate network training, the size of the image in the dataset is modified to 224*224, and the single-channel image is converted into a three-channel image.
3.3,由于虹膜样本集中的训练数据相对较少,为了降低过拟合,使用Keras中的ImageDataGenerator方法,对训练集和测试集中的数据进行数据增强。ImageDataGenerator中具体的参数设置如下:3.3. Since the training data in the iris sample set is relatively small, in order to reduce over-fitting, the ImageDataGenerator method in Keras is used to perform data augmentation on the data in the training set and test set. The specific parameter settings in ImageDataGenerator are as follows:
a,设置参数rescale=1./255,即将图片中的像素0-255放缩到0-1之间;a, set the parameter rescale=1./255, that is, scale the pixels 0-255 in the picture to between 0-1;
b,设置参数shear_range=0.2,即图像随机错切变换的角度为0.2;b, set the parameter shear_range=0.2, that is, the angle of the random staggered transformation of the image is 0.2;
c,设置参数zoom_range=0.2,即图像随机缩放的范围为0.2;c, set the parameter zoom_range=0.2, that is, the range of random zooming of the image is 0.2;
d,设置参数horizontal-flip=True,即随机将一半图像水平翻转。d. Set the parameter horizontal-flip=True, that is, randomly flip half of the images horizontally.
为了验证应用本发明图像识别的卷积神经网络模型在虹膜图像识别上的效果,如图6所示将构造的ICP-VGG模型在小样本虹膜数据集上进行训练和测试,根据分类结果输出准确率曲线,输出损失值曲线图。测试集上的准确率维持在97.63%左右,损失函数loss值为0.1898左右,验证结果证明该模型在小样本虹膜数据集上有效地避免了过拟合现象,降低了虹膜图像分类检测结果的误差,极大地提升了准确率。In order to verify the effect of applying the convolutional neural network model for image recognition of the present invention on iris image recognition, the constructed ICP-VGG model is trained and tested on a small sample iris data set as shown in Figure 6, and the output is accurate according to the classification result. rate curve, output loss value graph. The accuracy rate on the test set is maintained at about 97.63%, and the loss function loss value is about 0.1898. The verification results prove that the model can effectively avoid overfitting on the small-sample iris data set and reduce the error of iris image classification and detection results. , which greatly improves the accuracy.
以上实施例仅用于说明本发明的设计思想和特点,其目的在于使本领域内的技术人员能够了解本发明的内容并据以实施,本发明的保护范围不限于上述实施例。所以,凡依据本发明所揭示的原理、设计思路所作的等同变化或修饰,均在本发明的保护范围之内。The above embodiments are only used to illustrate the design ideas and features of the present invention, and the purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly, and the protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made according to the principles and design ideas disclosed in the present invention fall within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010053032.3A CN111242063B (en) | 2020-01-17 | 2020-01-17 | Construction method of small sample classification model based on transfer learning and application of iris classification |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010053032.3A CN111242063B (en) | 2020-01-17 | 2020-01-17 | Construction method of small sample classification model based on transfer learning and application of iris classification |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111242063A true CN111242063A (en) | 2020-06-05 |
CN111242063B CN111242063B (en) | 2023-08-25 |
Family
ID=70871263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010053032.3A Active CN111242063B (en) | 2020-01-17 | 2020-01-17 | Construction method of small sample classification model based on transfer learning and application of iris classification |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111242063B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111507648A (en) * | 2020-06-30 | 2020-08-07 | 航天宏图信息技术股份有限公司 | Territorial space planning evaluation system |
CN111783571A (en) * | 2020-06-17 | 2020-10-16 | 陕西中医药大学 | A kind of cervical cell automatic classification model establishment and cervical cell automatic classification method |
CN112115265A (en) * | 2020-09-25 | 2020-12-22 | 中国科学院计算技术研究所苏州智能计算产业技术研究院 | Small sample learning method in text classification |
CN112529094A (en) * | 2020-12-22 | 2021-03-19 | 中国医学科学院北京协和医院 | Medical image classification and identification method and system |
CN112949454A (en) * | 2021-02-26 | 2021-06-11 | 西安工业大学 | An Iris Recognition Method Based on Few-Sample Learning |
CN113116363A (en) * | 2021-04-15 | 2021-07-16 | 西北工业大学 | Method for judging hand fatigue degree based on surface electromyographic signals |
CN113627501A (en) * | 2021-07-30 | 2021-11-09 | 武汉大学 | Animal image type identification method based on transfer learning |
CN113627271A (en) * | 2021-07-18 | 2021-11-09 | 武汉大学 | Mobile rock mineral rapid intelligent identification method |
CN114295967A (en) * | 2021-07-26 | 2022-04-08 | 桂林电子科技大学 | A fault diagnosis method for analog circuits based on transfer neural network |
CN115937153A (en) * | 2022-12-13 | 2023-04-07 | 北京瑞医博科技有限公司 | Model training method, device, electronic equipment and computer storage medium |
CN119125465A (en) * | 2024-11-12 | 2024-12-13 | 中科智科技(合肥)有限公司 | Aging test method of nitrogen oxide sensor based on deep learning |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109409342A (en) * | 2018-12-11 | 2019-03-01 | 北京万里红科技股份有限公司 | A kind of living iris detection method based on light weight convolutional neural networks |
CN109508650A (en) * | 2018-10-23 | 2019-03-22 | 浙江农林大学 | A kind of wood recognition method based on transfer learning |
CN110084156A (en) * | 2019-04-12 | 2019-08-02 | 中南大学 | A kind of gait feature abstracting method and pedestrian's personal identification method based on gait feature |
-
2020
- 2020-01-17 CN CN202010053032.3A patent/CN111242063B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109508650A (en) * | 2018-10-23 | 2019-03-22 | 浙江农林大学 | A kind of wood recognition method based on transfer learning |
CN109409342A (en) * | 2018-12-11 | 2019-03-01 | 北京万里红科技股份有限公司 | A kind of living iris detection method based on light weight convolutional neural networks |
CN110084156A (en) * | 2019-04-12 | 2019-08-02 | 中南大学 | A kind of gait feature abstracting method and pedestrian's personal identification method based on gait feature |
Non-Patent Citations (1)
Title |
---|
VINEET KUMAR: "Iris Localization Based on Integro-Differential Operator for Unconstrain ed Infrared Iris Images" * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111783571A (en) * | 2020-06-17 | 2020-10-16 | 陕西中医药大学 | A kind of cervical cell automatic classification model establishment and cervical cell automatic classification method |
CN111507648A (en) * | 2020-06-30 | 2020-08-07 | 航天宏图信息技术股份有限公司 | Territorial space planning evaluation system |
CN112115265A (en) * | 2020-09-25 | 2020-12-22 | 中国科学院计算技术研究所苏州智能计算产业技术研究院 | Small sample learning method in text classification |
CN112529094A (en) * | 2020-12-22 | 2021-03-19 | 中国医学科学院北京协和医院 | Medical image classification and identification method and system |
CN112949454B (en) * | 2021-02-26 | 2023-04-18 | 西安工业大学 | Iris recognition method based on small sample learning |
CN112949454A (en) * | 2021-02-26 | 2021-06-11 | 西安工业大学 | An Iris Recognition Method Based on Few-Sample Learning |
CN113116363A (en) * | 2021-04-15 | 2021-07-16 | 西北工业大学 | Method for judging hand fatigue degree based on surface electromyographic signals |
CN113627271A (en) * | 2021-07-18 | 2021-11-09 | 武汉大学 | Mobile rock mineral rapid intelligent identification method |
CN114295967A (en) * | 2021-07-26 | 2022-04-08 | 桂林电子科技大学 | A fault diagnosis method for analog circuits based on transfer neural network |
CN113627501A (en) * | 2021-07-30 | 2021-11-09 | 武汉大学 | Animal image type identification method based on transfer learning |
CN115937153A (en) * | 2022-12-13 | 2023-04-07 | 北京瑞医博科技有限公司 | Model training method, device, electronic equipment and computer storage medium |
CN119125465A (en) * | 2024-11-12 | 2024-12-13 | 中科智科技(合肥)有限公司 | Aging test method of nitrogen oxide sensor based on deep learning |
CN119125465B (en) * | 2024-11-12 | 2025-02-21 | 中科智科技(合肥)有限公司 | Nitrogen-oxygen sensor aging test method based on deep learning |
Also Published As
Publication number | Publication date |
---|---|
CN111242063B (en) | 2023-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111242063B (en) | Construction method of small sample classification model based on transfer learning and application of iris classification | |
CN111858989B (en) | An image classification method based on attention mechanism and spiking convolutional neural network | |
CN112699956B (en) | Neuromorphic visual target classification method based on improved impulse neural network | |
CN111311538B (en) | Multi-scale lightweight road pavement detection method based on convolutional neural network | |
CN111861906B (en) | Pavement crack image virtual augmentation model establishment and image virtual augmentation method | |
CN109829541A (en) | Deep neural network incremental training method and system based on learning automaton | |
CN108960127A (en) | Pedestrian's recognition methods again is blocked based on the study of adaptive depth measure | |
CN110120020A (en) | A kind of SAR image denoising method based on multiple dimensioned empty residual error attention network | |
CN113205048B (en) | Gesture recognition method and recognition system | |
CN113537305A (en) | Image classification method based on matching network less-sample learning | |
CN108416755A (en) | A method and system for image denoising based on deep learning | |
CN108648188A (en) | A kind of non-reference picture quality appraisement method based on generation confrontation network | |
CN108073917A (en) | A kind of face identification method based on convolutional neural networks | |
CN109272107A (en) | A method of improving the number of parameters of deep layer convolutional neural networks | |
CN115019173B (en) | Garbage recognition and classification method based on ResNet50 | |
Yang | A CNN-based broad learning system | |
CN108573479A (en) | Face Image Deblurring and Restoration Method Based on Dual Generative Adversarial Network | |
CN108665005A (en) | A method of it is improved based on CNN image recognition performances using DCGAN | |
CN109086802A (en) | A kind of image classification method based on biquaternion convolutional neural networks | |
CN114861838B (en) | Intelligent classification method for pulsatile neural brains based on neuron complex dynamics | |
CN107423815A (en) | A kind of computer based low quality classification chart is as data cleaning method | |
CN107609634A (en) | A kind of convolutional neural networks training method based on the very fast study of enhancing | |
CN110490265A (en) | A kind of image latent writing analysis method based on two-way convolution sum Fusion Features | |
CN111144500A (en) | Differential Privacy Deep Learning Classification Method Based on Analytic Gaussian Mechanism | |
CN114881861B (en) | Imbalanced image super-resolution method based on dual sampling texture-aware distillation learning |
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 |