Image data compression using counterpropagation ... - IEEE Xplore

4 downloads 2620 Views 580KB Size Report
Abstract The counterpropagation network functions as a statistically optimal self-adapting look-up table. When using thls network for Image data compression the ...
Image Data Compression Using Counterpropagation Network W. Chang, H.S. Soliman & A. H. Sung New Mexico Institute of Mining and Technology Computer Science Department Socorro, N M 87801 E-mail: [email protected] Abstract The counterpropagation network functions as a statistically optimal self-adapting look-up table. When using thls network for Image data compression the Kohonen network generates a series of vector class indices with the input of subimages that come from the orthogonally divided pictorial image. These indices along with the weight vectors of the outstar network which has learned the vectors associated to the classes can be stored for reconstruction of the original image. The learning of intermediate forms of vector classes, the compression process, and the results such as the compression ratios and the distortion ratios with respect to the target data, the compression unit, and the restored Image are discussed.

I. INTRODUCTION In data compression applications, pictorial data has been the primary paradigm due to the massive storage and transmission time requirement with the original data. Many data compression schemes have been developed in conventional algorithmic methods based on performing complex coding according to mathematical formulae [ 11. In recent years of neural network studies, researchers have begun to apply neural computation techniques on image data compression by using the back propagation network [2] and a frequency-sensitiveself-organizing network [3]. They find that the synaptic adaptation of these artificial neural networks interprets visual perception in terms of synaptic weights which are themselves compact forms of pictorial knowledge. The image data compression using a counterpropagation network (CPN) is another plausible approach VI,151. Section I1 describes the topology, the training rules, and the function of the network. Section I11 and IV define the parametric condition of the compression process and the experimental results. Section V summarizes on the work done as well as the possible future work.

clusters training vectors by the adaptive vector quantization and approximates the centroid of each vector class in a selforganizing fashion [4]-[6], and Grossberg's outstar network which adapts the associated vectors through a supervised training method [5]-[8]. During the training stage, each image pattern is fed into the Kohonen network for the selforganizing classification, and the output of the Kohonen network are then fed into the outstar network with the supervision vector associated to the training vector. After the training stage, the output of the CPN are the counterparts associated to the input. A. The Network Architecture The network (Fig. 1) consists of three layers: an input layer containing rn + n cells for distributing training vector X and supervision vector Y; a Kohonen layer with k cells producing transfers Z; and an outstar layer with n cells producing output vector Y: Although the connection between the Kohonen layer and the outstar layer is complete (afun-in structure, from all cells to one output component), the connection between the input layer and the Kohonen layer is not. Only the input cells which distribute vector X havefunout connection (from one input component to all Kohonen cells) to the Kohonen layer. Each of the other input cells which forward the supervision vector Y has only a single connection to the respective outstar cell. Note also these n input cells are used only in the training stage for providing supervision and not used after the training stage.

COUNTERPROPAGATIONNETWORK 11. FORWARD-ONLY The forward-only counterpropagation network of HechtNielsen [5] is a combination of Kohonen network which

Fig. 1 Forwardaly CPN: Kohonen net self-organiw by applying

Outstar layer adjusts weights by adaptive vector quantization d. supervised vector Y and Kohonen layer's outputZ,and gives Y'.

0-7503-0720-8/92 $3.00 0 1 9 9 2 IEEE

1 if i is the smallest integer for which

B. Adaptive Vector Quantization of Kohonen Network

IX-v,ll I IlX-v)l for all j The adaptive vector quantization (AVQ) of the Kohonen network is the K-means clustering method in which the weight vector having the smallest Euclidean distance to the input vector is chosen as a "winner". In this method, a fued number of weight vectors (i.e., the winner and others within its neighboring region) are chosen for each pattern class. These vectors are optimized in an adaptive process which bears some resemblance to the delta learning rule of Percepmn [9]-[ll]. As a result of the training applying this Mexican hat function [9], the final winners of the adjusted weight vectors end up as approximating centroids for the probability density functions of the pattern classes [IO], [Ill. The initial values for the weight vectors vI, vz, ..., vkcRm(the pattern space) can be chosen from the training data or be randomized. Let us assume that all these initial weight vectors have their associated coordinates indicating they are evenly distributed on a plane, and each has a radius ri (its neighborhood distance) which can be computed by a distance function oc using the coordinates. The samples X(t), t = 1, 2, ..., in the training set are used to adjust the weight vectors in the following way 191: 1) For a given input X(t) a winner's index is the smallest integer w such that

