CN108805944B - Online image set compression method with maintained classification precision - Google Patents
Online image set compression method with maintained classification precision Download PDFInfo
- Publication number
- CN108805944B CN108805944B CN201810533771.5A CN201810533771A CN108805944B CN 108805944 B CN108805944 B CN 108805944B CN 201810533771 A CN201810533771 A CN 201810533771A CN 108805944 B CN108805944 B CN 108805944B
- Authority
- CN
- China
- Prior art keywords
- image set
- classification
- compression method
- compression
- optimal
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/002—Image coding using neural networks
Landscapes
- Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
The invention relates to an online image set compression method with maintained classification precision, which comprises the following steps: two compression parameters for the image set: the quality factor Q and the resolution S are compressed appropriately. Based on a convolutional neural network classifier, carrying out classification test on image sets obtained under different compression parameters under the classifier, comparing and analyzing classification accuracy to obtain a data set compression method with maintained accuracy, and providing reference for selection of a two-parameter compression method for maintaining the classification accuracy of subsequent image sets by using an optimal compression method under the condition of maintaining the classification accuracy. The method can quickly and accurately find the optimal compression method under the condition of maintaining the classification precision of the online image set, and greatly reduces the time required by optimal compression under the condition of maintaining the classification precision of the online image set.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to an online image set compression method with maintained classification precision.
Background
Image classification is an important pattern recognition problem, and an image set needs to be classified according to certain standards according to the characteristics of images, so that the image classification is paid more and more attention in the military and civil fields. In recent years, the framework of "feature extraction + classifier" patterns has become a classical architecture in the field of pattern recognition. The Convolutional Neural Network (CNN) is widely applied in the field of image classification, and the CNN framework firstly extracts the features of an image set, sends the extracted image features of the data set to a classifier for classification, and finally obtains the classification result of the image. Compared with the traditional image classification, the CNN framework adopts a neural network consisting of neurons similar to the human brain in the characteristic extraction link, can obtain the characteristics of the data set image through learning without manually setting the characteristic extraction, has a framework structure that simple modules with learning capacity are stacked in multiple layers, can perform linear operation, and has good robustness and generalization capacity. Compared with the traditional classifier, the CNN has strong classification robustness, and the CNN provides possibility for compressed images with maintained precision.
In recent years, the influence of image compression parameters on image classification has also received attention from researchers. JPEG (Joint Photographic Expert group) is an international standard which is jointly established by ISO and CCITT and is suitable for compression of continuous tone, multi-level gray scale and color/monochrome still images, and lossy compression is the main application field of the JPEG compression standard. In a networked big data application environment, compression of the data set is necessary due to the limitation of the storage space of the image set. However, how to select a suitable compression strategy for an arbitrary image set so that the classification performance meets specific needs still lacks a relevant method. As the most widely used compression standard at present, the quantization step size of JPEG has a large adjustable range of quality, which provides a large operable space for further maintaining the precision of the compressed image. Different image compression parameters generate compressed image sets of different storage capacities, but the quantitative influence of the compression parameters on the image classification accuracy is not clear.
Disclosure of Invention
The invention aims to provide an online image set compression method with maintained classification accuracy, which can reduce the storage space of a data set to the maximum extent and ensure the maintenance of the classification accuracy.
The technical scheme adopted by the invention for solving the technical problems is as follows: an online image set compression method with maintained classification accuracy is provided, which comprises the following steps:
(1) an initialization process: working the first image set in a training mode, and testing all compression parameters to obtain an initial optimal compression method, corresponding compression parameters and classification accuracy;
(2) the next image set works in a test mode, the current optimal compression method is adopted for compression, whether the subsequent image set needs to work in a training mode or not is judged, if yes, the step (3) is carried out, and if not, the step is repeated until all the image sets are compressed;
(3) the image set works in a training mode, the quality factor Q and the resolution S are respectively subjected to JPEG compression by taking the optimal compression parameter corresponding to the current optimal compression method as a center, all degraded versions of the image set after compression are obtained, the corresponding compression parameters are obtained, then classification is respectively carried out through a CNN image classification model, all classification accuracies and storage capacities of the compressed image set are obtained, the optimal compression method for maintaining the classification accuracy of the image set and the compression parameter corresponding to the optimal compression method are selected, and the optimal compression method for maintaining the classification accuracy of the image set is used as the updated optimal compression method;
(4) and (4) repeating the step (2) to the step (3) until the last online image set compression is completed.
The step (2) of judging whether the subsequent image set needs to work in the training mode specifically comprises the following steps: if the classification precision of the current image set is more than or equal to 100 x (1-gamma)% of the current optimal classification precision, the requirement for maintaining the classification precision is met, the current image set compression method still adopts the current optimal compression method for compression, and the subsequent image set continues to work in a test mode; and if the classification precision of the current image set is less than 100 x (1-gamma)% of the current optimal classification precision, the requirement for maintaining the classification precision is not met, the compression method of the current image set is still compressed by adopting the current optimal compression method, and the subsequent image set works in a training mode, wherein gamma belongs to (0, 1).
Advantageous effects
Due to the adoption of the technical scheme, compared with the prior art, the invention has the following advantages and positive effects:
on the premise that the classification accuracy of the image set is kept, the optimal compression method for compressing the current image set to the maximum extent is sought so as to reduce the requirement of storage capacity and quickly find the subsequent image set. Compared with the traditional classifier, the image classifier based on the Convolutional Neural Network (CNN) is adopted, and the CNN has strong classification robustness, so that the possibility of image compression with maintained precision is provided. The invention designs a double-measurement parameter control method for JPEG compression, which takes a quality factor Q and a resolution S as compression parameters, compared with other compression methods, the quantization step length of JPEG has a larger quality change range, and a larger operable space is provided for further maintaining the precision of a compressed image. The method realizes the optimal method for online image set double-parameter compression under the condition of keeping classification precision. The result shows that the method can quickly find the optimal compression method for the online image set under the condition of maintaining the classification precision, greatly reduces the time required by online image compression, and is an effective compression mode under the condition of maintaining the classification precision of the online image set.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a flow chart of initializing a first set of images;
FIG. 3 is a flow chart of an arbitrary set of images in training mode.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
The embodiment of the invention relates to an online image set compression method with maintained classification precision, which comprises the following steps:
step one, an initialization process. The first image set needs to work in a training mode, and all compression parameters are tested to obtain the optimal compression method F* 1The corresponding compression parameter is { Q*(I1),S*(I1) Get rid of, classifyAccuracy is A* 1。
Step two, image set In、In+1、In+2The image sets are represented as the nth image set, the (n + 1) th image set, and the (n + 2) th image set (n.gtoreq.1). For the nth image set In,AnIs represented bynClassification precision of a certain degraded version image set after compression, A* nRepresenting its optimal classification accuracy, Fn *Representing an optimal compression method. Image set In+1Can work in a training mode or a testing mode, and respectively executes the following processes:
step three (a), if the image set In+1And working in a test mode, compressing by adopting a current optimal compression method, and determining whether a subsequent image set needs to work in a training mode. If the classification precision An+1≥A* nX (1-gamma)%, which meets the requirement of maintaining classification precision, and then the online image set In+1The compression method still adopts the current optimal compression method Fn *The subsequent image set is operated in a test mode; if the classification precision An+1<A* nX (1-gamma)%, which does not meet the requirement of maintaining classification precision, then the image set In+1The compression method still adopts Fn *But the next image set In+2Entering a training mode, and when entering the training mode, using the current optimal compression method Fn *Corresponding optimal compression parameter Q*(In),S*(In) The quality factor Q and the resolution S are respectively subjected to step length alpha and step length beta by taking the quality factor Q and the resolution S as centers, and an image set I is selected through an image classifier constructed based on CNNn+2Optimal compression method F under classification precision maintenance* n+2The corresponding compression parameter is { Q*(In+2),S*(In+2) Updating the current optimal compression method to F* n+2. Wherein, gamma is equal to (0, 1).
Step three (b), if the image set In+1Working in training mode with current optimal compression method Fn *Corresponding optimal compression parameter Q*(In),S*(In) Respectively taking the step length alpha and the step length beta to carry out JPEG compression on the quality factor Q and the resolution S by taking the quality factor Q and the resolution S as centers, obtaining all the degraded versions after the image set is compressed, and recording the corresponding compression parameters as { Q (I)n+1),S(In+1) And classifying through a CNN image classification model respectively to obtain a compressed image set In+1All classification accuracies A ofn+1(Q, S) and storage capacity Rn+1(Q, S), selecting image set In+1Optimal compression method F for maintaining classification precision* n+1The corresponding compression parameter is { Q*(In+1),S*(In+1) And updating the optimal compression method to F* n+1。
Step four, repeating the steps to obtain any online image set In+xMethod F for quickly selecting optimal compression under retention of classification precision* n+xUntil the last online image set.
The invention relates to a compression method for keeping the classification precision of a subsequent image set by jointly designing the compression and classification processes of a current image set and quantitatively acquiring the influence of image quality factors and resolution parameters on the image classification accuracy. The method can better realize the image set optimized compression method with the classification precision maintained by selecting the optimized quality factor and the optimized resolution parameter for a plurality of image sets.
The invention is further illustrated by the following specific example.
The embodiment selects a popular CNN image classification algorithm and a common JPEG image compression tool, and the image set has two important parameters when JPEG compression is performed: quality factor Q and resolution S. If images in the same image set are compressed, the selection of a larger Q and a higher S can cause the image classification accuracy to be easier to maintain, but the image compression ratio is not large. The method of the embodiment is implemented by aiming at the target image set InPerforming double-parameter (Q, S) compression on the medium image, counting the influence of different parameters on the size and classification precision of the image set, and selecting an optimal compression method F under the condition of maintaining classification precision* n. The method of the embodiment utilizes the image set InClassificationOptimal compression method F under precision maintenance* nFor subsequent online image sets In+1And quickly selecting the optimal compression method under the condition of keeping classification precision. On-line image set In+1Executing the optimal compression method F under the condition of keeping the current classification precision* nIf the obtained classification precision meets the requirement, the optimal compression parameter under the current classification precision is still F* nFor use with subsequent online image collections; if the obtained precision does not meet the expected requirement, the next image set In+2Entering a training mode, and selecting an optimal compression method F under the condition of keeping classification precision through a CNN classifier* n+2And meanwhile, updating the optimal compression parameter under the condition of keeping the current classification precision to be { Q*(In+2),S*(In+2)}。
The embodiment executes the online image set compression method with maintained classification precision, and processes a plurality of groups of data sets, wherein each image set comprises 1000 images, and the image sets are divided into 10 classes. FIG. 1 is a flow chart of an online image set optimal compression method with preservation of classification accuracy. To make the embodiment more understandable, the first three image sets I are selected1、I2、I3For illustration. First, for the first image set I1An initialization operation is performed, and the initialization process is as shown in fig. 2. The optimal compression method under the condition of maintaining the current classification precision can be obtained through initialization operation and is F* 1The corresponding compression parameter is { Q*(I1),S*(I1) The classification progress is A* 1. Image set I2Entering a test mode, and adopting a current optimal compression method F* 1Compressing, classifying by a CNN classifier, and recording the classification precision as A2. If the classification precision A2Meets the requirement of maintaining classification precision, namely A2≥A* 1X 95%, the subsequent image set still enters the test mode, and the current optimal compression method still remains as F* 1. If the classification accuracy A2Not meeting the requirement of maintaining the classification accuracy, i.e. A2<A* 1X 95%, the subsequent image set goes to that shown in FIG. 3A training mode. Image set I3After entering the training mode, obtaining the optimal compression method F under the condition of keeping classification precision* 3The corresponding compression parameter is { Q*(I3),S*(I3) And F, updating the optimal compression method under the condition of keeping the current classification precision to be F* 3. And repeatedly executing the process to finish the optimal compression for maintaining the classification precision of the multiple groups of image sets.
It can be easily found that the present invention provides two compression parameters for an image set: the quality factor Q and the resolution S are compressed appropriately. Based on a convolutional neural network classifier, carrying out classification test on image sets obtained under different compression parameters under the classifier, comparing and analyzing classification accuracy to obtain a data set compression method with maintained accuracy, and providing reference for selection of a two-parameter compression method for maintaining the classification accuracy of subsequent image sets by using an optimal compression method under the condition of maintaining the classification accuracy.
Claims (1)
1. An online image set compression method with maintained classification accuracy is characterized by comprising the following steps:
(1) an initialization process: working the first image set in a training mode, and testing all compression parameters to obtain an initial optimal compression method, corresponding compression parameters and classification accuracy;
(2) the next image set works in a test mode, the current optimal compression method is adopted for compression, whether the subsequent image set needs to work in a training mode or not is judged, if yes, the step (3) is carried out, and if not, the step is repeated until all the image sets are compressed; the specific steps of judging whether the subsequent image set needs to work in the training mode are as follows: if the classification precision of the current image set is more than or equal to 100 x (1-gamma)% of the current optimal classification precision, the requirement for maintaining the classification precision is met, the current image set compression method still adopts the current optimal compression method for compression, and the subsequent image set continues to work in a test mode; if the classification precision of the current image set is less than 100 x (1-gamma)% of the current optimal classification precision, the requirement for maintaining the classification precision is not met, the compression method of the current image set is still compressed by the current optimal compression method, and the subsequent image set works in a training mode, wherein gamma belongs to (0, 1);
(3) the image set works in a training mode, the quality factor Q and the resolution S are respectively subjected to JPEG compression by taking the optimal compression parameter corresponding to the current optimal compression method as a center, all degraded versions of the image set after compression are obtained, the corresponding compression parameters are obtained, then classification is respectively carried out through a CNN image classification model, all classification accuracies and storage capacities of the compressed image set are obtained, the optimal compression method for maintaining the classification accuracy of the image set and the compression parameter corresponding to the optimal compression method are selected, and the optimal compression method for maintaining the classification accuracy of the image set is used as the updated optimal compression method;
(4) and (4) repeating the step (2) to the step (3) until the last online image set compression is completed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810533771.5A CN108805944B (en) | 2018-05-29 | 2018-05-29 | Online image set compression method with maintained classification precision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810533771.5A CN108805944B (en) | 2018-05-29 | 2018-05-29 | Online image set compression method with maintained classification precision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108805944A CN108805944A (en) | 2018-11-13 |
CN108805944B true CN108805944B (en) | 2022-05-06 |
Family
ID=64089199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810533771.5A Active CN108805944B (en) | 2018-05-29 | 2018-05-29 | Online image set compression method with maintained classification precision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108805944B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6404923B1 (en) * | 1996-03-29 | 2002-06-11 | Microsoft Corporation | Table-based low-level image classification and compression system |
CN102413328A (en) * | 2011-11-11 | 2012-04-11 | 中国科学院深圳先进技术研究院 | Double compression detection method and system of joint photographic experts group (JPEG) image |
CN104331716A (en) * | 2014-11-20 | 2015-02-04 | 武汉图歌信息技术有限责任公司 | SVM active learning classification algorithm for large-scale training data |
CN107547898A (en) * | 2017-09-05 | 2018-01-05 | 东华大学 | A kind of controllable two-parameter distribution system of sensor of energy consumption precision |
CN107592537A (en) * | 2017-10-20 | 2018-01-16 | 东华大学 | A kind of self-adapting compressing towards Aerial Images collection samples distribution method |
-
2018
- 2018-05-29 CN CN201810533771.5A patent/CN108805944B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6404923B1 (en) * | 1996-03-29 | 2002-06-11 | Microsoft Corporation | Table-based low-level image classification and compression system |
CN102413328A (en) * | 2011-11-11 | 2012-04-11 | 中国科学院深圳先进技术研究院 | Double compression detection method and system of joint photographic experts group (JPEG) image |
CN104331716A (en) * | 2014-11-20 | 2015-02-04 | 武汉图歌信息技术有限责任公司 | SVM active learning classification algorithm for large-scale training data |
CN107547898A (en) * | 2017-09-05 | 2018-01-05 | 东华大学 | A kind of controllable two-parameter distribution system of sensor of energy consumption precision |
CN107592537A (en) * | 2017-10-20 | 2018-01-16 | 东华大学 | A kind of self-adapting compressing towards Aerial Images collection samples distribution method |
Non-Patent Citations (3)
Title |
---|
Optical imageprocessing and pattern recognition algorithms for optimal;WALKER B 等;《Optical Pattern Recognition》;20131231;1-4 * |
基于CNN、SVM和迁移学习的轮胎花纹分类;刘颖等;《西安邮电大学学报》;20180510(第03期);42-48 * |
特征保持下的图像压缩编码;刘晓倩;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20120215;I138-1918 * |
Also Published As
Publication number | Publication date |
---|---|
CN108805944A (en) | 2018-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111145116B (en) | Sea surface rainy day image sample augmentation method based on generation of countermeasure network | |
CN109840560B (en) | Image classification method based on clustering in capsule network | |
CN110348399B (en) | Hyperspectral intelligent classification method based on prototype learning mechanism and multidimensional residual error network | |
JP2018101406A (en) | Using image analysis algorithm for providing training data to neural network | |
CN110728656A (en) | Meta-learning-based no-reference image quality data processing method and intelligent terminal | |
CN107680077A (en) | A kind of non-reference picture quality appraisement method based on multistage Gradient Features | |
CN114943345B (en) | Active learning and model compression-based federal learning global model training method | |
CN112115967B (en) | Image increment learning method based on data protection | |
CN111127360B (en) | Gray image transfer learning method based on automatic encoder | |
Hou et al. | Saliency-guided deep framework for image quality assessment | |
CN110110845B (en) | Learning method based on parallel multi-level width neural network | |
CN112183742A (en) | Neural network hybrid quantization method based on progressive quantization and Hessian information | |
CN109657707A (en) | A kind of image classification method based on observing matrix transformation dimension | |
CN112950480A (en) | Super-resolution reconstruction method integrating multiple receptive fields and dense residual attention | |
CN111160481A (en) | Advanced learning-based adas target detection method and system | |
CN110096976A (en) | Human behavior micro-Doppler classification method based on sparse migration network | |
Morzelona | Human visual system quality assessment in the images using the IQA model integrated with automated machine learning model | |
Wang et al. | Global aligned structured sparsity learning for efficient image super-resolution | |
CN114882278A (en) | Tire pattern classification method and device based on attention mechanism and transfer learning | |
CN109741313B (en) | No-reference image quality evaluation method for independent component analysis and convolutional neural network | |
CN112270404A (en) | Detection structure and method for bulge defect of fastener product based on ResNet64 network | |
CN108805944B (en) | Online image set compression method with maintained classification precision | |
CN117172301A (en) | Distribution flexible subset quantization method suitable for super-division network | |
CN110728352A (en) | Large-scale image classification method based on deep convolutional neural network | |
CN111652238A (en) | Multi-model integration method and system |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |