CN109816025A - An Image Retrieval Method Based on Image Classification - Google Patents

An Image Retrieval Method Based on Image Classification Download PDF

Info

Publication number
CN109816025A
CN109816025A CN201910086700.XA CN201910086700A CN109816025A CN 109816025 A CN109816025 A CN 109816025A CN 201910086700 A CN201910086700 A CN 201910086700A CN 109816025 A CN109816025 A CN 109816025A
Authority
CN
China
Prior art keywords
image
classification
parameter
method based
search
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
CN201910086700.XA
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.)
Baoji University of Arts and Sciences
Original Assignee
Baoji University of Arts and Sciences
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 Baoji University of Arts and Sciences filed Critical Baoji University of Arts and Sciences
Priority to CN201910086700.XA priority Critical patent/CN109816025A/en
Publication of CN109816025A publication Critical patent/CN109816025A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于图像分类的图像检索方法,属于图像分类技术领域,所述的图像检索方法包括如下步骤:A:图像预处理;B:图像特征提取;C:核函数选择:选定RBF核为所需的核函数,确定RBF核的参数δ以及惩罚因子C的值,取一组值分别求其分类函数,根据分类函数的预测准确率和经验来调整值,找出预测准确率最高的值作为核参数,基于网格搜索法的参数选择方法需要事先给定参数的选择范围,即解区间,在此区间内以一定的步长逐个试验,找到适应度最高的参数作为算法输出;D:图像分类;E:输入测试图片到处理中,从而判断其归属类别,测试无误后,可进行图片检索。本发明所述的检索方法不但算法简单,而且具有较好的鲁棒性。The invention discloses an image retrieval method based on image classification, belonging to the technical field of image classification. The image retrieval method comprises the following steps: A: image preprocessing; B: image feature extraction; C: kernel function selection: selection The RBF kernel is the required kernel function, determine the parameter δ of the RBF kernel and the value of the penalty factor C, take a set of values to find its classification function, adjust the value according to the prediction accuracy and experience of the classification function, and find out the prediction accuracy The highest value is used as the kernel parameter. The parameter selection method based on the grid search method needs to give the selection range of the parameters in advance, that is, the solution interval. In this interval, test one by one with a certain step size, and find the parameter with the highest fitness as the algorithm output. ; D: Image classification; E: Input the test image into the processing, so as to determine the category it belongs to. After the test is correct, the image retrieval can be carried out. The retrieval method of the invention not only has a simple algorithm, but also has better robustness.

Description

