paskalov / gender-recognition

This repository was created as part of my Bachelor Thesis
0 stars 0 forks source link

Question #1

Open stdex opened 9 years ago

stdex commented 9 years ago

How about percentage of good recognition? I'm try it and there are many wrong recognitions in it. For example: angelina-jolie facedetection mika-nakashima04 ekavaz 6 asamma 1

paskalov commented 9 years ago

Hello. How do you present these pictures to the neural network?

stdex commented 9 years ago

private static File file; ... Mat image = Imgcodecs.imread(file.getPath()); ... MatOfByte byteMat = new MatOfByte(); Imgcodecs.imencode(".jpg", image, byteMat); byte[] bytes = byteMat.toArray(); BufferedImage img = ImageIO.read(new ByteArrayInputStream(bytes)); ... GenderRecognition genderOutput = new GenderRecognition(); String gender = genderOutput.recognize(img);

paskalov commented 9 years ago

In order to present your image to the neural network, you must detect face on image, resize detected face to 125x127 pixels and then grayscale it. Valid sample image for the neural network attached below woman_32 P.S: reference for all the steps mentioned above you can find in source file VideoCam.java.

stdex commented 9 years ago

Oh, sorry. However, there were problems with recognition. image image image image image

I'm use swing wrapper, for load images, code and image datasets here: https://github.com/stdex/FaceRecognition

paskalov commented 9 years ago

Thank you for pointing this out. I had some similar outputs when I tested this neural network. Problem is in training set. I had only 294 faces of woman and man respectively to train the neural network, learning rate was 0.2 and momentum was 0.7; total neural network error is 0.01. What I've discovered, that output of this neural network depends mostly on picture's brightness, facial hair (not only beards and moustache, but bangs). If you want more precise output, you need to train a neural network with more diverse data set. P.S: It's a good thing using histogram equalization on image before training, but with mine data set it didn't work out very well.

stdex commented 9 years ago

In due time, I was looking for the face datasets, maybe it will help to improve the neural network.

  1. The Japanese Female Facial Expression (JAFFE) Database 213 images, 10 individuals, 256x256, grayscale http://www.kasrl.org/jaffe.html
  2. FEI Face Database 200 images, 100 individuals, 260x360, RGB 200 images, 100 individuals, 250x300, grayscale 200 images, 100 individuals, 162x193, grayscale http://fei.edu.br/~cet/facedatabase.html
  3. The Extended Yale Face Database B [now not avaliable] 16128 images, 28 individuals, 640x480, grayscale, different illumination 16128 images, 28 individuals, 168x192, grayscale, different illumination http://vision.ucsd.edu/~iskwak/ExtYaleDatabase/ExtYaleB.html
  4. The Sheffield (previously UMIST) Face Database 564 images, 20 individuals, 92x112, grayscale, sets at different rotations of the head https://www.sheffield.ac.uk/eee/research/iel/research/face
  5. Utdallas Face Database Many sets by ~150 images. http://agingmind.utdallas.edu/facedb
  6. The ORL Database of Faces 20 individuals, 92x112, grayscale, sets at different rotations of the head. http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html
  7. Labeled Faces in the Wild Home 13233 images, 5749 individuals http://vis-www.cs.umass.edu/lfw/
  8. The MUCT Face Database 3755 images http://www.milbo.org/muct/
  9. BioID Face Database 1521 images, 23 individuals, 384x286 https://www.bioid.com/About/BioID-Face-Database
  10. Faces in the Wild 30281 faces collected from News Photographs http://tamaraberg.com/faceDataset/index.html
  11. Adience collection of unfiltered faces for gender and age classification 26580 images, with gender labels http://www.cslab.openu.ac.il/download/ Login: adiencedb Password: adience
  12. Dr Libor Spacek Collection of Facial Images 7900 images, 395 individuals, 180x200, with gender labels http://cswww.essex.ac.uk/mv/allfaces/index.html
  13. Frontal face dataset. Collected by Markus Weber at California Institute of Technology. 450 images, 27 individuals, 896x592 http://www.vision.caltech.edu/html-files/archive.html
  14. Georgia Tech face database 19786 images, 50 individuals, 150x150 http://www.anefian.com/research/face_reco.htm
  15. YouTube Faces DB 3,425 videos of 1,595 different people ftp://agas.openu.ac.il/ Login: wolftau Password: wtal997
  16. FaceScrub dataset 107818 images, 530 individuals, with gender labels http://vintage.winklerbros.net/faceScrub.zip Password: ICIP'14
  17. PubFig: Public Figures Face Database 58,797 images of 200 people http://www.cs.columbia.edu/CAVE/databases/pubfig/
  18. The Labeled Wikipedia Faces 8.5k faces for about 1.5k identities http://www.info.polymtl.ca/~mdhas/LWF/
  19. Indian Movie Face database 34512 images of 100 Indian actors, with gender labels http://cvit.iiit.ac.in/projects/IMFDB/#
  20. 2D face sets Some small sets http://pics.psych.stir.ac.uk/2D_face_sets.htm
paskalov commented 9 years ago

Thank you a lot! I'll try to train new network and I'll commit it to this repository later.