Smart Computer Vision Application with various functionalities. I have tried to put as many Machine Learning tools as possible into one single Application for greater productivity.
- Auto Attendance system Using Real Time Face Recognition
- Face Trainer
- Motion Detection
- OCR (Optical Character Reader)
- Gesture Control(Controlling Mouse Pointer Using Finger or Red Colored Object)
- Rectangle Shape Detection
- Trained Faces Image Gallery View
- Eye Detection
- Persistent Storage for Trained Faces Image Using Database
- Core Java
- JavaCV (wrapper of Opencv )
- JavaFX
- MySQL
- Maven
- Tesseract OCR Framework
I have developed this project using Eclipse Neon. So I highly recommend you to use this particular IDE.
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv-platform</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.14</version>
</dependency>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>tesseract-platform</artifactId>
<version>3.04.01-1.3</version>
</dependency>
To properly run this Application on your System, At first you need to download and install the following software:
-
An implementation of Java SE 7 or newer:
-
An implementation of JavaFX: (Follow The Installation Instruction)
-
An implementation of JavaCV: (Follow The Installation Instruction)
-
An implementation of MySQL Database:
-
To Connect MySQL with Java, You will need a connector: (Follow the installation instruction)
- MySQL Connector Java https://dev.mysql.com/downloads/connector/j/5.1.html
-
An implementation of JavaFX Scene Builder: (Follow The Installation Instruction)
Finally, please make sure everything has the same bitness: 32-bit and 64-bit modules do not mix under any circumstances.
- Open MySQL on XAMPP then Create a New Database & name it ghostEye
- Now import attached face_bio.sql to the ghostEye Database
- Or Create a New Schema(Table)
CREATE TABLE IF NOT EXISTS `face_bio` (
`id` int(11) NOT NULL,
`code` int(10) NOT NULL,
`first_name` varchar(30) NOT NULL,
`last_name` varchar(20) NOT NULL,
`reg` int(10) NOT NULL,
`age` int(10) NOT NULL,
`section` varchar(20) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
ALTER TABLE `face_bio`
ADD PRIMARY KEY (`id`);
ALTER TABLE `face_bio`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
- Now Open src/application/Database.java and provide your MySQL DB credintials
package application;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
class Database {
public int code;
public String fname;
public String Lname;
public int reg;
public int age;
public String sec;
public final String Database_name = "Your Database";
public final String Database_user = "Your Database user Name";
public final String Database_pass = "Your Database Password";
.
.
.
- To use tesseract api,at first you have to install tesseract with desired language training data on your system.After That you have to mention the installation folder.
Now goto src/application/OCR.java ,in line 36 provide your tesseract installation directory name.
- When you going to train a new face try to capture at least 10 pictures of a single person in different angle.keep it in mind that the more number of training image in different angle and posture, the more accurate will be face recognition.
- After everything done ,kindly empty the faces folder.There is a test_face image.You have to delete it.
Please Keep it in mind ,sometimes the face recognition algorithm provides wrong output if a person is not trained or unknown to the system.The reason behind this is that the face recognition algorithm guess the face with the nearest match.when it does not find any match ,the system pick any face with a nearest match.this is why it sometimes provides wrong output.