IlX(t)-v,#)ll

= minllX(t)-vt{t)li for all i.

0 otherwise.

As usual, in competitive learning, a mechanism for mediating the race among nodes having the equal minimum Euclidean distance between the weight vector and the input vector is needed. A lateral inhibition or other arbitration processes can be used. The ties can be broken by selecting the node with the smallest index and that each node has a unique and fued index. C. Training the Outstar h y e r After training the Kohonen network. the outstar network begins to learn with, again, the training vector set X(t) and its associated supervision vector Y = +((X(t)) in which is a linear mapping and t = 1.2, ... [4], [5]. The weight uii from Kohonen node i to outstar nodej is adjusted by

+

where yi is thejth component of Y. In (2), the sum has

as follows:

gradually changes uii to approximately &e average of yj of input Y in the time series t. After equilibration of the entire network, the output vector Y'of the outstar layer will be approximatelyavg(Y) [5].

for any j that satisfies

-

Here, is a gain term and r,(t) is a monotonically decreasing scalar, rJt) +O as t + [101. In other words, weight vector v,(t) moves towards the class vector associated to X(t). The synaptic equilibrium is when k

C i~vit+l)-vit)tl=~ for a 1 1 ~ .

i.1

Each v,(t) converges to the approximate centroid of the class associated with X(t). In presence of an input vector X, the output of node i in the non-interpolation mode is

The method follows the conventional image processing scheme which is on an orthogonal basis: By decomposing a large pictorial data into frames of subimages which are then analyzed for extraction of frequencies and identification of pictorial features in order to build a mapping table which can be used to reconstruct the image with the coordinate information [2]. When using a CPN for this purpose, the Kohonen network identifies the pattern class each subimage belongs to and generates a class index by the winning node. The indices generated are of the same sequence that the subimages are fed in. The outstar network takes part in approximating class vectors representing these classes. The class index sequence generated and the weight matrix of the outstar layer are used to restore the image (Fig. 2).

406

3) Centroid Approximation: The reasons that the Kohonen weight vectors vi cannot directly adapt centroids of vector classes and are not used in reconstruction of images are: a) Before equilibration there is no information of the final winner set, hence, there is a dilemma in choosing vi for X. If each X is distributed to all vi by average through out training, all vi end up at the same position in the vector space. The similar adjustment works in training the outstar layer since the Kohonen layer has equilibrated and the winning Kohonen nodes have been determined for each classes. b) The nearest-neighbor training that approximates centroids may not give absolute centroids without massive computation. This is because the training is done by obtaining a winner weight set which satisfies: a member (training vector) of a class is closer to its representing winner than other winners (Each winner may not be at the centroid of its class.) Hence, if the initial weights of two Kohonen networks have been randomized (starting from two different set of positions in the vector space), the weight matrices of them might disagree in the centroids that they approximated (albeit that they have been trained with the same training vector set). In other words, once the condition of being at a position that all its class members are closer than to other competitors is satisfied, the winners stop changing their positions in the vector space (stop further approaching the centroids of their respective classes). These final positions and the weight vectors may not be accurate enough for our application.

9 . 2 After the training stage the winners W representthe d e x of the tern classes. 7he weightsUfrwnW to Y' have Eimage information these classes.

A. The Training Parameters

The parametric condition affects the outcome of the network training. They need be discussed and defined in order to analyze the results. 1 ) The Supervision Vector: For each training vector X'of class C , by incorporating an identity function 9 for giving the supervision vector Y= 9 (X)= X , the CPN Ieams X which is the approximate class vector of C. The outstar layer thus requires the same number of cells as the dimensions of the input vector.

2) The Training Vector: The entire training vector set can be obtained from the image that is to be processed. or from a random selection in the vector space. The choice of the two criteria is application dependent. In the first method, an image is divided into frames having a uniform number ( m ) of pixels. Each pixel is represented by a vector component xi and each frame is represented by a training vector X ( x I ,x2, ..., xm). With the supervision vector generated by the identity function mentioned above, the network carries out a mapping that is ideal only for processing the pictorial data where the training vectors were drawn from. In the second method, the training vectors are drawn at random from the vector space R" in accordance with a fixed probability density function such that a vector X is equally likely to be in any one of the disjoint regions A i (the classes Ci) [121 and h