A kind of image search method based on image classification
Technical field
The present invention relates to Image Classfication Technology field more particularly to a kind of image search methods based on image classification.
Background technique
The number letter such as rapid development of adjoint network and multimedia technology, including sound, figure, image, video and animation Breath sharply expands.Image is concerned by people as a kind of abundant in content, intuitive media information of performance.In actual life In at every moment there is a large amount of image to generate, the image for meeting user's requirement how is found out from these image informations, is to grind The person's of studying carefully problem to be solved.Image classification is exactly the process of pattern-recognition, carries out quantitative analysis to image using computer, In image each pixel or region incorporate into as one of several classifications, to replace the vision interpretation of people.The content of image Rich and varied, the content abstraction for being included is complicated.Since the level that current image understanding and computer vision develop is limited, There are larger differences for description of the people to the understanding and computer of image to image.And different people is to the reason of same piece image There is also gap or even far from each other, such problems for solution and description, are all the difficulties that image classification needs to consider and solve Topic.In order to quickly tell the classification of image, needs to carry out image classification first, then carry out image retrieval.
Summary of the invention
(1) the technical issues of solving
In view of the deficiencies of the prior art, it the present invention provides a kind of image search method based on image classification, solves The problem of existing search method inconvenience.
(2) technical solution
To achieve the above object, the invention provides the following technical scheme: a kind of image retrieval side based on image classification Method, image search method include the following steps:
A: it image preprocessing: downloads different pictures and is input in processor by scanner, a part of picture is used as Training picture, the picture of another part is as test picture;
B: image characteristics extraction: selection LIBSVM software carries out image classification, to the color and textural characteristics of training picture It extracts, and using color characteristic and textural characteristics as the classification of LIBSVM software;
C: Selection of kernel function: selected RBF core is required kernel function, determines the parameter δ and penalty factor of RBF core Value, takes a class value to seek its classification function respectively, according to the predictablity rate of classification function and experience come adjusted value, finds out prediction The highest value of accuracy rate is used as nuclear parameter, and the parameter selection method based on grid data service needs the selection of prior given parameters Range, i.e. solution section, are tested one by one with certain step-length in this section, it is defeated as algorithm to find the highest parameter of fitness Out;
D: N (N-1)/2 SVM two classification device, the instruction of each classifier image classification: are constructed for N class classification problem Practicing sample is relevant two classes, combines these two classification devices and classification number is a classification Support matrix, and use mould Plate similarity mode method, the highest class of similarity are classification belonging to sample;
E: input test picture is into processing, to judge its belonging kinds, after test is errorless, can carry out picture retrieval.
Preferably, a kind of image search method based on image classification according to claim 1, it is characterised in that: In step C, the calculation of the kernel function of the RBF core is as follows:Wherein δ is RBF The parameter of kernel function, x represent different data, x-xiRepresent data subspace.
Preferably, in step C, the method that grid data service finds optimal nuclear parameter includes the following steps: selected C and δ Range, choose C ∈ (2-5, 2-3... 215), l/ δ2∈(2-15,2-13..., 23), progress coarse grid search first, setting is searched Suo Buchang is 1, in this way, constituting a two-dimensional grid, each group of C on corresponding grid on δ coordinate system in C, δ value is all one group latent It is solving, is representing one group of SVM parameter, the mean value of each group parameter prediction accuracy rate is calculated according to K folding cross validation method, use is contour Line is drawn, and a contour map is obtained, and determines optimal C, δ parameter pair.
Preferably, optimal C is determined, δ parameter is to rear, then has carried out carrying out a refined net again after coarse grid search searching Rope selectes a region of search that is, on existing contour map, selectes the highest region of predictablity rate, reduces search step It is long to carry out binary search.
Preferably, reducing search section step-length is 0.1.
Preferably, in step D, it is equipped with R classifier D={ D0, D1... DR-1), problem to be processed has C classification, If input sample X, the output of classifier mouth is C dimensional vector: Di(x)=[di,0(x),di,1(x),…di,c-1(x)], In, wherein di,j(x) (j=0,1 ..., C-1) presentation class device diThe support for being class j to sample X judgement, by all classification The output result of device builds up classification Support matrix.
Preferably, in step D, template similarity matching method refers to classification Support matrix to be sorted and owns The decision template of classification compares, most like classification, that is, current sample classification.
(3) beneficial effect
The present invention provides a kind of image search methods based on image classification, have following the utility model has the advantages that of the invention Statistical method using SVM classifier as image classification, therefore it is different from existing statistical method.It has the following advantages: The terminal decision function of SVM classifier is only determined that the complexity of calculating depends on supporting vector by a small number of supporting vectors Number, rather than the dimension of sample space, this avoids " dimension disaster " in some sense.A small number of supporting vectors determine Final result, this can not only help we grasp the key link sample, reject bulk redundancy sample, and be doomed this method not But algorithm is simple, and has preferable robustness.Guarantee due to there is more stringent Statistical Learning Theory to do, using SVM The model that classifier is established has preferable Generalization Ability.SVM classifier can provide the determination of the Generalization Ability of model built The upper bound, this is not available for current other any learning methods.Any one data model is established, artificial intervention is got over It is few more objective.It is compared with other methods, it is less to establish the intervention of priori required for SVM model.
Specific embodiment
Below in conjunction with the embodiment of the present invention, technical solution in the embodiment of the present invention is clearly and completely retouched It states, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the present invention In embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
A kind of image search method based on image classification, image search method include the following steps:
A: it image preprocessing: downloads different pictures and is input in processor by scanner, a part of picture is used as Training picture, the picture of another part is as test picture;
B: image characteristics extraction: selection LIBSVM software carries out image classification, to the color and textural characteristics of training picture It extracts, and using color characteristic and textural characteristics as the classification of LIBSVM software;
C: Selection of kernel function: selected RBF core is required kernel function, determines the parameter δ and penalty factor of RBF core Value, the calculation of the kernel function of the RBF core are as follows:Wherein δ is RBF kernel function Parameter, x represent different data, x-xiData subspace is represented, takes a class value to seek its classification function respectively, according to classification function Predictablity rate and experience carry out adjusted value, find out the highest value of predictablity rate as nuclear parameter, based on grid data service Parameter selection method needs the range of choice of prior given parameters, i.e. solution section, is tried one by one in this section with certain step-length It tests, finds the highest parameter of fitness and exported as algorithm;The method that grid data service finds optimal nuclear parameter includes following step Rapid: the range of selected C and δ chooses C ∈ (2-5, 2-3... 215), l/ δ2∈(2-15,2-13..., 23), coarse grid is carried out first Search, set step-size in search is 1, in this way, in C, one two-dimensional grid of composition on δ coordinate system, and each group of C, δ on correspondence grid Value is all one group of potential solution, represents one group of SVM parameter, calculates each group parameter prediction accuracy rate according to K folding cross validation method Mean value, drawn with contour, obtain a contour map, determine optimal C, δ parameter pair;Determine optimal C, δ parameter pair Afterwards, then after having carried out coarse grid search a refined net search is carried out again, i.e., a search is selected on existing contour map The highest region of predictablity rate is selected in region, is reduced step-size in search and is carried out binary search, and reducing step-size in search is 0.1.
D: N (N-1)/2 SVM two classification device, the instruction of each classifier image classification: are constructed for N class classification problem Practicing sample is relevant two classes, combines these two classification devices and classification number is a classification Support matrix, be equipped with R Classifier D={ D0, D1... DR-1), problem to be processed has C classification, if input sample X, the output of classifier mouth is one C dimensional vector: Di(x)=[di,0(x),di,1(x),…di,c-1(x)], wherein wherein di,j(x) (j=0,1 ..., C-1) table Show classifier diThe support for being class j to sample X judgement, builds up classification Support matrix for the output result of all classifiers, And template similarity matching method is used, the highest class of similarity is classification belonging to sample, and template similarity matching method refers to The decision template of classification Support matrix and all categories to be sorted is compared, most like classification, that is, current sample Classification;
E: input test picture is into processing, to judge its belonging kinds, after test is errorless, can carry out picture retrieval.
The present invention uses statistical method of the SVM classifier as image classification, therefore is different from existing statistical method. It has the following advantages: the terminal decision function of SVM classifier is only determined by a small number of supporting vectors, the complexity of calculating Depending on the number of supporting vector, rather than the dimension of sample space, this avoids " dimension disaster " in some sense.It is few Number supporting vectors determine final result, this can not only help we grasp the key link sample, reject bulk redundancy sample, and And this method has been doomed it not only algorithm is simple, and there is preferable robustness.Due to there is more stringent Statistical Learning Theory It does and guarantees, there is preferable Generalization Ability using the model that SVM classifier is established.SVM classifier can provide model built Generalization Ability determination the upper bound, this is not available for current other any learning methods.Establish any one data mould The fewer type, artificial intervention the more objective.It is compared with other methods, it is less to establish the intervention of priori required for SVM model.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to Cover non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", not There is also other identical elements in the process, method, article or apparatus that includes the element for exclusion.
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with A variety of variations, modification, replacement can be carried out to these embodiments without departing from the principles and spirit of the present invention by understanding And modification, the scope of the present invention is defined by the appended.

