Code covered by the BSD License  

Highlights from
Morphological Shared-Weight Neural Network for Face Recognition


4.6 | 22 ratings Rate this file 78 Downloads (last 30 days) File Size: 14.7 MB File ID: #6659
image thumbnail

Morphological Shared-Weight Neural Network for Face Recognition



31 Dec 2004 (Updated )

MSNN has the ability to learn feature extraction and perform classification at the same time.

| Watch this File

File Information

We introduce an algorithm based on the morphological shared-weight neural network. Being nonlinear and translation-invariant, the MSNN can be used to create better generalization during face recognition. Feature extraction is performed on grayscale images using hit-miss transforms that are independent of gray-level shifts. The output is then learned by interacting with the classification process. The feature extraction and classification networks are trained together, allowing the MSNN to simultaneously learn feature extraction and classification for a face. For evaluation, we test for robustness under variations in gray levels and noise while varying the network configuration to optimize recognition efficiency and processing time. Results show that the MSNN performs better for grayscale image pattern classification than ordinary neural networks.

One of the current approaches to vision processing, the morphological shared-weight neural network developed by Y. Won [1], is investigated here. Our model consists of two network stages: the first stage extracts features using morphological operations; the second stage performs classification of outputs from the last feature extraction layer.

[1] Y. Won et. al., Morphological Shared-Weight Networks with Applications to Automatic Target Recognition, Electronics and Telecommunications Research Institute, Daejon, South Korea, 1995.

My dissertation is also available in paperback.

Now available at Amazon:

Also available at NUS and NTU libraries in Singapore.

Required Products Data Acquisition Toolbox
Image Acquisition Toolbox
Image Processing Toolbox
Neural Network Toolbox
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (33)
18 Mar 2012 vaibhav

sir..I found your material very interesting..I just want to ask ..Can it work for eye tracking with some modification..???

thank you

13 Sep 2011 Mr Smart  
25 Apr 2010 kholadi majid

The work is excellent, but I have 2 problems 1 with the detection
I have this error
??? Error using ==> imshow>preParseInputs at 341
IMSHOW expected at least 1 input argument
but was called instead with 0 input arguments.

Error in ==> imshow at 195
varargin_translated = preParseInputs(varargin{:});

Error in ==> detect at 341
and 2 with load eyelevel HH
I have this error
??? Error using ==> load
Unable to read file HH: No such file or directory.

Error in ==> convolutionnex at 80
load HH eyelevel;

Error in ==> eyesearch_amend at 5
[eyeleft,ltxl,ltyl,rbxl,rbyl] = convolutionnex(dataleft,probelefteye);

Error in ==> main at 135
[Ileft,Iright,merge] = eyesearch_amend(pk1{flagx},pk2{flagx},lefte,righte);
Please help me

01 Feb 2010 Tow Bas

I have downloaded all the images used in this research from this ( link, but all are in .pgm format. How i will convert them into .gif or .tif or .jpg for Windows operating system? Or how I will download them in gif/tif or jpg format?

10 Oct 2009 Raymond Cheng

Thanks for sharing.

26 Dec 2008 Christian Sanchez

The work is excellent, but I have problems with the extraction of HH.mat file because the file appears damaged. You may send it to me via e-mail to,, Thanks you.

09 Nov 2008 Utkarsh Rathore  
10 Jan 2008 udhaya kumar

there is not validation.m file,when I select 9

08 Jan 2008 nguyen vinh

very good

06 Jan 2008 Minh Hoang  
02 Nov 2007 Chuleeporn Kanthong

Thanks you .

16 Apr 2007 Johnson Elangbam  
20 Sep 2006 cathlin w


24 Jul 2006 James Blake

I see some of the reviews are from engineers. Unfortunately some of the questions are ridiculous and I can't beleive you are blatantly copying the code. You cannot call yourself engineers but instead reverse-engineers. Try to learn from and not copy.

23 Jul 2006 Rohmad Basuki

Dear Mr. Ethan png,
(sorry my English not so good)
I'd tried your MSNN project out.
But, there were several things i want to ask:
1). Why the 'test image' placed at one folder with 'train image'?
2). I'd try to replace the \F10\8.tif with \F6\8.tif,\F1\8.tif,\F2\8.tif etc, but the result program is '100% ACCURACY'.
They were different identity of image, your MSNN could not detect it.
Why it could be happened?
3). Regarding to my 2nd question and after i tried your MSNN many times, i concluse that the MENU 1, MENU 2, MENU 3 and MENU 4 for whole image is not an Artifical Neural network system, but just showing the image.

4). I'd try to adjust the TIFF image at your face database to very extreme condition (Unrecognized condition by human eyes and brain), but your system still recognize it 100 %. Please give us your explanation, when your MSNN could get the wrong result?

