1 / 102

Applying back propagation to shape recognition

Applying back propagation to shape recognition. Presented by Amir Mahdi Azadi Farzane Salami Osame Ghavidel Ahmad Lahuti. outline. BP algorithm IDP Shape recognition with matlab code Face recognision with matlab code. Introduction.

tamyra
Télécharger la présentation

Applying back propagation to shape recognition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Applying back propagation to shape recognition Presented by Amir Mahdi Azadi FarzaneSalami OsameGhavidel Ahmad Lahuti

  2. outline • BP algorithm • IDP • Shape recognition with matlab code • Face recognision with matlab code

  3. Introduction • ورباس (Verbos) در 1974 شيوه آموزش پس انتشار خطا ياBack Propagation را در رساله دکتری خود بیان کرد که يک شبکه پرسپترون چند لايه البته با قوانين نيرومندتر آموزشی بود. چون خطا را در طول شبکه رو به عقب منتشر می کند به این عنوان نامگذاری شد. • الگوریتمBPتوسط(1985) Williamsو Hintonو Rumelhart گسترش یافت.

  4. Introduction… • الگوریتم از روش شیب نزول (Gradient descend) استفاده کرده تا پارامترهای شبکه را طوری تنظیم کند تا با دسته نمونه های آموزشی تطابق داشته باشند. یادگیری شبکه های عصبی در مقابل خطا در داده های آموزشی مقاوم است و در تشخیص چهره (Cottrell 1990)، شناسایی گفتار (Lang 1990)و تشخیص کاراکترهای دست نویس (LeCun 1989) کاربرد دارد.

  5. Back Propagation Algorithm • الگوریتم BP وزنهای لازم برای یک شبکه چند لایه با ساختار شبکه ثابت را پیدا می کند. در این الگوریتم از شیب نزولی برای مینیمم کردن میزان خطا استفاده می شود. • الگوریتم BP یکی از روشهای یادگیری با ناظر است.

  6. Back Propagation Algorithm… • Training a multilayer perceptron is the same as training a perceptron; the only difference is that now the output is a nonlinear function of the input thanks to the nonlinear basis function in the hidden units. Considering the hidden units as inputs, the second layer is a perceptron and we know how to update the parameters, . For the first-layer weights,, we use the chain rule to calculate the gradients:

  7. Back Propagation Algorithm… • The learning problem faced by Back propagation is to search a large hypothesis space defined by all possible weight values for all the units in the network. Gradient descent can be used to find a hypothesis to minimizeE. • Backpropagation (training_examples, Ƞ,) • Each training example is a pair of the form (), where is the vector of network input values and is the vector of target network output values.

  8. Back Propagation Algorithm… • Ƞis the learning rate (e.g., .05),is the number of network inputs,the number of units in the hidden layer, the number of output units. • The input from unit i into unit j is denoted, and the weight from unit i to unit j is denoted.

  9. Error Back Propagation Learning • The back propagation algorithm learns the weights for a multilayer network, given a network with a fixed set of units and interconnections. It employs gradient descent to minimize the squared error between the network output values and the target values for these outputs. • Outputs is the set of output units in the network • and are the target and output values associated with kth output unit and training example d.

  10. Hypothesis Space • دو محور w0و w1دو مقدار ممکن برای بردار وزن واحد خطی هستند. محور سوم E میزان خطای مربوط به دسته ای از نمونه های آموزشی خاص را نشان می دهد. سطح خطای نشان داده شده در شکل ارجحیت هر بردار وزن را در فضای فرضیه نشان می دهد. با توجه به تعریف سطح خطا همیشه سهمی وار است و یک نقطه مینیمم مطلق خواهد داشت.

  11. Back Propagation Rules • Create a feed-forward network with inputs, hidden units, and output units. • Initialize all network weights to small random numbers. • Until the termination condition is met, Do • For each () in training-examples, Do • Propagate the input forwardthrough the network: • Input the instance to the network and compute output of every unit u in the network.

  12. Update Weights • Propagate the error backwardthrough the network: • For each network output unit k, calculate its error term • For each hidden unit h, calculate its error term • Update each network weight

  13. BP Neural Network

  14. Structuring the network • In some applications, we may believe that the input has a local structure. For example, in vision we know that nearby pixels are correlated and there are local features like edges and corners; any object, for example, a handwritten digit, may be defined as a combination of such a primitives. • When designing the MLP, hidden units are not connected to all input units because not all inputs are correlated. Instead we define hidden units that are connected to only a small local subset of the inputs. (Le Cun 1989)

  15. Structuring the network… • A structured MLP. Each unit is connected to a local group of units below it and checks for a particular feature.

  16. Applications • NETtalk: Neural networks that learn to pronounce English text (Sejnowski and Rosenberg, 1987) • Speech recognition (Cohen et al, 1993; Renals et al. 1992) • Optical character recognition (Sackinger et al. 1992; LeCun et al., 1990) • On-line handwritten character recognition (Guyon, 1990) • Combining visual and acoustic speech signals for improved intelligibility (Sejnowski et al., 1990) • System identification (Narendra and Parthasarathy, 1990) • Steering of an autonomous vehicle (Pomerleau, 1992)

  17. Example- Speech Recognition • تشخیص گفتار برای تشخیص حروف صدا دار بین دو حروف بی صدا h,d در ده حالت مختلف. • ورودی سیگنال ها بصورت دو پارامتر عددی که از آنالیز صدا بدست آمده است. • پیش بینی شبکه صدایی است که بیشترین مقدار خروجی شبکه را داشته باشد.

  18. Steering of an autonomous vehicle • سیستم کنترل فرمان با سرعت متوسط در بزرگراه ها توسط Pomerleau(1993) طراحی شده است. ورودی این شبکه عصبی یک تصویر 32× 30 نقطه ای است که از دوربین رو به جلویی که در داخل اتومبیل کار گذاشته شده است گرفته می شود. خروجی شبکه عصبی جهتی است که فرمان به آن سمت باید بچرخد. شبکه برای تقلید فرمان دهی انسان در طول حدود 5 دقیقه آموزش داده می شود. شبکه موفق شده خوردو را تا سرعت 70 مایل در ساعت و برای مسافت 90 مایل در بزرگراه کنترل کند.

  19. Steering of an autonomous vehicle

  20. Handwritten Digit recognition • یکی از کاربردهای شبکه های BP تشخیص ارقام است. • حداقل پردازش داده ها مورد نیاز است. • ورودی شبکه تصاویر نرمالایز شده از ارقام منفک شده است. • خطای روش 1% و خطای عدم پذیرش 9% است.

  21. ZIP code recognition • ورودی شامل پیکسلهای سیاه و سفید است. ارقام براحتی از پس زمینه جدا می شوند. • 10 فهرست از خروجی وجود دارد. • ارقام سایز ها و سبک های مختلفی دارند. • نرونهای لایه اول شدت روشنائی پیکسلها را تقریب میزنندو • نرونهای لایه آخر شکل ارقام را تعیین میکنند.

  22. ZIP code recognition • ابتدا 9298 رقم در حالتهای مختلف segment بندی می شود. این ارقام توسط افراد مختلفی نوشته شده است. • این مجموعه با 3349 رقم چاپی از 35 فونت مختلف تکمیل شده است. • یکی از ویژگی های این مجموعه این است که هم داده های آموزشی و هم داده های تست مبهم و غیر قابل طبقه بندی هستند.

  23. Preprocessing • سایز یک رقم متفاوت است اما تقریبا در حدود 40 ˟ 60 پیکسل است. از آنجاییکه ورودی شبکه BP سایز ثابتی دارد. باید سایز کارکترها نرمالسازی شود. این عمل با یک انتقال خطی صورت می گیرد تا کاراکترها در تصویر 16 ˟ 16پیکسل قرار گیرند. • بدلیل انتقال خطی تصویر خروجی باینری نیست و چندین سطوح خاکستری دارد. این سطوح خاکستری درجه بندی شده و یک دامنه تغییرات 1- تا 1+ منتقل می شوند.

  24. The Network • بنابراین ورودی تصویر نرمالایز شده 16 ˟ 16 پیکسل و خروجی از 10 واحد تشکیل شده است. • وقتی یک الگو متعلق به کلاس i قرار می گیرد. خروجی مطلوب برای واحد 1+ است و برای دیگر واحد ها 1- است.

  25. The Network • Input image(left), weight vector (center), and resulting feature map (right). The feature map is obtained by scanning the input image with a single neuron that has a local receptive field. White represent -1, black represents +1

  26. Preprocessing • سایز یک رقم متفاوت است اما تقریبا در حدود 40 ˟ 60 پیکسل است. از آنجاییکه ورودی شبکه BP سایز ثابتی دارد. باید سایز کارکترها نرمالسازی شود. این عمل با یک انتقال خطی صورت می گیرد تا کاراکترها در تصویر 16 ˟ 16پیکسل قرار گیرند. • بدلیل انتقال خطی تصویر خروجی باینری نیست و چندین سطوح خاکستری دارد. این سطوح خاکستری درجه بندی شده و یک دامنه تغییرات 1- تا 1+ منتقل می شوند.

  27. Preprocessing • Notice that most of the errors are cases that people find quite easy. The human error rate is probably 20 to 30 errors

  28. Learning Weights تصویر به شبکه ارائه شده و وزنهایپیکسلهای فعال بتدریج اضافه میشوند. وزن پیکسلهای غیر موثر نیز بتدریج کاهش میابد.

  29. Learning Weights (cont.)

  30. Learning Weights (cont.)

  31. Learning Weights (cont.)

  32. Learning Weights (cont.)

  33. Learning Weights (cont.)

  34. Learning Weights (cont.)

  35. Function Approximation

  36. Effect of Parameter Changes

  37. Effect of Parameter Changes…

  38. Effect of Parameter Changes…

  39. Function Approximation • Two-layer networks, with sigmoid transfer functions in the hidden layer and linear transfer functions in the output layer, can approximate virtually any functionof interest to any degree accuracy, provided sufficiently many hidden units are available.

  40. Ex: Function Approximation… t  p e + 1-2-1 Network

  41. Steepest Descent Algorithm  F - - - - - - - - - m  n 1  F - - - - - - - - -  F m m s  - - - - - - - - - - =  n m 2 n    F - - - - - - - - - - - m  n m S The steepest descent algorithm for the approximate mean square error: Matrix form:

  42. BP the Sensitivity • Backpropagation: a recurrence relationship in which the sensitivity at layer m is computed from the sensitivity at layer m+1. • Jacobian matrix:

  43. Matrix Repression The i,j element of Jacobian matrix

  44. Recurrence Relation The recurrence relation for the sensitivity The sensitivities are propagated backward through the network from the last layer to the first layer.

  45. Intrusion Detection System (IDS) • وظیفهشناسایی و تشخیص هر گونه استفاده غیرمجاز به سیستم، سوء استفاده و یا آسیب رسانی توسط هر دو دسته کاربران داخلی و خارجی را بر عهده دارند. تشخیص و جلوگیری از نفوذ امروزه به عنوان یکی از مکانیزم‌های اصلی در برآوردن امنیت شبکه‌ها و سیستم‌های رایانه‌ای مطرح است و عمومأ در کنار دیواره‌های آتش و به صورت مکمل امنیتی برای آن‌ها مورد استفاده قرار می‌گیرند.

  46. Intrusion Detection System (IDS)…. • سامانه‌های تشخیص نفوذ به صورت سامانه‌های نرم‌افزاری و سخت افزاری ایجاد شده و هر کدام مزایا و معایب خاص خود را دارند. سرعت و دقت از مزایای سیستم‌های سخت افزاری است و عدم شکست امنیتی آن‌ها توسط نفوذگران، قابلیت دیگر این گونه سیستم‌ها می‌باشد. اما استفادهآسان از نرم‌افزار، قابلیت سازگاری در شرایط نرم‌افزاری و تفاوت سیستم‌های عامل مختلف، عمومیت بیشتری را به سامانه‌های نرم‌افزاری می‌دهد و عمومأ این گونه سیستم‌ها انتخاب مناسب تری هستند.

  47. Intrusion Detection Methods • Misuse detection • matches the activities occurring on an information system to the signatures of known intrusions • Anomaly detection • compares activities on the information system to the norm behaviour

  48. Motivation for using AI for Intrusion Detection • معایب روش های سنتی: • هشدارهای غلط • به روز رسانی مداوم پایگاه داده براساس نشانه های جدید مزایای تکنیک های بر پایه ی AI : انعطاف پذیری سازگاری تشخیص الگو و توانایی تشخیص الگوهای جدید توانایی یادگیری

  49. AI techniques used for Intrusion Detection • Support Vector Machines (SVMs) • Artificial Neural Networks (ANNs) • Expert Systems • Multivariate Adaptive Regression Splines (MARS)

  50. Traditional Neural Network Based IDS • Typically consist of a single neural network based on either misuse detection or anomaly detection • Neural network with good pattern classification abilities typically used for misuse detetction, such as • Multilayer Perceptron • Radial Basis function networks, etc • Neural network with good classification abilities typically used for anomaly detetction, such as • Self organizing maps (SOM) • Competitive learning neural network, etc

More Related