Claims (7)

1.一种基于图像分类的图像检索方法,其特征在于:图像检索方法包括如下步骤:1. an image retrieval method based on image classification, is characterized in that: the image retrieval method comprises the steps: A:图像预处理:下载不同的图片通过扫描器输入到处理器中,一部分的图片用作训练图片,另一部分的图片作为测试图片;A: Image preprocessing: download different images and input them into the processor through the scanner, some of the images are used as training images, and the other part of the images are used as test images; B:图像特征提取:选择LIBSVM软件进行图像分类,对训练图片的颜色和纹理特征进行提取,并且将颜色特征和纹理特征作为LIBSVM软件的分类;B: Image feature extraction: Select LIBSVM software for image classification, extract color and texture features of training images, and use color features and texture features as the classification of LIBSVM software; C:核函数选择:选定RBF核为所需的核函数,确定RBF核的参数δ以及惩罚因子C的值,取一组值分别求其分类函数,根据分类函数的预测准确率和经验来调整值,找出预测准确率最高的值作为核参数,基于网格搜索法的参数选择方法需要事先给定参数的选择范围,即解区间,在此区间内以一定的步长逐个试验,找到适应度最高的参数作为算法输出;C: Kernel function selection: Select the RBF kernel as the required kernel function, determine the parameter δ of the RBF kernel and the value of the penalty factor C, take a set of values to calculate its classification function, and determine the classification function according to the prediction accuracy and experience of the classification function. Adjust the value and find the value with the highest prediction accuracy as the kernel parameter. The parameter selection method based on the grid search method needs to give the selection range of the parameters in advance, that is, the solution interval. The parameter with the highest fitness is used as the algorithm output; D:图像分类:针对N类分类问题构造N(N-1)/2个SVM二类分类器,每个分类器的训练样本是相关的两个类,组合这些二类分类器与类别数为一个类别支持度矩阵,并使用模板相似度匹配法,相似度最高的类即为样本所属的类别;D: Image classification: Construct N(N-1)/2 SVM two-class classifiers for N-class classification problems. The training samples of each classifier are two related classes, and the combination of these two-class classifiers and the number of classes is A category support matrix, and the template similarity matching method is used, and the class with the highest similarity is the category to which the sample belongs; E:输入测试图片到处理中,从而判断其归属类别,测试无误后,可进行图片检索。E: Input the test picture into the processing, so as to judge its belonging category. After the test is correct, the picture retrieval can be carried out. 2.根据权利要求1所述的一种基于图像分类的图像检索方法,其特征在于:在步骤C中,所述RBF核的核函数的计算方式如下:其中δ为RBF核函数的参数,x代表不同的数据,x-xi代表数据子空间。2. a kind of image retrieval method based on image classification according to claim 1, is characterized in that: in step C, the calculation mode of the kernel function of described RBF kernel is as follows: where δ is the parameter of the RBF kernel function, x represents different data, and x i represents the data subspace. 3.根据权利要求2所述的一种基于图像分类的图像检索方法,其特征在于:在步骤C中,网格搜索法寻找最优核参数的方法包括如下步骤:选定C和δ的范围,选取C∈(2-5,2-3,...215),l/δ2∈(2-15,2-13,...,23),首先进行粗网格搜索,设定搜索步长为1,这样,在C,δ坐标系上构成一个二维网格,对应网格上每一组C,δ值都是一组潜在解,代表一组SVM参数,按照K折交叉验证方法计算各组参数预测准确率的均值,用等高线绘出,得到一个等高线图,确定最佳的C,δ参数对。3. a kind of image retrieval method based on image classification according to claim 2, is characterized in that: in step C, the method that grid search method finds optimal kernel parameter comprises the steps: select the scope of C and δ , select C∈(2 -5 , 2 -3 ,...2 15 ), l/δ 2 ∈(2 -15 , 2 -13 ,..., 2 3 ), first perform a coarse grid search, set The search step is set to 1, so that a two-dimensional grid is formed on the C and δ coordinate systems, and each group of C and δ values on the corresponding grid is a group of potential solutions, representing a group of SVM parameters, which are folded according to K The cross-validation method calculates the mean value of the prediction accuracy of each group of parameters, draws it with contour lines, and obtains a contour map to determine the best C, δ parameter pair. 4.根据权利要求3所述的一种基于图像分类的图像检索方法,其特征在于:确定最佳的C,δ参数对后,再进行完粗网格搜索后再进行一遍细网格搜索,即在现有的等高线图上选定一个搜索区域,选定预测准确率最高的区域,减小搜索步长进行二次搜索。4. a kind of image retrieval method based on image classification according to claim 3, it is characterized in that: after determining the best C, after the delta parameter pair, carry out the coarse grid search again and then carry out the fine grid search again, That is, a search area is selected on the existing contour map, the area with the highest prediction accuracy is selected, and the search step size is reduced to perform a secondary search. 5.根据权利要求4所述的一种基于图像分类的图像检索方法,其特征在于:减小搜索部步长为0.1。5 . The image retrieval method based on image classification according to claim 4 , wherein the step size of the reduced search part is 0.1. 6 . 6.根据权利要求1所述的一种基于图像分类的图像检索方法,其特征在于:在步骤D中,设有R个分类器D={D0,D1,...DR-1,)(右括号应该是}),待处理问题有C个类别,设输入样本X,分类器口的输出是一个C维向量:Di(x)=[di,0(x),di,1(x),…di,c-1(x)],其中,其中di,j(x)(j=0,1,...,C-1)表示分类器di对样本X判决为类j的支持度,将所有分类器的输出结果建成类别支持度矩阵。6. An image retrieval method based on image classification according to claim 1, characterized in that: in step D, there are R classifiers D={D 0 , D 1 ,...D R-1 ,) (the right bracket should be }), the problem to be processed has C categories, set the input sample X, the output of the classifier is a C-dimensional vector: D i (x)=[d i,0 (x),d i,1 (x),...d i,c-1 (x)], where d i,j (x)(j=0,1,...,C-1) represents the classifier d i pair The sample X is judged as the support degree of class j, and the output results of all classifiers are built into a class support degree matrix. 7.根据权利要求1所述的一种基于图像分类的图像检索方法,其特征在于:在步骤D中,模板相似度匹配法是指将待分类的类别支持度矩阵和所有类别的决策模板进行对比,最相似的类别即当前样本的类别。7. A kind of image retrieval method based on image classification according to claim 1, it is characterized in that: in step D, template similarity matching method refers to the category support matrix to be classified and all categories of decision templates. For comparison, the most similar category is the category of the current sample.
CN201910086700.XA 2019-01-29 2019-01-29 An Image Retrieval Method Based on Image Classification Pending CN109816025A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910086700.XA CN109816025A (en) 2019-01-29 2019-01-29 An Image Retrieval Method Based on Image Classification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910086700.XA CN109816025A (en) 2019-01-29 2019-01-29 An Image Retrieval Method Based on Image Classification