UA,=R" i= 1

in which h is much smaller than Rm due to the many-toone membership function performed through the Kohonen classification process. If sufficient training vectors are drawn for training, the network becomes more suitable for pmssing general pictorial data.

B . The Compression Operation The operation of the compression thus works like this: the class C icontaining a frame vector X is identified (a winner with output transferring a non-zero term) and the index i of this class is stored or transmitted instead of X ; when restoring the image, a class Civector is used as a replacement for X. The class index of a frame vector X is the winner's index w in the Kohonen layer, and the representative image of the class C , is stored in weights uwl, uw2,..., uwm of the outstar layer, or, simply, the Y' produced at the output of the CPN since y =uwl, y;=uw2. ....y;=uwrn (only the Kohonen node w has a non-zero transfer). C . The Compression Ratio The image I to be compressed is split into N frames of rndimensional vectors. The (m,N)matrix represents the

407

Original data. The indices generated by the Kohonen layer

requires N=lg2h bits for storage (h is the number of classes or the number of distinct winning nodes there are after the training stage.) If the training vectors used were drawn from the original image data, the (m,N) matrix (according to the first training vector selection criterion aforementioned), the weight matrix U (the part from winner nodes to outstar nodes) of the outstar layer is also need&

Q=

6-m-N Nmlg2h + c-h-m

where b is the number of bits needed to store the value of a pixel (e.g., a gray scale), c is the number of bits needed to store the value of a vector component in U,and m is the number forboth outstar nodes or input dimensions . When using the second training vector selection method, the index sequences generated from p different images can apply the same outstar weight matrix which is storedonlyonce. Hence, b-m-N

Q=

N-lkh + CktZ



P

D. The Decompression Process Each index stored is used to recall a single frame of subimages which, in tern, are put together to built the whole image. The information of the subimages to recall is stored in the weights from each winner to outstar nodes. and these weights can be used repeatedly by other index sequences The images restored by these “model” frames cannot be totally identical (if compared pixel by pixel) but the visual perception is still agreeable.

have to be considered and an absolute-difference function is favored over the qusadratic one that diminishes differences. An argument may be that any gray-scaled pixel can be transformed into a group of black and white pixels (having gray scale 2, or called bitmap) by increasing the resolution and incorporate a scale mapping, and the visual perception of grayness is still preserved. This method is widely used in material printing. A number of rescaling and conversion utilities for black-and-white bitmap and gray-scaled pixmap image data on computer systems (e.g., UNIX) have actually been implemented based on the same idea. Here, the absolute-difference distortion ratio E is favored since it works camxtly on both cases:

w.THE COMPRESSIONRESULTS The experiments were performed on two black and white photographs. They were scanned into image files with the scanning resolution of 300 dots (scanning pixels) per inch, and two different modes: the extra fine half-tone (bitmap) and the 16 gray-level (gray-scale) modes. Three different sizes (in pixels) were obtained for each mode: 2562 pixels. 5122 pixels, and 10242pixels. The original and the restored images are shown in Fig. 3. The compression ratios and distortion ratios are listed in Table 1. The frame sizes are 22 pixels and 42 pixels. A gray scale of 4 is used in reconstruction of the image. In the cases of the same frame size, the distortion ratio increases slightly from the result of processing an original image of the size of 10242 pixels to the one of 2562 pixels. The distortion percentage is E over the size of the original image data (same on E2).

E. The Distortion Ratio

Table 1 ExperimentalResults

In the restored image I’ each pixel y ’is made of the weighted sum of the outstar weight matrix and the class index. The difference between the original image I and I’ is the sum of the error distributed all over the picture [2]. The distortion ratio E2 follows the conventional quadratic m r computed: N

Frame Size = 2’ ”House” 1024’ 512’ 256’

“Boy”

m

1024’ 5122 256’

Note that Ez is computed on the basis that the pixel values are coded in either Boolean numbers or bipolar numbers, i.e., (0.1) or (-1,l). When processing gray-scaled pictures, real values or cardinal values that indicate scales

