Skip to content

πŸ‘¦ A Face Recognition System Based on BPNN(Back Propagation Neural Network) Developed by Qt.

License

Notifications You must be signed in to change notification settings

PAC-P2P/BPNN-Face-Recognition-For-Qt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BPNN-Face-Recognition-For-Qt

A Face Recognition System Based on BPNN(Back Propagation Neural Network) Developed by Qt.

Parallel Version:Github . PAC-P2P/BPNN-Face-Recognition-For-Parallel

Serial Version:Github . PAC-P2P/BPNN-Face-Recognition

Qt Version:Github . PAC-P2P/BPNN-Face-Recognition-For-Qt

Download

BPNN-Face-Recognition-For-Qt / releases

Usage

Run

  1. git clone https://github.com/PAC-P2P/BPNN-Face-Recognition-For-Qt.git

  2. Use Qt to open BPNN-Face-Recognition-For-Qt.pro

  3. Generate / Run

Use

Train

  1. Menu Bar - Net - Training

  2. Enter Training times (Default 100 times)

  3. OK (Start training)

  4. Qt console prints training information, evaluation results, such as:

     Iteration number: 100
     Accuracy rate of: 74.359%
     Average error: 0.125675
    
  5. Save to data/facenet.net

  6. Successful train

Input Images

  1. Input
  2. Enter User ID (Unique)
  3. Enter Train times (Default 100 times)
  4. Take photo 20 times (Save to data/images/imagesTrain)
  5. Train
  6. Successful input

Recognition

  1. Enter name (Optional)
  2. Take Photo (Save to data/images/imagesRec/rec_01.pgm)
  3. Train (if no facenet.net)
  4. Recognition
  5. Recognition result

Neural network structure

  1. facenet.net is a three-layer neural network with only one hidden layer

    • Input Layer : The size of the images
    • Hidden Layer : Number of training sets
    • Output Layer : Number of training sets
  2. Neural network structure file: data/facenet.net. It is a 15360 * 6 * 6 neural network

Warning

  1. Images Size

    Make sure that the training set image has the same image size as the test set (including recognition).

    There are three sizes of images in data/images.

    • UserID_*_1.pgm : 128 * 120
    • UserID_*_2.pgm : 64 * 60
    • UserID_*_3.pgm : 32 * 30

    If your camera is not of these sizes please delete it(Including modifying data/*.list) and enter your own photo.

  2. User ID

    User ID must be Unique, otherwise it will overwrite user data.

  3. Directory tree

    Please keep the following directory structure so that the program can run normally.

     .
     β”œβ”€β”€ BPNN-Face-Recognition.pro
     β”œβ”€β”€ Release
     β”‚Β Β  └── BPNN-Face-Recognition.exe
     β”œβ”€β”€ data
     β”‚Β Β  β”œβ”€β”€ facenet.net
     β”‚Β Β  β”œβ”€β”€ images
     β”‚Β Β  β”‚Β Β  β”œβ”€β”€ imagesRec
     β”‚Β Β  β”‚Β Β  β”‚   └── rec_01.pgm
     β”‚Β Β  β”‚Β Β  └── imagesTrain
     β”‚Β Β  β”‚Β Β      β”œβ”€β”€ an2i_1_1.pgm
     β”‚Β Β  β”‚Β Β      β”œβ”€β”€ ...(images)
     β”‚Β Β  β”‚Β Β      └── cheyer_8_3.pgm
     β”‚Β Β  β”œβ”€β”€ imagesSet_rec.list
     β”‚Β Β  β”œβ”€β”€ imagesSet_testAll.list
     β”‚Β Β  └── straightrnd_train.list
     └── src
     	β”œβ”€β”€ backprop.cpp
     	β”œβ”€β”€ backprop.h
     	β”œβ”€β”€ camera.cpp
     	β”œβ”€β”€ camera.h
     	β”œβ”€β”€ camera.ui
     	β”œβ”€β”€ dir.cpp
     	β”œβ”€β”€ dir.h
     	β”œβ”€β”€ facetrain.cpp
     	β”œβ”€β”€ facetrain.h
     	β”œβ”€β”€ imagenet.cpp
     	β”œβ”€β”€ imagenet.h
     	β”œβ”€β”€ imagesettings.cpp
     	β”œβ”€β”€ imagesettings.h
     	β”œβ”€β”€ imagesettings.ui
     	β”œβ”€β”€ main.cpp
     	β”œβ”€β”€ mainwindow.cpp
     	β”œβ”€β”€ mainwindow.h
     	β”œβ”€β”€ mainwindow.ui
     	β”œβ”€β”€ pgmimage.cpp
     	β”œβ”€β”€ pgmimage.h
     	β”œβ”€β”€ src.pro
     	β”œβ”€β”€ trainingsetting.cpp
     	β”œβ”€β”€ trainingsetting.h
     	└── trainingsetting.ui
    

Options

  • SEED : Seed of a random generator (Default 102194)
  • SAVEDELTA : Save the network every SAVEDELTA times (Default 100)
  • LEARNRATE : Learning rate (Default 0.3)
  • IMPULSE : Impulse (Default 0.3)
  • INPUTTIMES : Maximum number of photos inputed (Default 20)
  • MAXTRAINTIMES : Maximum training times (Default 100000)

Modify these in facetrain.cpp or camera.cpp

Screenshots

CaptureInput

Data Set

Neural Networks for Face Recognition

License

MIT