Give image of a person (frontal face), and this program will try to recognize male and female using Template Matching. Face detection part is accomplished using OpenCV.
How to Run?
- Import the project in IDE, & integrate OpenCV in the build path. Follow this link for installing OpenCV in Java project.
- For training the machine run Train.java.
- For testing run Predict.java (change file-paths in the main method according to need).
Visual of Learned Templates
![Male](https://cloud.githubusercontent.com/assets/5456665/13002798/83f965a0-d19b-11e5-867a-26abfc4f08d8.png)
![Male](https://cloud.githubusercontent.com/assets/5456665/13002976/e8dc9a04-d19c-11e5-979a-363db5f6b1a4.jpg)
![Female](https://cloud.githubusercontent.com/assets/5456665/13002797/83f8a84a-d19b-11e5-93e7-95fe759b5faa.png)
![Female](https://cloud.githubusercontent.com/assets/5456665/13002977/e8df20f8-d19c-11e5-81ac-ce5b1c96dcf8.jpg)
License
GenderRecognizer is licensed under MIT License.