APP下载

基于云平台的海量图像分类算法研究

2019-10-14王伟魏柯

现代电子技术 2019年19期
关键词:图像分类云平台

王伟 魏柯

摘  要: 传统图像分类算法没有考虑当前图像数据的海量、大规模特点,使得图像分类效率、分类准确率低,为了解决当前图像分类算法存在的难题,设计基于云平台的海量图像分类算法。首先提取反映图像内容的分类特征,并对图像类型采用专家进行标记,构建图像分类的训练样本,然后针对当前图像分类错误率高的问题,设计基于最小二乘向量机的图像分类器,最后利用云平台的分布式、并行处理的优点实现海量图像分类,并采用图像分类仿真实验分析所提算法的性能,该方法降低了海量图像分类的计算复杂度,减少了海量图像分类的时间,提升了海量图像分类效率,而且海量图像分类综合效果要显著优于传统图像分类算法,验证了所提算法的海量图像分类优越性。

关键词: 海量图像; 分类器设计; 云平台; 图像内容信息; Gabor滤波器; 图像分类

中图分类号: TN911.73?34; TP391                   文献标识码: A                  文章编号: 1004?373X(2019)19?0046?04

Abstract: Traditional image classification algorithms do not take into account the massive and large?scale characteristics of current image data, resulting in low classification efficiency and poor classification accuracy. Therefore, a classification algorithm for massive images is designed to solve the difficulties existing in current image classification algorithms. Firstly, the classification features reflecting the image content are extracted, and the image types are labeled to construct training samples for image classification. Then, an image classifier based on least square vector machine is designed to solve the problem of high error rate of current image classification. Finally, the advantage of distributed mode and parallel processing of cloud platform are utilized to realize mass image classification, and the performance of this algorithm is analyzed by image classification simulation experiment. This method reduces the computational complexity of classification of mass images and the classification time of mass images, and improves the classification efficiency of mass images. The algorithm′s comprehensive classification effect of massive images is superior to that of the traditional image classification algorithm. The superiority of the algorithm was verified in the experoment.

Keywords: massive image; classifier design; cloud platform; image content information; Gabor filter; image classification

0  引  言

随着摄像设备的多样化、图像处理技术的成熟,各个领域的图像不断增加,图像数据规模相当庞大,这样给图像检索带来了挑战。图像分类算法是图像检索系统中的一个十分重要的模块,图像分类性能直接决定了图像检索系统的检索效果,因此图像分类算法引起了人们的高度关注[1?3]。

由于图像处理具有较高的实际应用价值,大量的学者、研究人员、研究机构、研究院以及高校的老师投入了大量的精力和时间,对图像分类算法的设计问题进行了探索[4]。图像分类算法的目的就是根据可以描述图像内容信息的特征向量,采用一定的规则和技术构建相应的特征库,然后将待分类图像特征向量与特征库进行匹配,根据匹配结果将待分类图像规划到相应的图像类别,该过程牵涉到图像特征提取以及特征匹配算法的设计[5]。当前图像特征提取方法很多,通常情况提取大量的图像原始特征,如颜色、形状、大小、纹理、变换等特征,然后对这些特征进行融合,去掉同类特征之间以及不同类型特征的重复信息,以减少原始特征数量,使得图像特征匹配时间缩短,为图像分类算法节约时间,主要有主成分分析法、因子分析法、层次分析法等[6?8]。特征匹配算法主要有K最近邻算法、神经网络、支持向量机等,其中K最近邻算法通过计算待分类图像特征向量与特征库之间的欧氏距离,选择最近[K]个图像确定待分类图像最终类别,该算法比较简单,对于小规模特征以及图像来说,图像分类效率高,但是其没有自学习能力,自适应能力差[9?11]。神经网络具有自学习能力和自适应能力,可以对分类图像特征向量与特征库之间的关系进行有效拟合,建立相应的图像分类器,图像分类的综合效果要优于K最近邻算法,但其结构复杂,收敛速度慢,大图像特征数量大时,经常出现“维数災”现象,具有严重的局限性。支持向量机的拟合能力要明显优于神经网络,采用结构风险最小化原则,避免了“维数灾”现象的出现,图像分类正确率要远远小于K最近邻算法以及神经网络,但训练过程十分耗时,训练速度慢,影响图像分类的整体速度,尤其对于大规模图像分类数据,缺陷更加明显[12?13]。

目前大多数分类算法基于单机平台进行,当训练样本增大时,分类算法的训练时间呈指数形式增加,对于海量的图像分类数据,无法满足图像在线分类和检索要求。近年来,随着云计算技术的不断发展,为海量的图像分类数据处理提供了一种工具,可以用云平台处理海量的图像分类问题,因此针对单机平台的图像分类算法存在的难题,设计了基于云平台的海量图像分类算法,仿真实验测试结果表明,本文算法减少了图像分类的时间,海量图像分类综合效果更优。

1  云平台

云平台是在大数据处理背景下产生的,其将一些计算节点通过分布式处理技术组成一个服务集群,而用户不需要知道这些节点是如何组织在一起的,可以高效进行大数据分析和处理。Hadoop是一种常用的开源云平台,具有高效、稳定、易扩展等特点,其包括许多模块,其中最核心的两个模块为分布式文件系统(HDFS)和分布式编程模型。

HDFS的主要功能是:文件的并行传输和文件分布式存储,容错性能好,对大数据易扩充,以流式数据访问模式对分块后的数据进行存储和传输,这样易实现海量数据访问,其工作原理如图1所示。

