Skip to content

krzysiek581234/DetectioHumanusOptimus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convolutional Neural Networks in Classification of Faces

Table of Contents

  1. Overview
  2. Project Objectives
  3. Data
  4. Methodology
  5. Architecture
  6. Implementation
  7. Results
  8. Conclusion
  9. References

1. Overview

This project focuses on the development and evaluation of a convolutional neural network (CNN) for classifying human faces based on images. The main objective is to accurately identify human faces in various images using a CNN.

2. Project Objectives

  • Implement a convolutional neural network for face classification.
  • Evaluate the performance of the CNN against other neural network architectures and transfer learning solutions.
  • Analyze the effectiveness of different optimization algorithms.
  • Address the issue of an imbalanced dataset using weighted cross-entropy loss.

3. Data

The training dataset includes:

  • 64,770 facial images.
  • 26,950 non-representational images.
  • All images are 36x36 pixels in grayscale.

4. Methodology

  1. Supervised Learning: Using the XYZ training dataset.
  2. Optimizers: Comparison between Stochastic Gradient Descent (SGD) and Adam.
  3. Handling Imbalanced Dataset: Using weighted cross-entropy loss.
  4. Data Augmentation: Applying various transformations to increase data diversity.

5. Architecture

Default Network

  • Convolutional Layers:
    • First: 1 input, 6 outputs, 5x5 kernel.
    • Second: 6 inputs, 16 outputs, 5x5 kernel.
  • Pooling Layers: Max pooling with a 2x2 window.
  • Fully Connected Layers:
    • First: 16*6*6 inputs, 32 outputs.
    • Second: 32 inputs, 16 outputs.
    • Third: 16 inputs, 2 outputs.

Custom Network

  • Convolutional Layers:
    • First: 1 input, 8 outputs, 5x5 kernel.
    • Second: 8 inputs, 16 outputs, 3x3 kernel.
    • Third: 16 inputs, 32 outputs, 3x3 kernel.
    • Fourth: 32 inputs, 64 outputs, 3x3 kernel.
  • Batch Normalization: After each convolutional layer.
  • Activation Functions: ReLU and LeakyReLU.
  • Pooling Layers: Max pooling after the second, third, and fourth convolutional layers.
  • Fully Connected Layers:
    • First: 576 inputs, 256 outputs.
    • Second: 256 inputs, 128 outputs.
    • Third: 128 inputs, 2 outputs.

6. Implementation

  • Training and Validation: Early stopping and best model saving based on validation performance.
  • Data Augmentation: RandomPosterize, RandomHorizontalFlip, RandomVerticalFlip, RandomEqualize, RandomInvert, RandomAffine, GaussianBlur, ColorJitter.

7. Results

  • Optimizer Performance: Adam performed better for face image classification.
  • Imbalanced Dataset Handling: Weight scaling improved model performance by 2 percentage points.
  • Data Augmentation: Enhanced the diversity of training data and improved model performance.

8. Conclusion

The convolutional neural network developed for this project demonstrated effective face classification capabilities. Adam optimizer showed superior performance, and handling the imbalanced dataset through weighted cross-entropy significantly improved results. Data augmentation played a crucial role in enhancing model performance.

9. References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published