Estimation Method of Fry Body Length Based on Visible Spectrum
LI Zhen-bo1, 2, 3, NIU Bing-shan1, PENG Fang1, LI Guang-yao1
1. School of Information and Electrical Engineering, China Agricultural University, Beijing 100083, China
2. Beijing Agricultural Internet of Things Engineering Technology Research Center, Beijing 100083, China
3. Key Laboratory of Agricultural Information Acquisition Technology of Ministry of Agriculture, Beijing 100083, China
摘要: 在鱼苗养殖过程中, 同一养殖池会出现个体大的鱼苗攻击个体小的鱼苗, 个体小的鱼苗会出现伤病甚至死亡, 造成经济损失, 鱼苗分塘和售卖价格主要与其体长参数相关,因此需要对不同大小的鱼苗进行分离。鱼苗分类主要依赖于不同大小的网筛,费时费力,且容易对鱼苗造成损伤。针对传统人工分离方法效率低下并且缺乏科学指导的问题, 本文提出了基于可见光谱的鱼苗体长估测方法研究, 能够根据鱼苗图像计算鱼苗长度并进行分类。为了精确无损的获取鱼苗的体长,提出了基于迁移学习ResNet50模型的鱼苗体长估测方法。首先采集在同等高度条件下拍摄的不同长度鱼苗图像,同时手工测量鱼苗的实际长度作为数据集的标签,用四种迁移学习模型AlexNet, VGG16, GoogLeNet, ResNet50对鱼苗体长进行估算,通过验证集准确率,测试集准确率,以及不同方法的运行时间三个指标进行分析,AlexNet模型验证集准确率90.04%,测试集准确率89.82%,运行时间52 min 3 s;VGG16模型验证集准确率91.01%,测试集准确率91.17%,运行时间131 min 37 s;GoogLeNet模型验证集准确率88.02%,测试集准确率88.39%,运行时间45 min 2 s;ResNet50模型验证集准确率91.92%,测试集准确率91.09%,运行时间99 min 17 s;确定方法ResNet50。该模型具有50层的Residual Network架构,用迁移学习的方法将在ImageNet上训练得到的卷积层的参数传递到训练所使用的模型上,并调整softmax层适应本文问题。对来自10种不同长度的6 677个样本的鱼苗数据集上的实验结果表明该方法可以有效地用于鱼苗分类,通过对模型ResNet50的迁移学习的层数,迭代次数,学习率,最小批处理尺寸(Mini Batch Size)进行微调以优化模型。实验结果表明,当迁移学习模型的迁移层数为30,迭代次数为6,学习率为0.001,Mini Batch Size为10时,方法效果达到最优,模型的验证集准确率94.31%,测试集的准确率达到93.93%。该算法与传统的图像处理方法相比估算鱼苗体长准确率提高2%左右。在未来实际生产场景中,可以将该方法嵌套入鱼苗体长分离装置之中,真正的做到将科研落地,投入到实际的生产之中,减少鱼苗损伤,为未来的无人渔场奠定基础。
关键词:鱼苗; 体长;ResNet50; 图像处理; 迁移学习
Abstract:In the process of fry breeding, the same breeding pond will appear that the individual large fry attacks small individual fry, and the individual small fry will suffer injury or even death, resulting in economic loss, and the fry pond and the selling price are mainly related to their body length parameters, so separation of different sizes of fry is required. The classification of fry is mainly dependent on mesh screens of different sizes, which is time consuming and laborious, and is easy to cause damage to fry. Aiming at the low efficiency and lack of scientific guidance of traditional artificial separation methods, this paper proposes a study on the estimation method of fry body length based on visible spectrum, which can calculate the length and classify the fry according to the fry image. In order to obtain the body length of the fry accurately and without loss, a method for estimating the length of the fry based on the migration learning ResNet50 model was proposed. Firstly, images of different lengths of fry taken under the same height conditions were collected. At the same time, the actual length of the fry was manually measured as the label of the data set. The four migration learning models AlexNet, VGG16, GoogLeNet, ResNet50 were used to estimate the body length of the fry, and the verification set was passed. Accuracy, test set accuracy, and running time of different methods were analyzed. The accuracy rate of AlexNet model verification set was 90.04%, the test set accuracy rate was 89.82%, and the running time was 52 minutes and 3 seconds; the VGG16 model verification set accuracy rate was 91.01%, the test set accuracy rate was 91.17%, and the running time was 131 minutes and 37 seconds; the accuracy rate of GoogLeNet model verification set was 88.02%, the test set accuracy rate is 88.39%, and the running time was 45 minutes and 2 seconds; the ResNet50 model verification set accuracy rate was 91.92%, the test set accuracy rate was 91.09%, and the running time was 99 minutes and 17 seconds; then determined ResNet50. The model had a 50-layer Residual Network architecture. The migration learning method was used to transfer the parameters of the convolution layer trained on ImageNet to the model used in this training, and the softmax layer was adjusted to adapt to this problem. The experimental results on the fry datasets of 6677 samples from 10 different lengths showed that the method can be effectively used for fry classification, and the model was optimized by stratifying the number of layers, the number of iterations, the learning rate of the model ResNet50 and the Mini Batch Size. The experimental results showed that when the migration learning model had 30 migration layers, the number of iterations was 6, the learning rate was 0.001, and the Mini Batch Size was 10, so the method effect was optimal. The accuracy of the model verification set was 94.31%, and the accuracy of the test set was 93.93%. The algorithm in this paper estimates the accuracy of fry body length by about 2% compared with the traditional image processing method. In the future, in the actual production scenario, the method can be nested into the fry body length separation device, the scientific research can be put into actual production, the fry damage can be reduced, and the foundation for the future unmanned fishery can be laid.
Key words:Fish fry; Body length; ResNet50; Image processing; Migration learning
李振波,钮冰姗,彭 芳,李光耀. 基于可见光谱的鱼苗体长估测方法研究[J]. 光谱学与光谱分析, 2020, 40(04): 1243-1250.
LI Zhen-bo, NIU Bing-shan, PENG Fang, LI Guang-yao. Estimation Method of Fry Body Length Based on Visible Spectrum. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2020, 40(04): 1243-1250.
[1] Sun M, Hassan S G, Li D. Computers & Electronics in Agriculture, 2016, 127: 425.
[2] DONG Shuang-lin(董双林). Journal of Fisheries of China(水产学报), 2019, 43(1): 105.
[3] Zion B. Computers & Electronics in Agriculture, 2012, 88(88): 125.
[4] ZHANG Jun-yang, WANG Hui-li, GUO Yang,et al(张军阳, 王慧丽, 郭 阳, 等). Application Research of Computers(计算机应用研究), 2018, 35(7): 7.
[5] Russakovsky O, Deng J, Su H, et al. International Journal of Computer Vision, 2015, 115(3): 211.
[6] Simonyan K, Zisserman A. Irrigation & Drainage, 2016,65: 388.
[7] Lu J, Hu J, Zhao G, et al. Computers & Electronics in Agriculture, 2017, 142: 369.
[8] Ferreira A D S, Freitas D M, Silva G G D, et al. Computers & Electronics in Agriculture, 2017, 143: 314.
[9] LI Yan-dong, HAO Zong-bo, LEI Hang(李彦冬, 郝宗波, 雷 航). Journal of Computer Applications(计算机应用), 2016, 36(9): 2508.
[10] ZHAO Kai-xuan, HE Dong-jian(赵凯旋, 何东健). Journal of Agricultural Engineering(农业工程学报), 2015, 31(5): 181.
[11] HUANG Shuang-ping, SUN Chao, QI Long, et al(黄双萍, 孙 超, 齐 龙, 等). Journal of Agricultural Engineering(农业工程学报), 2017, 33(20): 169.
[12] SHI Dong-jie, ZHU Hua, ZHANG Xin, et al(史东杰,朱 华,张 欣,等). Fish Body Length Measuring Device(一种鱼类体长测量装置). Chinese Patent(中国专利):CN206695843U. 2017.
[13] ZHANG Chen, CHEN Ting-xun(张 晨,陈庭勋). Structure of Fish Fry Length Measuring Instrument Based on Fish Fry Length(基于线阵CCD的鱼苗长度测量仪结构). Chinese Patent(中国专利):CN207395666U. 2018.
[14] GUO Pu-yu, YU Jia, WANG Jiao-jiao, et al(郭卜瑜, 于 佳, 王姣姣, 等). Optical Technique(光学技术), 2017, 43(2): 153.