Publications (1)

Publication Number Publication Date
CN109816025A true CN109816025A (en) 2019-05-28

Family

ID=66605740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910086700.XA Pending CN109816025A (en) 2019-01-29 2019-01-29 An Image Retrieval Method Based on Image Classification

Country Status (1)

Country Link
CN (1) CN109816025A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402621A (en) * 2011-12-27 2012-04-04 浙江大学 Image retrieval method based on image classification
US8611617B1 (en) * 2010-08-09 2013-12-17 Google Inc. Similar image selection
CN104809472A (en) * 2015-05-04 2015-07-29 哈尔滨理工大学 SVM-based food classifying and recognizing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8611617B1 (en) * 2010-08-09 2013-12-17 Google Inc. Similar image selection
CN102402621A (en) * 2011-12-27 2012-04-04 浙江大学 Image retrieval method based on image classification
CN104809472A (en) * 2015-05-04 2015-07-29 哈尔滨理工大学 SVM-based food classifying and recognizing method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
郝瑞: "网格搜索", 《基于虚拟可信平台的软件可信性研究》 *
闫志刚: "改进的(C,σ)优选方法", 《矿山水害空间数据挖掘与知识发现的支持向量机理论与方法》 *
陈学武等: "核函数", 《城市低收入人群出行方式选择机理与交通发送策略》 *

