Dr. V.P. Vishwakarma,IJRIT 571 International Journal of Research in Information Technology (IJRIT)
www.ijrit.com www.ijrit.com www.ijrit.com
www.ijrit.com
ISSN 2001-5569
Improving convergence time of BPNN Image Compression / Decompression System
Dr. V.P. Vishwakarma1, Sanjay Bhardwaj2
1Associate Professor, U.S.I.C.T, G.G.S.I.P. University New Delhi, Delhi, India
2Student, U.S.I.C.T, G.G.S.I.P. University New Delhi, Delhi, India [email protected]
Abstract
Image data comprises large size into memory. The transport of image data via communication path is a costly process. With image compression, we can reduce the number of bits in transmission. This helps in reducing the amount of data transfer and also helps in reducing the cost of transmission. In this paper, a three layered Backpropagation neural network (BPNN) was designed for constructing image compression and decompression system. The BPNN algorithm was used for training the designed network. We used the modified algorithm for training to reduce the training time. The different parameters and architecture were used to improve the MBP for training. At the end, we compared the results of MBP and BP. The performance of the system was compared using results like Compression Ratio (CR), Signal to noise ratio (SNR), Peak Signal to noise ratio (PSNR) and Normalized Mean Square Error (NMSE).
Key Words: Artificial Neural Network (ANN), Backpropagation Neural Network (BPNN), Backpropagation algorithm (BPA), Modified Backpropagation (MBP),Compression Ratio (CR),Signal to noise ratio (SNR),Peak signal to noise ratio(PSNR),Normalized Mean Square Error (NMSE), Mean Square Error (MSE)
1. Introduction
Neural networks are inherent adaptive systems and are useful for managing nonstationaries in image data. ANNs are being extensively used for image compression problems as they are superior to traditional methods. ANNs are most suitable for image compression because of the ability to preprocess input patterns to produce patterns with smaller number components. The compressed information contains the complete information from the external environment.
The artificial neural networks not only provides adequate compression rate but also provide security of data. [4]
ANNs are comprised of various interconnected neurons that are connected together via weights. [5]. The BPNN is currently the most widely used architecture. The backpropagation algorithm (BP) is most commonly used in the training of the BPNN. We can apply BP to any BPNN which uses activation function and supervised learning. [6]
The compression can be achieved by using backpropagation (BP) in the ANNs by training the network in a way such that weights scale the input vector of N-dimension into a narrow channel of P-dimension, (where P < N) and produce the output value of N-dimension. [1, 2]
The main drawback of BPNN architecture for image compression is slow convergence. Many previous studies focused on improving the speed of convergence, but all ended in large convergence time. [3, 7, 9] Therefore in this paper we used the modified backpropagation algorithm (MBP) to train the network to reduce the convergence time.
Dr. V.P. Vishwakarma,IJRIT 572 The BPNN architecture was designed on the basis of previous research. [8] Also, the processes for image normalization, segmentation and preparation of BPNN training set are same as described in the previous research.
[10]
2.
Program Steps for BP
1. Initialize learning rate, weights and threshold value. Initialize iterations to zero.
2. Randomly select the training image array.
3. Prepare non-overlapping blocks from the array.
4. Rasterize the blocks of image array
5. Normalize the resultant array i.e convert the coordinates [0-255] to coordinates [-1 - +1]
6. Get one column vector from the resultant array and feed it to the input neurons.
7. The target vector is same as the input vector, so initialize the input vector to target vector 8. Compute the output of hidden layer
9. Compute the output of the output layer
10. Compute the error as error = target value – output value 11. Sum the square of error for one image array
12. Compute the local gradient of output layer units and then update the weights between output and hidden layer units.
13. Compute the local gradients of the hidden layer units and update the weights between the hidden unit and input layer units.
14. If there are more column vectors in the resultant array go to step 5
15. After processing one image array, compute the MSE and check if MSE is less than or equal to the threshold value
16. If MSE < = threshold value then stop otherwise go to step 2
3. Program Steps for MBP
The MBP algorithm is similar to BP algorithm. The only difference between these two is the rule for calculating the local gradient of the output layer units. [8] The rule for computing local gradient is modified as follows. [10]
δj = β(tj – Oj ) + ( 1 – β)tanh(tj – Oj ) (1) Where β is calculated by equation [10]
β = exp (-µ / E2) (2) The value of β reduces from one to zero during the training
4. Implementation of MBP
In this paper, the programs to implement MBP and BP were built using MATLAB 1. Initialize β to 1 and initialize the value of µ in the range [ 0.1 to 10]
2. Use hyperbolic tangent function for hidden layer and output layer neurons
3. Normalize the image array by converting the coordinates [ 0-255] to the coordinates [-1 - +1]
4. Initialize the value of learning rate parameter η in the range [0.01 – 0.1]
5. Initialize momentum factor to zero
6. Use the modified rule of Eq.(1) for calculating the local gradients of the output layer neurons.[10]
7. Compute the value of β in each iteration
Dr. V.P. Vishwakarma,IJRIT 573
5. Compression / Decompression Process
The compression process of BPNN is as follows:
1. Normalize the image array by converting it from [0-255] to [-1 - +1]
2. Divide the image array into non-overlapping blocks 3. Convert each block into one dimensional vector 4. Feed this vector to the input layer
5. Calculate the output of the hidden layer units
6. Store the output of the hidden layer units into an array.
The Decompression process of BPNN is as follows:
1. Compute the outputs of the output layer neurons using output of the hidden layer neurons and weight matrix
2. Derasterize the outputs of the output layer
3. Convert each vector of the array into non-overlapping blocks 4. Return the blocks to their original locations
6. Results
We compared the MBP and BP on the basis of number of iterations to achieve the same value of MSE. We used both algorithms to train the same BPNN with same weights and the same threshold value (0.005). The following sections show the results of changing the values of η and µ and Nh (no. of hidden layer neurons) on the number of iterations.
6.1
Learning Rate vs Number of Iterations
Table 1 (Nh=8)
Algorithm Iterations SNR(dB) PSNR(dB) NMSE
BP(η=0.01) 98304 41.53 45.37 1.9009
MBP(η=0.01,µ=0.1 27648 45.54 43.20 3.1342
BP(η=0.02) 98304 41.50 45.82 1.7129
MBP(η=0.02,µ=0.1 27648 48.98 41.14 5.0336
Table 2 (Nh=16)
Algorithm Iterations SNR(dB) PSNR(dB) NMSE
BP(η=0.01) 21504 45.16 42.91 3.3527
MBP(η=0.01,µ=0.1 12288 40.13 46.15 1.5880
BP(η=0.02) 24576 45.11 43.01 3.2765
MBP(η=0.02,µ=0.1 12288 42.19 45.01 2.0649
6.2 µ vs number of iterations, N
h= 8
Table 3 (Nh=8)
Algorithm Iterations SNR(dB) PSNR(dB) NMSE
BP(η=0.01) 98304 42.63 44.65 2.2428
MBP(η=0.01,µ=2) 15360 46.88 42.25 3.9001
MBP(η=0.01,µ=4) 9216 46.86 42.28 3.8705
MBP(η=0.01,µ=6) 6144 47.34 42.17 3.9683
MBP(η=0.01,µ=8) 6144 47.74 42.01 4.1236
Dr. V.P. Vishwakarma,IJRIT 574
6.3 Effectiveness of Hidden layer neurons on CR, SNR,PSNR and NMSE (η = 0.01, µ = 4)
Table 4 Trained Image
or not trained image (Nh=8)
SNR(dB) PSNR(dB) NMSE CR Image Name
Trained Image 47.39 42.03 4.0996 8:1 Lena.ppm
Not Trained 46.68 42.34 3.8208 8:1 Car.jpg
Table 5 Trained Image
or not trained image (Nh=16)
SNR(dB) PSNR(dB) NMSE CR Image Name
Trained Image 45.50 42.94 3.3262 4:1 Lena.ppm
Not Trained 45.17 43.00 3.2831 4:1 Car.jpg
Table 6 Trained Image
or not trained image (Nh=32)
SNR(dB) PSNR(dB) NMSE CR Image Name
Trained Image 43.63 43.85 2.6991 2:1 Lena.ppm
Not Trained 44.49 43.27 3.0803 2:1 Car.jpg
Dr. V.P. Vishwakarma,IJRIT 575 Fig. 1 Source Images for BPNN training
Fig. 2 Decoded Image (Trained Image) Fig. 3 Decoded Image (untrained Image)
Fig. 4 Source Image (car.jpg)
7. Conclusion
All programs were developed on single processor using MATLAB. The methods we used to speed up the training time are limited only to few patterns. Performance of BPNN was tested on various images of size 256 X 256 using blocks of 8 x 8 and 16 x 16. It was also tested by varying the size of hidden layer. The values of CR, SNR, PSNR and NMSE were calculated in different conditions and compared for both BP and MBP. From the observations we can conclude that the performance of the BPNN can be enhanced by making changes in the structure itself. We also observed that the ability of network to compress the untrained image is not same as for trained images.
Dr. V.P. Vishwakarma,IJRIT 576
References
[1] S. Marsi, G. Ramponi and G.L. Sicuranza, “Improved neural structures for image compression”,Proc IEEE Intl Conf on Acoustic Speech and signal Processing, 1991,pp 281-284
[2] Ian Vilovic, “An Experience in image Compression using Neural Networks”, 48th International symposium ELMAR, 2006,pp. 95-98
[3] V.V. Joseph Rajapandian and N. Gunaseeli. “Modified Standard Backpropagation Algorithm with Optimum Initialization for Feedforward Neural Networks”, International Journal of Imaging Science and Engineering (IJISE), vol.1, no.3, july 2007, GA, USA, ISSN: 1934-9955
[4] Simon Haykin, “Neural Networks and Learning Machines”, PHI Learning Private Limited, New Delhi, 2012 [5] K.P. Lippmann, “An Introduction to Computing with Neural Nets”,IEEE ASSP Magazine, vol 4, no.2, April 1987,pp4-22.
[6] P.D. Wasserman. Neural Computing: Theory and Practice. Van Nostrand Reinhold Co. New York, NY, USA, 1989, ISBN, 0-442.
[7] T. Xianghong and L. Yang. “An Image Compression Algorithm Based on Classified Blocks with BP Neural Netwworks”, Proc. Of the international conference on computer science and software engineering. IEEE Computer Society, Wuhan Hubei, Vol. 4, Dec 2008, pp. 819-822, ISBN: 978-0-7695-3336-0,DOI:
10.1109/CSSE. 2008.1357.
[8] O.N.A Al-Allaf. “Fast Back Propagation Neural Network Algorithm for reducing Convergence Time of BPNN Image Compression” Proceedings of 5th International Conference on IT and Multimedia at UNITEN(ICIMU 2011) Malaysia
[9] Fatima B. Ibrahim. “Image Compression using Multilayer Feed Forward Artificial Neural Network and DCT”, Journal of Applied Sciences Research, Vol.6 no.10 2010,pp.1554-1560, INSInet Publication.
[10] B.S. Mahmood and O.N. Al-Allaf, “ Fast Backpropagation Neural Network for VQ-Image Compression”, Raf.
J. of Comp. Sc. And Math’s, vol.1, no.1, 2004