CN113627501A - Animal image type identification method based on transfer learning - Google Patents

Animal image type identification method based on transfer learning Download PDF

Info

Publication number
CN113627501A
CN113627501A CN202110870176.2A CN202110870176A CN113627501A CN 113627501 A CN113627501 A CN 113627501A CN 202110870176 A CN202110870176 A CN 202110870176A CN 113627501 A CN113627501 A CN 113627501A
Authority
CN
China
Prior art keywords
model
training
animal
image
data 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.)
Pending
Application number
CN202110870176.2A
Other languages
Chinese (zh)
Inventor
吴静
张明琦
高珊珊
江昊
周建国
陈琪美
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202110870176.2A priority Critical patent/CN113627501A/en
Publication of CN113627501A publication Critical patent/CN113627501A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • 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)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention provides an animal image type identification method based on transfer learning, which is characterized in that after a proper deep learning model is selected according to image task classification requirements, in order to avoid the problem of poor model training effect caused by sample data shortage, space geometric transformation is used for carrying out enhancement processing on ImageNet data set samples, so that a pre-model is obtained. And finally, model migration is carried out according to parameters learned by the pre-model, so that the accuracy of image identification under the condition of sample data shortage is improved, and the method can be better used for monitoring and protecting field animals.

Description

Animal image type identification method based on transfer learning
Technical Field
The invention relates to the technical field of image recognition, in particular to an animal image type recognition method based on transfer learning.
Background
For monitoring field animals, the current monitoring mode of field animals mainly adopts an infrared camera method. Although the infrared camera method can bring certain data support to field animal monitoring, the infrared camera method is easily interfered by the environment, and a large number of invalid pictures can be generated in the image acquisition process. In addition, the animal image of gathering still generally needs to carry out artifical screening after retrieving, along with the continuous increase of monitoring area open-air animal photo quantity, has increaseed the burden that the staff carries out animal image processing in the later stage.
With the development of computer vision, image data can be processed and analyzed by a computer. After the deep learning model is subjected to a multi-layer nonlinear transformation process, various category characteristics can be automatically extracted from a large amount of sample data without providing any prior knowledge. In deep learning, if a network model with higher quality is to be trained, a complete data set is the key point. In an actual scene, due to the fact that the cost of labeling data is very high, enough training data distributed in the same way cannot be provided for a target task, and therefore the training effect is poor and the classification accuracy is not high.
Therefore, the technical problem that the classification accuracy is not high in the conventional method is solved.
Disclosure of Invention
The invention provides an animal image type identification method based on transfer learning, which is used for solving or at least partially solving the technical problem of low classification accuracy in the prior art.
In order to solve the technical problem, the invention provides an animal image type identification method based on transfer learning, which comprises the following steps:
s1: selecting a deep learning model according to the requirement of an image classification task;
s2: performing enhancement processing on the animal classification data set sample by using space geometric class transformation and noise adding operation on the ImageNet data set;
s3: pre-training the deep learning model selected in the step S1 by using the training set obtained in the step S2, setting the number of neurons in the full connection layer of the neural network to be 1000, obtaining a pre-training model, and storing the weight parameters learned in the pre-training process;
s4: modifying the number of neurons of a full connection layer in a neural network according to the actual image classification task requirement;
s5: training the deep learning model with the full-connected layer modified on the animal image data set by using the weight parameters learned by the pre-training model in the step S3, and finely adjusting network parameters in the training process to obtain a final classification model;
s6: and identifying the animal image type by using the final classification model.
In one embodiment, the deep learning model in step S1 includes a VGG model, an inclusion model, and a ResNet model.
In one embodiment, the spatial geometry class transformation in step S2 includes flipping, scaling and rotating operations, and the noise adding operation includes adding gaussian noise and random noise.
In one embodiment, the pre-training model in S3 includes a basic pre-training model and a deep pre-training model, where the basic pre-training model is used to process the data set into various animal species data sets, and the deep pre-training model is used to re-classify the classified animal species data sets, so that specific animal classes can be obtained.
In one embodiment, S4 includes: and modifying the number of the neurons of the full connection layer in the neural network according to the actually classified types.
In one embodiment, step S5 fine-tunes the model using one of two different fine-tuning methods, the first method being local fine tuning: loading weight parameters of a pre-training model, fixing parameters of all convolutional layers in front of a full-link layer, then training on an animal image data set, and only finely adjusting the final full-link layer; the second way is global fine tuning: and loading the weight parameters of the pre-training model, directly training on the animal image data set, and finely adjusting the parameters of all layers.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the animal image type identification method based on the transfer learning fully absorbs and utilizes the advantages of the deep learning method and the transfer learning method, and firstly selects a proper deep learning model according to the image task classification requirement. In order to avoid the problem of poor model training effect caused by sample data shortage, the spatial geometry transformation is used for carrying out enhancement processing on the animal classification data set samples, so that a pre-model is obtained. And finally, model migration is carried out according to the parameters learned by the pre-model, so that the identification accuracy is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is an image enhancement example of an embodiment of the present invention;
FIG. 2 is a diagram illustrating transfer learning in an embodiment;
FIG. 3 is a model-based migration process in an embodiment.
Detailed Description
The inventor of the application finds that in an actual scene, due to the fact that cost of labeled data is very high, enough training data distributed in the same way cannot be provided for a target task in many times through a large amount of research and practice. Therefore, if there is a large amount of training data included in a related task, although the distribution of the training data is not exactly the same as that of the target task, because the training data is very large in size, we can learn some generalizable knowledge from the training data, and the knowledge is helpful to the target task.
In summary, the shortage of the sample data set is a big problem that the application of the deep learning technology in a specific scene is hindered at present, and the transfer learning is an effective way for improving the accuracy of the deep model under the condition of the shortage of the sample data set. Under the condition that enough training data cannot be acquired or the cost for acquiring the data is very high, the target task can obtain a good learning effect through transfer learning. Therefore, the animal image type identification method based on the transfer learning is designed, more post-processing tasks such as image screening, classification and the like are transferred to the front end to be carried out, so that the accuracy of model identification is improved, the whole investigation and research period is shortened, and the method has very important significance for monitoring field animals.
Based on the method, the invention provides an animal image type identification method based on transfer learning, which is mainly used for diversity investigation of field animals. Animal image screening and classification tasks are completed on the embedded platform based on a deep learning model, and transfer learning is introduced, so that model accuracy is improved under the condition of lacking sample data, and field animal monitoring and protection are better served.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an animal image type identification method based on transfer learning, which comprises the following steps:
s1: selecting a deep learning model according to the requirement of an image classification task;
s2: performing enhancement processing on the animal classification data set sample by using space geometric class transformation and noise adding operation on the ImageNet data set;
s3: pre-training the deep learning model selected in the step S1 by using the training set obtained in the step S2, setting the number of neurons in the full connection layer of the neural network to be 1000, obtaining a pre-training model, and storing the weight parameters learned in the pre-training process;
s4: modifying the number of neurons of a full connection layer in a neural network according to the actual image classification task requirement;
s5: training the deep learning model with the full-connected layer modified on the animal image data set by using the weight parameters learned by the pre-training model in the step S3, and finely adjusting network parameters in the training process to obtain a final classification model;
s6: and identifying the animal image type by using the final classification model.
Specifically, the problem that the number of pictures acquired in field monitoring is very limited can be solved by performing enhancement processing on an animal classification data set sample and performing noise adding operation on an image by using space geometric class transformation on an ImageNet data set.
In one embodiment, the deep learning model in step S1 includes a VGG model, an inclusion model, and a ResNet model.
In specific implementation, according to the requirement of the image classification task, a VGG (vertical gradient graph), an inclusion model, a ResNet model and the like can be selected. VGGNet and ResNet can extract more complex features to accomplish more difficult tasks than traditional shallow convolutional neural networks. In this embodiment, the ResNet model is selected for classification of the image.
In one embodiment, the spatial geometry class transformation in step S2 includes flipping, scaling and rotating operations, and the noise adding operation includes adding gaussian noise and random noise.
Specifically, in the sample data enhancement process, in order to reduce the influence of the image transformation operation on the animal feature information in the wild animal identification data set as much as possible, the sample enhancement is performed by using the flipping and scaling rotation operations. There are two types of image flipping methods in total, one is horizontal flipping and the other is vertical flipping. Different scenes have different requirements on turning, for example, in character recognition, the image can not be horizontally turned or vertically turned. For animal images, vertical flipping is also not suitable, so horizontal flipping is used only to increase the number of samples. On the other hand, the rotation operation of the image generally causes the loss of image information, and a part of the wild animal image only contains animal feature information at the corners of the image, so that the scaling operation is required to be matched to achieve the purpose of retaining complete image information.
In the implementation, as shown in fig. 1 (including parts (a), (b) and (c), (a) is an original image, (b) is a horizontally mirrored image, and (c) is a scaled and rotated image), in each type of animal image in the wild animal image classification dataset, 50% of the images are randomly selected to be horizontally mirrored and inverted, and the other 50% are firstly scaled by 80% and then randomly rotated clockwise or counterclockwise by any angle within 15 degrees.
The image is enhanced through the noise adding operation, and some low-frequency-band noise is added to slightly change the image but not to excessively affect the image quality. In addition, watermarks of different rules can be added, so that the number of images is increased. For example, the sum of the G value of RGB three colors and the absolute value is less than or equal to 4 at some pixel point.
In one embodiment, the pre-training model in S3 includes a basic pre-training model and a deep pre-training model, where the basic pre-training model is used to process the data set into various animal species data sets, and the deep pre-training model is used to re-classify the classified animal species data sets, so that specific animal classes can be obtained.
Specifically, because the transfer learning of animals can have certain regularity, basic animal species such as mammals, birds, fishes and the like can be learned by using a large number of animal picture models, and then specific species (such as proportional tigers, lions and the like) of some wild animals can be detailed according to the learned species. Firstly, a basic pre-training model is obtained, and then the classified animal species data set is subjected to training again to obtain a deep pre-training model, so that the training is divided into two steps, and the levels are progressive, so that the accuracy of model training is improved, the training speed is increased, and the time complexity in the training process is reduced.
In the specific implementation process, the last fully-connected layer of the neural network is usually used for classification, so the number of neurons of the layer corresponds to the number of classes of data, and the ImageNet data set comprises 1000 classes, so the last fully-connected layer of the deep learning model comprises 1000 neurons.
In one embodiment, S4 includes: and modifying the number of the neurons of the full connection layer in the neural network according to the actually classified types.
In a specific implementation process, the data set in this embodiment includes 10 categories, and therefore, the number of neurons in the last fully-connected layer needs to be changed from 1000 to 10 to correspond to the sample data set, and the parameters of the last fully-connected layer are initialized randomly.
In one embodiment, step S5 fine-tunes the model using one of two different fine-tuning methods, the first method being local fine tuning: loading weight parameters of a pre-training model, fixing parameters of all convolutional layers in front of a full-link layer, then training on an animal image data set, and only finely adjusting the final full-link layer; the second way is global fine tuning: and loading the weight parameters of the pre-training model, directly training on the animal image data set, and finely adjusting the parameters of all layers.
Specifically, as shown in fig. 2, by using the migration learning technique, a pre-trained model that has been trained on a sample-rich dataset (e.g., ImageNet dataset) can be used directly to fine-tune network parameters using a small sample dataset (existing collected animal image dataset) for the same type of problem. Because the similar problem is solved, the data set used in the pre-training process is similar to the small sample data set under the specific problem in type, so the parameters of the model in the data feature extraction process can be shared, and the difference is only the difference of the final output category. By reusing the parameters of the neural network layer used for feature extraction in the pre-training model and then utilizing the small sample data set to adjust the parameters of other neural network layers used for classification, higher identification accuracy can be obtained under the condition of lacking sample data.
Training based on the migration learning strategy is completed through step S5, and the migration process of the model is as shown in fig. 3. Finally, the obtained final classification model can be used for animal species identification.
Compared with the prior art, the invention has the beneficial effects that:
by means of transfer learning and sample enhancement technology, the problem of poor deep learning model effect caused by lack of sample data sets is solved, and accuracy of animal image identification and classification is further improved.
The foregoing is a preferred embodiment of the present invention, it is to be understood that the invention is not limited to the form disclosed herein, but is not to be construed as excluding other embodiments, and is capable of other combinations, additions and modifications, and may be practiced otherwise than as specifically described within the scope of the appended claims, as may be amended by those skilled in the art to which this invention pertains. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1. An animal image type identification method based on transfer learning is characterized by comprising the following steps:
s1: selecting a deep learning model according to the requirement of an image classification task;
s2: performing enhancement processing on the animal classification data set sample by using space geometric class transformation and noise adding operation on the ImageNet data set;
s3: pre-training the deep learning model selected in the step S1 by using the training set obtained in the step S2, setting the number of neurons in the full connection layer of the neural network to be 1000, obtaining a pre-training model, and storing the weight parameters learned in the pre-training process;
s4: modifying the number of neurons of a full connection layer in a neural network according to the actual image classification task requirement;
s5: training the deep learning model with the full-connected layer modified on the animal image data set by using the weight parameters learned by the pre-training model in the step S3, and finely adjusting network parameters in the training process to obtain a final classification model;
s6: and identifying the animal image type by using the final classification model.
2. The animal image kind identification method according to claim 1, wherein the deep learning model in step S1 includes a VGG model, an inclusion model and a ResNet model.
3. The animal image kind identification method according to claim 1, wherein the spatial geometry kind transformation in step S2 includes flipping, scaling and rotating operations, and the noise adding operation includes adding gaussian noise and random noise.
4. The animal image type identification method according to claim 1, wherein the pre-training model in S3 includes a basic pre-training model and a deep pre-training model, wherein the basic pre-training model is used to process the data set into various animal type data sets, and the deep pre-training model is used to re-classify the classified animal type data sets, so as to obtain various animal specific types.
5. The animal image kind identification method according to claim 1, wherein S4 includes: and modifying the number of the neurons of the full connection layer in the neural network according to the actually classified types.
6. The method for identifying the kind of the animal image according to claim 1, wherein the step S5 is to perform the fine adjustment of the model by using one of two different fine adjustment methods, the first method is a local fine adjustment method: loading weight parameters of a pre-training model, fixing parameters of all convolutional layers in front of a full-link layer, then training on an animal image data set, and only finely adjusting the final full-link layer; the second way is global fine tuning: and loading the weight parameters of the pre-training model, directly training on the animal image data set, and finely adjusting the parameters of all layers.
CN202110870176.2A 2021-07-30 2021-07-30 Animal image type identification method based on transfer learning Pending CN113627501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110870176.2A CN113627501A (en) 2021-07-30 2021-07-30 Animal image type identification method based on transfer learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110870176.2A CN113627501A (en) 2021-07-30 2021-07-30 Animal image type identification method based on transfer learning

