Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yonatankinfe/mathlabfacedetector

Welcome to the Custom Face Detector project! This repository offers code and resources for creating a custom face detection system using MATLAB. Utilizing Convolutional Neural Networks (CNNs), the project aims to accurately detect and classify faces in images. Whether you're a beginner or an advanced user, this project provides a practical example
https://github.com/yonatankinfe/mathlabfacedetector

Last synced: about 2 months ago
JSON representation

Welcome to the Custom Face Detector project! This repository offers code and resources for creating a custom face detection system using MATLAB. Utilizing Convolutional Neural Networks (CNNs), the project aims to accurately detect and classify faces in images. Whether you're a beginner or an advanced user, this project provides a practical example

Awesome Lists containing this project

README

        

# Custom Face Detector Using AI in MATLAB ๐Ÿค–๐Ÿ“ท

# Introduction

Welcome to the Custom Face Detector project! ๐ŸŽ‰ This repository contains code and resources for building a custom face detection system using MATLAB. ๐Ÿง ๐Ÿ’ป By leveraging Convolutional Neural Networks (CNNs), this project aims to accurately detect and classify faces from a set of images. ๐Ÿ‘ฅ๐Ÿ“ธ Whether you are a beginner or an advanced user, this project provides a practical example of how to implement machine learning for image processing tasks. ๐Ÿ“Š๐Ÿ”

# Project Overview

This project demonstrates how to create a custom face detector using a Convolutional Neural Network (CNN) in MATLAB. ๐Ÿš€ The steps include preparing the dataset, training the model, detecting faces in new images, and evaluating the model's performance. ๐Ÿ’ก๐Ÿ”ฌ Hereโ€™s a brief overview of what the code does: ๐Ÿ“

# Data Preparation ๐Ÿ—‚๏ธ

+ Load images of two individuals (Yonatan and another person) from specified folders. ๐Ÿง‘๐Ÿ“

+ Combine the images into a single datastore. ๐Ÿ–ผ๏ธโžก๏ธ๐Ÿ“š

+ Split the data into training and validation sets. ๐Ÿ‹๏ธโ€โ™‚๏ธ๐Ÿ“

# Data Augmentation ๐Ÿ”„๐Ÿ“ˆ

+ Resize the images to match the input size expected by the CNN. ๐Ÿ“๐Ÿ–ผ๏ธ

+ Convert grayscale images to RGB format. ๐ŸŒ‘โžก๏ธ๐ŸŒˆ

# CNN Architecture ๐Ÿง ๐Ÿ—๏ธ

Define a simple CNN with several convolutional, batch normalization, ReLU, and max-pooling layers. ๐ŸŒ€๐Ÿ“Š

Add fully connected, softmax, and classification layers for the final output. ๐Ÿ”—๐Ÿงฎโœ…

# Training ๐ŸŽฏ

+ Set training options such as the optimizer, learning rate, and number of epochs. โš™๏ธโณ

+ Train the CNN using the augmented training data. ๐Ÿ‹๏ธโ€โ™€๏ธ๐Ÿ–ผ๏ธ

+ Save the trained model. ๐Ÿ’พ๐Ÿ“Š

# Face Detection ๐Ÿ‘ฅ๐Ÿ”

+ Use a pre-trained model to detect faces in new images. ๐Ÿค–๐Ÿ“ท

+ Crop and resize the detected faces. โœ‚๏ธ๐Ÿ“

+ Classify the faces using the trained CNN. ๐Ÿง ๐Ÿ‘ฅ

# Evaluation ๐Ÿงช๐Ÿ“Š

+ Load test data and make predictions using the trained model. ๐Ÿ“‚๐Ÿ”ฎ

+ Display a confusion matrix to visualize the performance. ๐Ÿ”„๐Ÿ“Š

+ Calculate and display the accuracy of the model. ๐Ÿ“ˆ๐ŸŽฏ

This project provides a comprehensive example of using MATLAB for image classification and face detection tasks, leveraging the power of convolutional neural networks and data augmentation techniques. ๐Ÿš€๐Ÿ“ธ

# Here are some images ๐Ÿ“ท๐Ÿ–ผ๏ธ

![image](https://github.com/Yonatankinfe/MathlabFaceDetector/assets/158090444/c1556bf5-4ec4-4e1c-8254-e8cb237d7c3e)
![image](https://github.com/Yonatankinfe/MathlabFaceDetector/assets/158090444/2a9d2588-8ea4-40a5-8809-5c91ef31bc0a)
![image](https://github.com/Yonatankinfe/MathlabFaceDetector/assets/158090444/27e94976-3a80-42f2-bc00-0e3f5bea75d4)
![image](https://github.com/Yonatankinfe/MathlabFaceDetector/assets/158090444/929f5377-1bbe-4a6a-a10a-263a35875f8f)
![image](https://github.com/Yonatankinfe/MathlabFaceDetector/assets/158090444/f11a6d74-7759-4697-83ec-3e9cdb1d32e5)
![image](https://github.com/Yonatankinfe/MathlabFaceDetector/assets/158090444/e1dab04b-bef5-4849-98c0-d3a3ed8b0541)
![image](https://github.com/Yonatankinfe/MathlabFaceDetector/assets/158090444/a2ad74a9-3d8f-4e9d-b443-970c051559ad)