a fast lbg codebook training algorithm for vector quantization
DESCRIPTION
A Fast LBG Codebook Training Algorithm for Vector Quantization. Presented by 蔡進義. Motivation. A fast codebook-training algorithm based on LBG algorithm. To reduce the computational cost in the codebook training processes. Outline. Introduction Previous Works Proposed Method - PowerPoint PPT PresentationTRANSCRIPT
A Fast LBG Codebook Training Algorithm A Fast LBG Codebook Training Algorithm for Vector Quantizationfor Vector Quantization
Presented by Presented by 蔡進義蔡進義
2
MotivationMotivation A fast A fast codebook-training algorithmcodebook-training algorithm based on based on
LBG algorithm.LBG algorithm.
To reduce the computational cost in the To reduce the computational cost in the codebook training processes.codebook training processes.
3
OutlineOutline IntroductionIntroduction
Previous WorksPrevious Works
Proposed MethodProposed Method
Some ExperimentsSome Experiments
Discussions and ConclusionsDiscussions and Conclusions
4
Image Compression techniquesImage Compression techniques Block truncation codingBlock truncation coding
Transform codingTransform coding
Hybrid codingHybrid coding
Vector quantizationVector quantization Simple structure and low bit rateSimple structure and low bit rate
5
VQ schemeVQ scheme The VQ scheme can be divided into three parts:The VQ scheme can be divided into three parts:
Codebook generationCodebook generation Encoding procedureEncoding procedure Decoding procedureDecoding procedure
encoding decoding
CodebookCodebook CodebookCodebook
6
Codebook GenerationCodebook Generation The most important task for VQ scheme is to The most important task for VQ scheme is to
design a good codebook.design a good codebook. LBGLBG (Linde-Buzo-Gray) algorithm / (Linde-Buzo-Gray) algorithm / LloydLloyd
clustering algorithmclustering algorithm
The LBG algorithm is an iterative procedure.The LBG algorithm is an iterative procedure.cb0
cb1
cbn
…
7
Euclidean DistanceEuclidean Distance The dimensionality of vector = k (= w*h)The dimensionality of vector = k (= w*h)
An input vector x = (xAn input vector x = (x11, x, x22, …, x, …, xkk))
A codeword yA codeword yii = (y = (yi1i1, y, yi2i2, …, y, …, yikik))
The Euclidean distance between x and yThe Euclidean distance between x and yii
k
jijjii yxyxyxd
1
22)(),(
8
Codebook GenerationCodebook Generation
9
Codebook generationCodebook generation
Training Images Training set
.
.
.
01...
N-1N
VQ Codebook TrainingVQ Codebook Training
10
Codebook generationCodebook generation
Training set
Codebook initiation
Initial codebook
.
.
.
01...
254255
01...
N-1N
VQ Codebook TrainingVQ Codebook Training
11
ImageIndex table
Vector Quantization Encoder
wh
Image compression technique
VQ Encoding ProcedureVQ Encoding Procedure
12
ImageIndex table
Vector Quantization Decoder
wh
Image compression technique
VQ Decoding ProcedureVQ Decoding Procedure
13
Codebook searchCodebook search To reduce the computational cost for the To reduce the computational cost for the
segmentation procedure in the LBG segmentation procedure in the LBG algorithm, many fast algorithms for algorithm, many fast algorithms for codebook searchcodebook search have been developed. have been developed. Partial Distortion Search (PDS)Partial Distortion Search (PDS) Mean-distance-ordered Partial Codebook Search Mean-distance-ordered Partial Codebook Search
(MPS)(MPS) Integral Projection Mean-sorted Partial Search Integral Projection Mean-sorted Partial Search
(IPMPS)(IPMPS)
15
OutlineOutline IntroductionIntroduction
Previous WorksPrevious Works
Proposed MethodProposed Method
Some ExperimentsSome Experiments
Discussions and ConclusionsDiscussions and Conclusions
16
GoalGoal To reduce the computation cost in finding To reduce the computation cost in finding
the closest codeword in the codebook.the closest codeword in the codebook. PDSPDS MPSMPS IPMPSIPMPS
17
PartialPartial distortion search (PDS) distortion search (PDS)
Closest codeword searchClosest codeword search
If If the minimal distancethe minimal distance of each input vector could of each input vector could not be found early, the PDS method can just reduce not be found early, the PDS method can just reduce little computation time.little computation time.
s
iijj dyx
1min
2)(
(a0, a1, a2, …, a15) input vector
(b0, b1, b3, …, b15) codeword
18
Mean-distance-Mean-distance-ordered ordered Partial Codebook Search Algorithm Partial Codebook Search Algorithm (MPS)(MPS)
The Squared Euclidean Distance (SED)The Squared Euclidean Distance (SED)
The Squared Mean Distance (SMD)The Squared Mean Distance (SMD)
The minimal SED codeword is usually in the The minimal SED codeword is usually in the neighborhood of the minimal SMD codeword.neighborhood of the minimal SMD codeword.
m
iijjiE yxYXd
1
2)(),(
m
i
m
iijjiM yxYXd
1
2
1
)(),(
19
Mean-distance-Mean-distance-ordered ordered Partial Codebook Search Algorithm Partial Codebook Search Algorithm (MPS)(MPS)
),(),( min iME YXdYXdm
SMD
SED
reject
),(),( iEiM YXdmYXd ),(),( min iME YXdYXdm
20
Integral ProjectionIntegral Projection Mean-sorted Partial Search Algorithm Mean-sorted Partial Search Algorithm (IPMPS)(IPMPS)
Based on Based on multiple distortion measuresmultiple distortion measures with with different levels of computational complexity.different levels of computational complexity.
Three kinds of integral projections:Three kinds of integral projections:
nijiXjHPn
jx
1),,()(1
n
j
n
ix jiXMP
11
),(
njjiXjVPn
ix
1),,()(1
21
Integral Projection Mean-sorted Partial Search Algorithm Integral Projection Mean-sorted Partial Search Algorithm (IPMPS)(IPMPS)
Three distortion measures:Three distortion measures:2)(),(
iYXiM MPMPYXd
n
kYXiH kHPkHPYXdi
1
2))()((),(
n
kYXiV kVPkVPYXdi
1
2))()((),(
),(),( 2iEiM YXdnYXd
),(),( iEiV YXdnYXd
),(),( iEiH YXdnYXd
For each codeword Yi ),(min2
iM YXddn
),(min iV YXddn
),(min iH YXddn
),(),( 2min
2iEiM YXdnYXddn
Test conditions
22
OutlineOutline IntroductionIntroduction
Previous WorksPrevious Works
Proposed MethodProposed Method
Some ExperimentsSome Experiments
Discussions and ConclusionsDiscussions and Conclusions
23
Generalized Integral Projection Model (GIP)Generalized Integral Projection Model (GIP)
To reduce the computational costTo reduce the computational cost MPS and IPMPSMPS and IPMPS
IPMPS employs the concept of integral IPMPS employs the concept of integral projection to reject further codeword in projection to reject further codeword in search.search.
24
Generalized Integral Projection Model (GIP)Generalized Integral Projection Model (GIP)
1.1. Initially, choose one possible projection map of Initially, choose one possible projection map of the pair (p, q). the pair (p, q).
p segments with q pixels in each segmentp segments with q pixels in each segment
2.2. For each input vector, compute the For each input vector, compute the projection projection PPXX(k) of these p segments.(k) of these p segments.
3.3. The The distortion measuredistortion measure corresponding to this corresponding to this projection map is defined as:projection map is defined as:
p
kYXiqp kPkPYXdi
1
2),( ))()((),(
25
Generalized Integral Projection Model (GIP)Generalized Integral Projection Model (GIP)
4.4. For each codeword, the following inequality can For each codeword, the following inequality can be easily proven truebe easily proven true
5.5. The test condition for this projection map can be The test condition for this projection map can be constructed.constructed.
),(),(),( iEiqp YXdqYXd
),(),(min ipq YXddq
pair(p, q) test conditionpossible projection map
pqp
m
)!)(!(
!
26
Segment mapsSegment maps
27
Fast LBG AlgorithmFast LBG Algorithm1.1. Initially, select Initially, select a set of test conditionsa set of test conditions by by
repeatedly applying the repeatedly applying the GIP modelGIP model with with different projection maps of the desired pair different projection maps of the desired pair (p, q).(p, q).
2.2. Sort the current codebook by the mean Sort the current codebook by the mean values of the codewords.values of the codewords.
3.3. For each vector, find the corresponding For each vector, find the corresponding closest codeword.closest codeword.
28
Fast LBG AlgorithmFast LBG Algorithm4.4. Record the index of the closest codeword Record the index of the closest codeword
for each training vector.for each training vector.
5.5. Update each codewordUpdate each codeword
6.6. Overall averaged distortionOverall averaged distortion
29
OutlineOutline IntroductionIntroduction
Previous WorksPrevious Works
Proposed MethodProposed Method
Some ExperimentsSome Experiments
Discussions and ConclusionsDiscussions and Conclusions
30
Experiment Methods Experiment Methods 512*512 image512*512 image
LBGPDSMPS
31
Experiment ResultsExperiment Results
the property of the
training set
FLBG-1aFLBG-1b
32
OutlineOutline IntroductionIntroduction
Previous WorksPrevious Works
Proposed MethodProposed Method
Some ExperimentsSome Experiments
Discussions and ConclusionsDiscussions and Conclusions
33
ConclusionsConclusions A A generalized integral projectiongeneralized integral projection model is model is
developed to produce the test conditions for the developed to produce the test conditions for the speedup of the search process for the VQ codebook speedup of the search process for the VQ codebook design.design.
To use these To use these test conditionstest conditions to eliminate the need of to eliminate the need of calculating the squared Euclidean distance.calculating the squared Euclidean distance.
The property of imageThe property of image
By choosing proper sets of test conditions for By choosing proper sets of test conditions for different training sets, a great deal of computation different training sets, a great deal of computation cost can be reduced.cost can be reduced.