This repository contains the project work for the module Machine Learning for Physicists 2024. The project focuses on implementing a DenseNet architecture for facial emotion detection and comparing its performance with a traditional Convolutional Neural Network (CNN) approach.
To set up the environment and run the project, follow these steps:
-
Clone the repository:
git clone https://github.com/RnLe/MachineLearning.git cd MachineLearning
-
Create and activate the conda environment:
conda env create -f environment.yml conda activate tf_gpu2
-
Download the dataset from Google Drive and extract the
.zip
in the folderemotions_facial
.
To execute the code, you can simply run the main.ipynb
notebook. This notebook uses the optimal hyperparameters from the optuna.db
file.
main.ipynb
: Main notebook, using optimal hyperparameters fromoptuna.db
.densenet.py
: Implementation of the DenseNet class.alternativeMethod_CNN.ipynb
: Notebook for the alternative method.hyperparam_optimization.py
: Hyperparameter optimization using Optuna.
Note: The optimal hyperparameters are already provided in the project files.
This project was completed as part of the Machine Learning for Physicists 2024 module at TU Dortmund.
For any questions or issues, please feel free to contact the authors.
Enjoy exploring the project and feel free to contribute or provide feedback!