Map/Reduce是分布式文件系统的核心,是一个处理大数据集的软件框架,可以进行并行计算,计算结果十分可靠,执行过程分为map和reduce部分,具体工作流程如图2所示。

5  結  语

针对单机平台的图像分类算法训练时间长、分类效率低的难题,本文设计了基于云平台的海量图像分类算法,并引入最小二乘向量机构建图像分类器。仿真结果表明,本文方法降低了图像训练时间,图像分类正确率得到提升,实际应用范围更加广泛。

参考文献

[1] 刘丽,赵凌君,郭承玉,等.图像纹理分类方法研究进展和展望[J].自动化学报,2018,44(4):584?607.

LIU Li, ZHAO Lingjun, GUO Chengyu, et al. Texture classification: state?of?the?art methods and prospects [J]. Acta automatica sinica, 2018, 44(4): 584?607.

[2] 蒲国林,邱玉辉.基于稀疏表示全局字典学习的图像分类方法[J].计算机应用,2015,35(2):499?501.

PU Guolin, QIU Yuhui. Image classification based on global dictionary learning method with sparse representation [J]. Journal of computer applications, 2015, 35(2): 499?501.

[3] 杨赛,赵春霞,胡彬,等.基于图正则化局部特征编码算法的图像分类方法[J].电子学报,2017,45(8):1882?1887.

YANG Sai, ZHAO Chunxia, HU Bin, et al. An image classification method using graphically regularized coding algorithm [J]. Acta electronica sinica, 2017, 45(8): 1882?1887.

[4] 张旭,蒋建国,洪日昌,等.基于低秩稀疏分解与协作表示的图像分类算法[J].计算机科学,2016,43(7):83?88.

ZHANG Xu, JIANG Jianguo, HONG Richang, et al. Image classification algorithm based on low rank and sparse decomposition and collaborative representation [J]. Computer science, 2016, 43(7): 83?88.

[5] 涂秋洁,王晅.基于PCA?SIFT特征与贝叶斯决策的图像分类算法[J].计算机应用与软件,2016,33(6):215?219.

TU Qiujie, WANG Xuan. Image classification algorithm based on PCA?SIFT features and bayesian decision [J]. Computer applications and software, 2016, 33(6): 215?219.

[6] 王爽,张化祥,刘丽.基于多示例多标记KNN的图像分类算法的改进[J].济南大学学报(自然科学版),2015,29(4):275?279.

WANG Shuang, ZHANG Huaxiang, LIU Li. An improved algorithm of image classification based on multi?instance multi?label KNN [J]. Journal of Jinan University (Natural science edition), 2015, 29(4): 275?279.

[7] 谢文兰,石跃祥,肖平.应用BP神经网络对自然图像分类[J].计算机工程与应用,2010,46(2):163?166.

XIE Wenlan, SHI Yuexiang, XIAO Ping. Classification of natural image based on BP neural network [J]. Computer engineering and applications, 2010, 46(2): 163?166.

[8] 王娜,万洪林,白成杰.基于SVM的离线图像目标分类算法[J].计算机系统应用,2016,25(2):208?211.

WANG Na, WAN Honglin, BAI Chengjie. Offline image target classification algorithm based on SVM [J]. Computer systems & applications, 2016, 25(2): 208?211.

[9] 张春娥,赵晓东,杨丽娟.基于人工智能的大规模激光图像分类研究[J].激光杂志,2018,39(5): 66?69.

ZHANG Chune, ZHAO Xiaodong, YANG Lijuan. Research on large scale laser image classification based on artificial intelligence [J]. Laser journal, 2018, 39(5): 66?69.

[10] 张江,王年,梁栋,等.基于非负矩阵分解与邻接谱的图像分类[J].中国科学技术大学学报,2008,38(3):247?251.

ZHANG Jiang, WANG Nian, LIANG Dong, et al. Image classification based on non?negative matrix factorization and adjacency spectra [J]. Journal of University of Science and Technology of China, 2008, 38(3): 247?251.

[11] 曹建芳,史昊,赵青杉.并行Adaboost?BP算法及其在海量图像分类中的应用[J].新疆大学学报(自然科学版),2017,34(1):70?77.

CAO Jianfang, SHI Hao, ZHAO Qingshan. The parallel Adaboost?BP algorithm and application in massive image classification [J]. Journal of Xinjiang University (Natural science edition), 2017, 34(1): 70?77.

[12] 白琮,黄玲,陈佳楠,等.面向大规模图像分类的深度卷积神经网络优化[J].软件学报,2018,29(4):1029?1038.

BAI Cong, HUANG Ling, CHEN Jianan, et al. Optimization of deep convolutional neural network for large scale image classification [J]. Journal of software, 2018, 29(4): 1029?1038.

[13] 王有元,蔡亚楠,王灿,等.基于云平台的变电站设备智能诊断系统[J].高电压技术,2015,41(12):3895?3901.

WANG Youyuan, CAI Yanan, WANG Can, et al. Intelligent diagnosis system for substation equipment based on cloud platform [J]. High voltage engineering, 2015, 41(12): 3895?3901.

猜你喜欢

图像分类云平台
Docker技术在Web服务系统中的应用研究
一种基于引导滤波和MNF的高光谱遥感图像分类方法
高职院校开展基于云平台网络教学的探索与思考
企业云平台建设研究