Similar Documents

Publication Publication Date Title
US20220230420A1 (en) Artificial intelligence-based object detection method and apparatus, device, and storage medium
CN112131978B (en) Video classification method and device, electronic equipment and storage medium
WO2022126810A1 (en) Text clustering method
Zhang et al. Probabilistic graphlet transfer for photo cropping
WO2020114378A1 (en) Video watermark identification method and apparatus, device, and storage medium
CN108229674B (en) Training method and device of neural network for clustering, and clustering method and device
Comaniciu et al. Cell image segmentation for diagnostic pathology
CN113572742B (en) Network intrusion detection method based on deep learning
CN110163234A (en) A kind of model training method, device and storage medium
CN112070044B (en) Video object classification method and device
WO2019076227A1 (en) Human face image classification method and apparatus, and server
CN112949572A (en) Slim-YOLOv 3-based mask wearing condition detection method
CN108960260B (en) Classification model generation method, medical image classification method and medical image classification device
JP2010504593A (en) Extracting dominant colors from an image using a classification technique
CN109711448A (en) A fine-grained classification method for plant images based on discriminative key domains and deep learning
CN105760488A (en) Image expressing method and device based on multi-level feature fusion
CN110472082A (en) Data processing method, device, storage medium and electronic equipment
CN106022223B (en) A high-dimensional partial binary pattern face recognition method and system
CN112381030A (en) Satellite optical remote sensing image target detection method based on feature fusion
CN106250909A (en) A kind of based on the image classification method improving visual word bag model
WO2011096010A1 (en) Pattern recognition device
CN114863125A (en) Intelligent scoring method and system for calligraphy/fine art works
CN116958615A (en) Picture identification method, device, equipment and medium
CN114202694A (en) Small sample remote sensing scene image classification method based on manifold mixed interpolation and contrast learning
CN110378384B (en) An image classification method combining privileged information and ranking support vector machines

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190528