【Objective】In the promotion and application of sex identification equipment of silkworm cocoons, in order to
reduce the difficulty and time of new varieties and new equipment to be re-modeled, the transfer of a sex identification model for
silkworm cocoons based on near-infrared spectrum among multiple devices and varieties was studied.【Method】Firstly, two
kinds of spectrometers(NirQuest512 spectrometer and SW2540 spectrometer)were used to collect the near-infrared diffuse
transmission spectrum data of four silkworm varieties(9fu, 7xiang, 7xia and 932), then the convolutional neural networks
trained by source domain dataset were used as the source domain model, and the outputs of the middle layer were analyzed
visually. Furthly, the source domain model was tuned finely according to different silkworm varieties and different collection
devices, and the transferred model was constructed. Finally, the model prediction accuracy after transfer learning was compared
with the algorithm of Convolutional Neural Networks(CNN), Support Vector Machine(SVM)and Random Forests (RF).
【Result】The results show that the CNN source domain model constructed with 1 700 samples of 9fu(NirQuest512
spectrometer)has good sex resolution ability, and the accuracy of sex resolution is over 99%. The SVM and RF models were
constructed with the outputs of middle layer of CNN source domain model as inputs, and the accuracy of sex discrimination is
over 92% and 90%, respectively. Visual analysis shows that the convolutional layer can well extract the sex characteristics.
For the target domain with less sample size of 100 7xiang(NirQuest512 spectrometer), 77 7xia and 112 932(SW2540
spectrometer), when the proportion of the training set is 70%, by fine-tuning the source domain CNN model, the accuracy of
the obtained target domain CNN model is 96.90%, 99.67% and 97.29% respectively, with the optimal effect; the accuracy of
the independent SVM model is 92.49%, 94.25% and 93.65% respectively, with the effect slightly lower than that of CNN; the
accuracy of the independent RF model is 80.93%, 80.17% and 81.47% respectively, with the effect worse than that of SVM;
the accuracy of the independent CNN model is only 58.87%, 56.33% and 72.17% respectively, with the worst effect. Through
modeling comparison of the number of different training sets for many times, it is also shown that, in the case of less data, the
effect of CNN model after transfer learning is the best, followed by the traditional machine learning method, and that of the
deep CNN model is the worst.【Conclusion】The above results show the mobility of the deep transfer learning model with
different spectrometers or different species, which provides theoretical and practical basis for the rapid establishment of a sex
classification model for silkworm cocoons with multiple spectrometers and various varieties of cocoons. |