ISSN: 2278 – 1323                           International Journal of Advanced Research in Computer Engineering & Technolog...
ISSN: 2278 – 1323                               International Journal of Advanced Research in Computer Engineering & Techn...
ISSN: 2278 – 1323                                   International Journal of Advanced Research in Computer Engineering & T...
ISSN: 2278 – 1323                            International Journal of Advanced Research in Computer Engineering & Technolo...
ISSN: 2278 – 1323                                 International Journal of Advanced Research in Computer Engineering & Tec...
ISSN: 2278 – 1323                            International Journal of Advanced Research in Computer Engineering & Technolo...
Upcoming SlideShare
Loading in …5

92 97


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

92 97

  1. 1. ISSN: 2278 – 1323 International Journal of Advanced Research in Computer Engineering & Technology Volume 1, Issue 4, June 2012 VLSI Architecture and implementation for 3D Neural Network based image compression Deepa.S1, Dr.P.Cyril Prasanna Raj 2, Dr.M.Z.Kurian3, Manjula.Y4 1-Final year M.Tech VLSI & embedded systems, 2-Professor, member of IEEE, 3- Dean,HOD,E&C,SSIT,Tumkur, 4-Lecturer,Dept of E&C,SSIT,Tumkur manjulayarava@gmail.comAbstract: Image compression is one of the key option for reducing the number of bits inimage processing techniques in signal processing transmission. This in turn helps increase the volumeand communication systems. Compression of of data transferred in a space of time, along withimages leads to reduction of storage space and reducing the cost required. It has becomereduces transmission bandwidth and hence also increasingly important to most computer networks, asthe cost. Advances in VLSI technology are rapidly the volume of data traffic has begun to exceed theirchanging the technological needs of common man. capacity for transmission. Traditional techniques thatOne of the major technological domains that are have already been identified for data compressiondirectly related to mankind is image compression. include: Predictive Coding, Transform coding andNeural networks can be used for image Vector Quantization. In brief, predictive codingcompression. Neural network architectures have refers to the decorrelation of similar neighboringproven to be more reliable, robust, and pixels within an image to remove redundancy.programmable and offer better performance Following the removal of redundant data, a morewhen compared with classical techniques. compressed image or signal may be transmitted.In this work the main focus is on development of Transform-based compression techniques have alsonew architectures for hardware implementation of been commonly employed. These techniques execute3-D neural network based image compression transformations on images to produce a set ofoptimizing area, power and speed as specific to coefficients. A subset of coefficients is chosen thatASIC implementation, and comparison with allows good data representation (minimum distortion)FPGA. while maintaining an adequate amount of compression for transmission. The results achievedKey words: Image compression, 3-D neural network, with a transform based technique is highly dependentFPGA, ASIC on the choice of transformation used (cosine, wavelet, etc.). Finally vector quantization techniques require the development of an appropriate codebook I. INTRODUCTION to compress data. Usages of codebooks do not guarantee convergence and hence do not necessarilyNeural network for image compression and deliver infallible decoding accuracy. Also the processdecompression have been adopted as they achieve may be very slow for large codebooks as the processbetter compression and also work in noisy requires extensive searches through the entireenvironment. Many approaches have been reported in codebook.realizing the Neural Network architectures onsoftware and hardware for real-time applications. Artificial Neural Networks (ANNs) have beenToday’s technological growth, has led to scaling of applied to many problems and have demonstratedtransistors and hence complex and massively parallel their superiority over traditional methods whenarchitecture are possible to realize on dedicated dealing with noisy or incomplete data. One suchhardware consuming low power and less area. This application is for image compression. Neuralwork reviews the neural network approaches for Networks seem to be well suited to this particularimage compression and proposes hardware function, as they have the ability to preprocess inputimplementation schemes for Neural Network. The patterns to produce simpler patterns with fewertransport of images across communication paths is an components. This compressed information (stored inexpensive process. Image compression provides an 92 All Rights Reserved © 2012 IJARCET
  2. 2. ISSN: 2278 – 1323 International Journal of Advanced Research in Computer Engineering & Technology Volume 1, Issue 4, June 2012a hidden layer) preserves the full informationobtained from the external environment. Not onlycan ANN based techniques provide sufficientcompression rates of the data in question, but securityis easily maintained. This occurs because thecompressed data that is sent along a communicationline is encoded and does not resemble its originalform. II. SYSTEM DESIGN Image compre 3D Image ssion enco Image prepro Image using ding acquis cessing 3D archi ition Neural tectu Networ re k Fig 1: Block diagram overview Fig 2: Proposed 3DNN architectureThe fig 1 gives the overall view of the work. Hereimage may be any picture or a photograph or a visualdata. This is captured or acquired by an optical lencesuch as a camera. The image is “discretized” i.e.,defined on a discrete grid and stored as two-dimensional collection of light values (or grayvalues).The image preprocessing does the function ofadjustment of pixels and removal of noise from thecaptured image. The image is compressed using 3DNeural Network architecture and encoded for imagetransmission.The 3D Neural Network architecture for imagecompression is main topic of interest of this projectwork. An attempt to design and develop 3-D adaptiveneural network architecture for image compressionand decompression that can work in real time, noisyenvironment is made here. Fig 3: Basic architecture for image compression using NNThe proposed 3-DNN architecture is as shown in M-dimensional coefficient vector y is calculated asfigure 2. Typical way of compression with neural Y=Zx Xnetwork is using hidden layer with lower dimension then the inverse transformation is given by thethen input or output layer. In this case, network input transpose of the forward transformation matrixand output is an image. The input and hidden layers resulting in the reconstructed vectorperform the compression, it transforms the input X =ZT x Yvector of dimension d(IN) to hidden layer space of Here 16 input neurons, 4 neurons each in 4 hiddendimension d(HI). The dimension of hidden layer is layers and 16 output neurons are considered. purlinlower than of input layer d(HI)<d(IN). Output layer function and purlin functions are used to train thewith the help of hidden layers performs input and output neurons of hidden layers. Backdecompression. It transforms the vector from hidden propagation technique is also used.layer with lower dimension to output vector spacewith higher dimension d(HI)<d(OUT). Thedimension of input and output layer is the same III. SYSTEM IMPLEMENTATION/d(IN)=d(OUT). SIMULATION Matlab program is written in the following steps:The basic architecture for image compression using The input image is read by the instruction imread.neural network is shown in figure 3 This will read image saved in the specified path. Next a part of image is read by specifying particular row 93 All Rights Reserved © 2012 IJARCET
  3. 3. ISSN: 2278 – 1323 International Journal of Advanced Research in Computer Engineering & Technology Volume 1, Issue 4, June 2012and column values. This part of the image isdisplayed. Rearrangement of image is the selectedapplication of the multilayer perceptron. Next is thetraining procedure where specified weight and bias isobtained for image compression & decompression.The reshaping of a block matrix in to a matrix ofvector occurs. The design consists of matrixmultiplication of two matrices, one is the input imagesamples(each column), and the second is the weightmatrix obtained after training. This multiplied outputis added with bias to obtain the compressed outputthat gets transmitted or stored in compressed format.On the decompression side, the compressed data in Fig 5matrix form is multiplied with the output weightmatrix and added with output bias to get back the Here the image is read in figure. Next a part oforiginal image. The image quality of the image(64*64) is read for compression and thedecompressed image depends on the weight matrix decompressed output is shown.and the compression ratios. The image data of size Fig 6: Training the neuron in matlab tool16x16 is taken in each column wise i.e column 1 ofsize 16x1 then multiplied by the weight matrix of4x16 and added with bias matrix of size 4x1 to get acompressed output of 4x1. On the decompressionside 4x1 input matrix (compressed image) ismultiplied with the weight matrix of size 16x4 andadded with output bias matrix of size16x1to getoutput decompressed matrix of size 16x1. Thisprocedure is repeated for 15 more times toreproduces the original image. In order to achievebetter compression nonlinear functions are used bothat transmitter and receiver section. The NeuralNetwork has 4 hidden and 16 output layers. Purlin The above snapshot shows training the neuron inand purlin functions are used for input and output matlab tool.hidden layers. Back propagation technique is used.Finally rearrangement of the vectors in to blockmatrix to display the image. Simulation Results in matlab Image input The different compression algorithms can be compared based on certain performance measures. Read image Compression Ratio (CR) is the ratio of the number of bits required to represent the data before compression to the number of bits required after compression. Bit Read a part of the image rate is the average number of bits per sample or pixel (bpp), in the case of image. The image quality can be Display the image evaluated objectively and subjectively. A standard objective measure of image quality is reconstruction error given by equation 1. Rearrangement of image Error E = Original Image – Reconstructed image (1) Training procedure (fixing the compression ratios & training Two of the error metrics used to compare the various functions) image compression techniques are the mean square error (MSE) and the Peak Signal to Noise Ratio (PSNR). MSE refers to the average value of the Rearrange matrix to display square of the error between the original signal and the reconstruction as given by equation 2. The important Output image parameter that indicates the quality of theFig 4: Flow chart of matlab program reconstruction is the peak signal-to-noise ratio 94 All Rights Reserved © 2012 IJARCET
  4. 4. ISSN: 2278 – 1323 International Journal of Advanced Research in Computer Engineering & Technology Volume 1, Issue 4, June 2012(PSNR). PSNR is defined as the ratio of square of the image. Combination of different compression ratiospeak value of the signal to the mean square error, (CR)with different transfer functions gives differentexpressed in decibels. PSNR values for the same input image.MSE = E / (SIZE OF IMAGE) (2) Fig 7 PSNR 1:16 CRThe MSE is the cumulative squared error between thecompressed and the original image, whereas PSNR is 20a Σmeasure of the peak error. The mathematical 15formulae for the computation of MSE & PSNR is : 10 M N 5MSE = 1/ MN [ Σ Σ (Ixy – I xy)2] (3) 0 psnr i=1j=1PSNR = 20 * log (255 / sqrt(MSE)) (4) functwhere I(x,y) is the original image, I(x,y) is theapproximated version (which is actually thedecompressed image) and M, N are the dimensions of PSNR 2:16 CRthe images, 255 is the peak signal value. A lowervalue for MSE means lesser error, and as seen from 20the inverse relation between the MSE and PSNR. 15Higher values of PSNR produce better image 10compression because it means that the ratio of Signal 5to Noise is higher. Here, the signal is the original 0 psnrimage, and the noise is the error in reconstruction.So, a compression scheme having a lower MSE (and functa high PSNR), can be recognized as a better one.Compression results by adaptive BPNN Structurefor size=64*64,r=4,CR=4:16(75%) 4:16 CRSl Test Image Image Image PSNR 21no. max MSE 20 Error 19 181 cameraman 108 262.01 23.94 172 board 166 958.40 17.7765 16 153 cell 38 26.462 33.9045 psnr4 circuit 15 14.113 36.63445 Lena 61 100.00 28.13056 sun 44 115.84 27.29197 girl 58 42.806 31.81578 Blue hills 8 22.182 44.74209 Sunset 55 39.371 32.179010 Water lilies 72 31.379 33.16411 Winter 36 47.626 31.35212 Drawing 255 170.77 15.19413 College 57 97.780 24.03714 Garden 78 87.990 25.00015 My photo 101 197.22 22.99116 Holi 97 175.34 25.717 Bhagavadgeetha 67 65.63 29.9618 Devinecouple 74 80.20 29.119 krishna 39 7.1 39.620 Goddess 65 45.048 31.5940 Table 1: COMPRESSION RESULTSCombination of different transfer functions givesdifferent decompressed images for the same input 95 All Rights Reserved © 2012 IJARCET
  5. 5. ISSN: 2278 – 1323 International Journal of Advanced Research in Computer Engineering & Technology Volume 1, Issue 4, June 2012 Fig9For a better image, the max error must be as low aspossible, the mean square error(MSE) must also besmall and the peak signal to noise ratio must be high.From the above observations the tansig,purelin and Inputs(inputs with scaling) are storeed as serial in parallel out registerspurelin,purelin functions give consistently highPSNRs for the respective compression ratios(CR). Fig10Trainrp is a network training function used in thiswork that updates weight and bias values accordingto the resilient backpropagation algorithm(Rprop).Trainlm may also be used which is also anetwork training function that updates weight andbias values according to Levenberg-Marquardtoptimization but consumes huge amount of memory.In this work back propagation technique is used. Theabove results are for 64*64 image. The NN with BPalgorithm is also trained with 128*128, 256*256 and521*512 images. The network trained usingbackpropagation algorithm is realized usingmultipliers and adders for FPGA realization .The output of compression and decompression in HDL is being carried out with the design of fastmultiplier which uses Wallace technique. A 9 bit Fig11Wallace multiplier and a 18 bits carry save adder isdesigned for this project work.The inputs for 9 bit Wallace tree multiplier and 18bits carry save adder is obtained by the MATLabprogram.HDL coding is being carried out for FPGArealization. A 3D Neural network algorithm isplanned for the design.HDL/VHDL and FPGA simulation resultsFig8 Output obtained by the vertex5 chip scope design IV.HARDWARE AND SOFTWARE REQUIREMENTS The Neural Network archicture will be synthesized on FPGA to estimate the hardware complexity foroutput of 9 bits Wallace multiplier and 18 bits carry save efficient ASIC implementation. The design isadder mapped on VERTEX5 device from Xilinx 13.1 96 All Rights Reserved © 2012 IJARCET
  6. 6. ISSN: 2278 – 1323 International Journal of Advanced Research in Computer Engineering & Technology Volume 1, Issue 4, June 2012vertion. As the design is mapped on FPGA, it image. Further this is coded in HDL for FPGAsupports Reconfigurability. Reconfigurability can be realization and the HDL code is modified for ASICachieved by changing the input layer values for better Designing and implementation. Low powercompression and decompression. techniques are used to reduce power dissipation of the complex architecture.The HDL code for FPGA implementation is modifiedfor ASIC implementation. The general coding styles VII. REFERENCEis adopted for building optimized RTL code for ASICimplementation. [1]. K.VenkataRamanaiah and Cyril Prasanna Raj VLSITo support higher order multiplication it is modeled Architecuture for Neural Network Based Image Compression, ©using HDL, and there is a need to develop an RTL 2010 IEEEmodel using efficient coding styles for ASIC [2]. Hamdy Soliman Computer Science Department New MexicoSynthesis using Synopsys Design Compiler Version2007.03. The timing analysis will be carried out Tech Neural Net Simulation: SFSN Model For Imageusing Synopsys Prime Time. Compression, Proceedings of the IEEE, 2001 [3]. Daniel Matolin, J¨org Schreiter, Stefan Getzlaff and Ren´eIn brief the hardware used are the FPGA platform, Sch¨uffny,”An Analog VLSI Pulsed Neural Networkand ASIC libraries. Implementation for Image”, Proceedings of the InternationalThe software requirements are Xilinx for HDLcoding , Design compiler and Matlab. Conference on Parallel Computing in Electrical Engineering (PARELEC’04) IEEE [4]. Arbib, Michael A. (Ed.) (1995). The Handbook of Brain V. ADVANTAGES AND LIMITATIONS Theory and Neural Networks. [5]. Alspector, U.S. Patent 4,874,963 "Neuromorphic learningAdvantages:Among the all present method, neural network is of networks". October 17, 1989.special interest due to the success it has in many [6]. Ivan Vilovic,” An Experience in Image Compressionapplications. UsingNeural Networks”,48th International Symposium ELMAR-1. Learning ability, 2006, 07-09 June 2006, Zadar, Croatia2. System identification, [7]. Hadi Veisi, Mansour Jamzad,” A Complexity-Based Approach3. Robustness against noise,4. Capability of optimum estimation and being used in Image Compression using Neural Networks”, Internationalin parallel structures Journal of Signal Processing 5-2-20095.Various kinds of neural networks like multilayer [8]. Rafid Ahmed Khalil,” Hardware Implementation ofperceptron (MLP), Hopfield, learning vector Backpropagation Neural Networks on Field programmable Gatequantization (LVQ), self-organizing map (SOM) and Array (FPGA)”, Al-Rafidain Engineering Vol.16 No.3 Aug. 2008principal component neural networks have been usedto compress images. The VLSI Architecture for 3D [9]. Rehna. V. J, Jeya Kumar. M. K,”Hybrid Approaches to ImageNeural Network based image compression consume Coding: A Review” (IJACSA) International Journal of Advancedless power and space, hence suitable for low cost and Computer Science and Applications, Vol. 2, No. 7, 2011reliable Hardware implementation, reconfigurable on [10]. Jan Pohl, Petr Polách, Václav Jirsík,“ALTERNATIVE WAYFPGA and good time to market. The process of OF IMAGE COMPRESSION WITH NEURAL NETWORK”,image compression is very fast as it uses neural [11]. Hossein SAHOOLIZADEH and Amir Abolfazl SURATGARnetwork rather than codebook. Adaptive Image Compression Using Neural Networks 5thLimitations: International Conference: Sciences Of Electronics, TechnologiesThis technique may have small amount of distortion of Information and Telecommunications March 22-26, 2009in the decompressed image TUNISIA [12]. Matlab Image Processing Toolbox User’s Guide version-2 VI. CONCLUSION [13]. Image processing study guide by Rafael C. Gonzalez,Richard E. WoodsThe neural network architecture for image [14]. Digital Image Processing By Gonzalez 2Nd Edition 2002,compressions has been analyzed on FPGA and ASIC (Ebook) Prentice Hall.platforms and need to implement on 3D neural [15]. Neural Network Toolbox™ 6 User’s Guide by Howardnetwork. A Matlab program is written to train theneurons for compression and decompression of Demuth , Mark Beale , Martin Hagan. 97 All Rights Reserved © 2012 IJARCET