sorry if i got wrong with my questions.
thank you.

17 Apr 2006 Gaurav Gupta

The work is excellent...but i have a small problem running the code (option 9) there is not validation.m file , when I select 9 ...hoping for an early response... thanking you..Gaurav

17 Apr 2006 vinayak rao

Please help me in validating the results. The "validation.m" does not exist . It would be kind of you if u can mail me at the earliest.

22 Jan 2006 Ethan Png

Sorry guys, there are no servers at this moment for you to access the photos. If you need to download all the photos, you may access Cambridge's or MIT's website. If you encounter problems such as ltx or lty, it could be size problems or detection problems. Just resize those images/component images in any photoeditor. In fact I could fine-tune that method of eye detection (convo), but had really no time to improve it. (It can be done if you go back to image processing maths. Heheh.) As I said, the main idea of this thesis is the core program msnn.m. I am sure you intelligent guys can find better ways to compare the trained network with the test image. : )

I have recently updated this site (the link below). Phew! After so many months, I finally have the time to administer this site! You can download the PDF version from today!

I will try to answer your questions one by one. Cheers.

18 Jan 2006 Surekha Paneerselvam

I would like to know how to validate the results. The "validation.m" does not exist at all. I will be grate ful if u Can mail me at the earliest.

04 Jan 2006 Surekha Paneerselvam

The work is excellent. But when i run the code I fine there is no proper database. Where can i get the database. Please help me

09 Oct 2005 Vergisri Selvamaney

an excellent work!!! it's simply superb programming

14 Jun 2005 galal galal  
19 Feb 2005 dari mohamed

utilser pour un projet de fin d'etude

10 Feb 2005 Ethan Png

Dear Sneha,

You need to refer thoroughly to the "files" folder in:

The core program is only the MSNN training loop. How you compare the trained output values is completely up to your fancy.

Ethan Png

06 Feb 2005 sneha mehta

dear sir
i received your mail regarding MSNN.Thank you so much for responding.
sir, i was having some trouble regarding linking of the different programs.
It would be of such great help to me sir if you could let me know the detailed procedure of executing it.
sir, i know it would be a trouble for you but sir please if you could do me this favor.
thanking you
hoping for an early response.

02 Feb 2005 sneha mehta

dear sir
i found your material really intersting . i am a student of engineering. sir, i would be highly obliged if you would send me more material on MSNN .
hoping for an early response.
thanking you.
sneha mehta

31 Jan 2005 Stanislav Dimov

Dear Mr. Png,

I find Your work on the MSNN network for face recognition as exellent and very interesting.I'm Professor at the Technical University in Sofia, Bulgarien , Department of Computer science. I would ask for:
1/ Send me more materials about MSNN especially for pattern recognition, gray scale image processing.I need these materials for my students.
2/ I'm ready to collaborate with You on the field of application of MSNN for pattern recognition and image processing, especially on the adaptive and/or probabalistic neural networks /PNN/. If You are interested for collaboration , please send per e-mail Yours oppinion !

With best regards

Dr. S. Dimov

07 Jan 2005 li xiaomao

Thank you very much! For my english is bad,I can not how to expresss my acknowledgement.
I became a member of your group in yahoo,but my reserch is not on this.I find you method of MSNN maybe have usefulness for my research.

07 Jan 2005 Ethan Png

Dear Mr Li, Mr McLaxlan, and all researchers,

Thanks for all your comments and questions.
I posted this in a hurry. Sorry for the inconvenience caused.

I am delighted to inform you that there is no "validation.m" at all. The 9th button on the menu uses "detecteyes.m".

Mr Li, all the complete photo folders can be found at the link below:

07 Jan 2005 li xiaomao

tank you ! David ,I know ,but it costs me a lot of time to found different pictures of the same peole.

07 Jan 2005 li xiaomao

there is not validation.m file,when I select 9

06 Jan 2005 David McLaxlan

Copy any photo (I believe there are many in the other folders) that belongs to the same person, as long as they are not the same. You are supposed to learn from this guy, and not copy the whole thing. Try to be a wee bit flexible, okay?

06 Jan 2005 li xiaomao

when I run the main.m ,then click Recognition by Whole Image button,there are errros as "C:\images\f10\1.tif" does not exist.So I find there are not f10 f9 and so on floders in the images folder

09 Jun 2011

Replaced corrupted file.

20 Jun 2011

Correction to instructions in 'read_me_first.txt'.

24 Jun 2013

Included URL link: my dissertation is also available in hardcopy.

28 Jun 2013

Added URL link.

20 Sep 2013

Update book status.

Contact us