Publications (1)

Publication Number Publication Date
CN113627501A true CN113627501A (en) 2021-11-09

Family

ID=78381760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110870176.2A Pending CN113627501A (en) 2021-07-30 2021-07-30 Animal image type identification method based on transfer learning

Country Status (1)

Country Link
CN (1) CN113627501A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310894A (en) * 2023-02-22 2023-06-23 中交第二公路勘察设计研究院有限公司 Unmanned aerial vehicle remote sensing-based intelligent recognition method for small-sample and small-target Tibetan antelope

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837768A (en) * 2018-08-16 2020-02-25 武汉大学 Rare animal protection oriented online detection and identification method
CN111242063A (en) * 2020-01-17 2020-06-05 江苏大学 Small sample classification model construction method based on transfer learning and iris classification application
CN112052904A (en) * 2020-09-09 2020-12-08 陕西理工大学 Method for identifying plant diseases and insect pests based on transfer learning and convolutional neural network
CN112348117A (en) * 2020-11-30 2021-02-09 腾讯科技(深圳)有限公司 Scene recognition method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837768A (en) * 2018-08-16 2020-02-25 武汉大学 Rare animal protection oriented online detection and identification method
CN111242063A (en) * 2020-01-17 2020-06-05 江苏大学 Small sample classification model construction method based on transfer learning and iris classification application
CN112052904A (en) * 2020-09-09 2020-12-08 陕西理工大学 Method for identifying plant diseases and insect pests based on transfer learning and convolutional neural network
CN112348117A (en) * 2020-11-30 2021-02-09 腾讯科技(深圳)有限公司 Scene recognition method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王柯力 等: "基于迁移学习的水产动物图像识别方法", 《计算机应用》, vol. 38, no. 5, 10 May 2018 (2018-05-10), pages 1304 - 1308 *
王柯力 等: "基于迁移学习的水产动物图像识别方法", 《计算机应用》, vol. 38, no. 5, pages 1304 - 1308 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310894A (en) * 2023-02-22 2023-06-23 中交第二公路勘察设计研究院有限公司 Unmanned aerial vehicle remote sensing-based intelligent recognition method for small-sample and small-target Tibetan antelope
CN116310894B (en) * 2023-02-22 2024-04-16 中交第二公路勘察设计研究院有限公司 Unmanned aerial vehicle remote sensing-based intelligent recognition method for small-sample and small-target Tibetan antelope