Frame Size = 42 “House” 1024’ 512’ 256’ “Boy” 10242 512’ 256’

408

1.99 2 2 1.99 2 2

6.77 6.89 7.28 6.06 6.59 6.92

6.77 6.89 7.28 6.06 6.59 6.92

1.99 2 2 1.99 2 2

13.8 14.06 14.31 14.50 15.12 15.58

8.05 8.22 8.35 7.86 8.21 8.44

7.88 7.97 7.99 7.88 7.97 7.99

17.67 18.11 18.92 21.88 2251 23.12

17.67 18.11 18.92 21.88 22.51 23.12

7.88 7.97 7.99 7.88 7.97 7.99

21.44 21.98 226 26.13 26.83 27.52

14.48 14.8 15.07 16.71 17.15 17.45

There are two other variations in training the Kohonen network: the supervised learning and the frequency-sensitive self-organization. They are equivalent in functionality as an autoassociation network. Future work might be a comparim of their applications and exploration of the effects of the uaining parameters such as the size of the network, the neighboring effect radius of the Mexican hat function, the representation of the uaining vectors, and the overlapped subimages as training frames. ACKNOWLEDGMENTS We would like to thank the National Center for Supercomputing Applications (NCSA) at Champaign, Illinois for providing us the computation power on their supercomputers. Without their computing resources, we could not have been able to explore the inherent parallelism of the network and the effects of the training parameters on the results. REFERENCES

Flg. 3. On the.top row are the original images (10242 pixels each) and the r e s t d pictures that used compression frame sizes 22pkel~(the second row) and 4' pixels (the third row).

V. CONCLUSION The advantage of the counterpropagation network are: 1) Its simplicity of the training rules: Training rules such as those in the back propagation network are very costly in computation resources. Though there have been a number of optimization methods invented 121, the overall computation complexity still Seems higher than the ones in a CPN. 2) Its explicitly simple and parallelizable architecture: The Kohonen layer and the outstar layer are trained consecutively but independently. Each is itself a one-layer network, unlike the multi-layer back propagation network which requires weight adjustment sequentially from layer to

3) The adaptive vector quantization method makes the polygonal winning regions of the network spherical in higher dimensions. This tends to increase the accuracy of classification since the class regions in the pattern space tend to be isotropic [5].

D. Lelewer. and D. Hirschberg. "Data compression," ACM Computing Surveys. vol. 19, pp. 261-292.1987. M. Mougeot, R. A m c o n . and B. Angeniol, "Image compression with back propagation: improvement of the visual restoration using different cost functions." IEEE Trans. Neural Networks, vol. 4, pp. 467476.1991. 131 W.-C. Fang, B. J. Sheu. 0. T.-C. Chen, and I. Choi, "A VLSI neural processor for image data compression using self-organization networks,"IEEE Trans.Neural Networks, v d 3. pp. 506-518.1992. R. Hecht-Nielsen, "Counterpropagation networks." Applied Optics. . vol. 26, p ~4979-4984,1987. R. Hecht-Nielsen. "Applications of counterpropagation networks," IEEE Trans. Neural Networks, vol. 1. pp. 131-141,1988. T. Kohonen. Self-organization and Associative Memory.2nd ed. New York, NY:Springer-Verlag, 1988. S. Grossberg, "Some networks that can learn, remember, and reproduce any number of complicated space-time patterns," Journal ofMathema!ics and Mechanics, vol. 19. pp. 53-91.1969. I81 G. Carpenter and S. Grossberg, "A massively parallel architecture for a self-organizing neural pattern recognition machine," Computer Vision, Graphics and Image Processing, vol. 37, pp. 54115, 1987. [9] R. Beale & T. Jackson, Neural Computing, Adam Hilger, 1990. [lo] R. J. T. Moms, L. D. Rubin, and H. Tim, "Neural network techniques for object orientation detection: solution by optimal feedforward network and learning vector quantization approaches." IEEE Trans. Pattern Anal. Machine JnteN., vol. 12, pp. 215-223.1990. [ 111 B. Kosko. Neural Networh and Fuzzy System, Prentice-Hall, 1992. [12] A. Gersho, "On the structure of vector quantizers." IEEE Trans. Inform.Theory, vol. 28, pp. 157-162. 1982.

409