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
BPNN-Face-Recognition-For-Qt / releases
-
git clone https://github.com/PAC-P2P/BPNN-Face-Recognition-For-Qt.git
-
Use Qt to open
BPNN-Face-Recognition-For-Qt.pro
-
Generate / Run
-
Menu Bar - Net - Training
-
Enter Training times (Default 100 times)
-
OK (Start training)
-
Qt console prints training information, evaluation results, such as:
Iteration number: 100 Accuracy rate of: 74.359% Average error: 0.125675
-
Save to data/facenet.net
-
Successful train
- Input
- Enter User ID (Unique)
- Enter Train times (Default 100 times)
- Take photo 20 times (Save to data/images/imagesTrain)
- Train
- Successful input
- Enter name (Optional)
- Take Photo (Save to data/images/imagesRec/rec_01.pgm)
- Train (if no facenet.net)
- Recognition
- Recognition result
-
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
-
Neural network structure file:
data/facenet.net
. It is a15360 * 6 * 6
neural network
-
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.
-
User ID
User ID
must be Unique, otherwise it will overwrite user data. -
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
SEED
: Seed of a random generator (Default102194
)SAVEDELTA
: Save the network every SAVEDELTA times (Default100
)LEARNRATE
: Learning rate (Default0.3
)IMPULSE
: Impulse (Default0.3
)INPUTTIMES
: Maximum number of photos inputed (Default20
)MAXTRAINTIMES
: Maximum training times (Default100000
)
Modify these in facetrain.cpp
or camera.cpp