Similar Documents

Publication Publication Date Title
Yang et al. Development of image recognition software based on artificial intelligence algorithm for the efficient sorting of apple fruit
CN111368896B (en) Hyperspectral remote sensing image classification method based on dense residual three-dimensional convolutional neural network
Hosu et al. KonIQ-10k: An ecologically valid database for deep learning of blind image quality assessment
CN109902732B (en) Automatic vehicle classification method and related device
CN110210542B (en) Picture character recognition model training method and device and character recognition system
CN109684922B (en) Multi-model finished dish identification method based on convolutional neural network
CN107871316B (en) Automatic X-ray film hand bone interest area extraction method based on deep neural network
CN105718932A (en) Colorful image classification method based on fruit fly optimization algorithm and smooth twinborn support vector machine and system thereof
CN112633257A (en) Potato disease identification method based on improved convolutional neural network
CN110569780A (en) high-precision face recognition method based on deep transfer learning
CN112861718A (en) Lightweight feature fusion crowd counting method and system
US20230044794A1 (en) Neural network training device, system and method
CN110717451A (en) Medicinal plant leaf disease image identification method based on deep learning
Marzan et al. Automated tobacco grading using image processing techniques and a convolutional neural network
CN116012291A (en) Industrial part image defect detection method and system, electronic equipment and storage medium
Saleh et al. Adaptive uncertainty distribution in deep learning for unsupervised underwater image enhancement
CN117152503A (en) Remote sensing image cross-domain small sample classification method based on false tag uncertainty perception
CN111310820A (en) Foundation meteorological cloud chart classification method based on cross validation depth CNN feature integration
CN113627501A (en) Animal image type identification method based on transfer learning
Bressan et al. Semantic segmentation with labeling uncertainty and class imbalance
Gope et al. Normal and peaberry coffee beans classification from green coffee bean images using convolutional neural networks and support vector machine
CN111860601A (en) Method and device for predicting large fungus species
Conrad et al. Two-stage seamless text erasing on real-world scene images
CN110210574A (en) Diameter radar image decomposition method, Target Identification Unit and equipment
CN113837236A (en) Method and device for identifying target object in image, terminal equipment and storage medium

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