---
title: "Emotion Detector CNN"
url: "https://ridwaanhall.com/projects/emotion-detector-cnn"
markdown: "https://ridwaanhall.com/projects/emotion-detector-cnn.md"
summary: "Emotion classification with CNNs and pretrained TIMM models."
---

# Emotion Detector CNN

> Emotion classification with CNNs and pretrained TIMM models.

- Category: Machine Learning
- Status: Completed
- Started: January 14, 2024
- Built with: CNN, Python, PyTorch, timm
- Source: https://github.com/ridwaanhall/Jaringan-Syaraf-Tiruan

## About

### The problem

Recognising emotions from facial images is hard to generalise: models overfit small datasets and perform poorly on faces they have not seen.

### The approach

I fine-tuned pretrained models from the TIMM library in PyTorch and used strong augmentation to improve generalisation.

- Pretrained TIMM backbones as a high-quality starting point.
- Augmentation with random resizing, flipping, colour jitter, CutMix and MixUp.
- Careful training and validation splits for honest evaluation.

### The result

The classifier generalises better than a model trained from scratch, and the pipeline is a reusable template for image classification with transfer learning.

## Features

- **Pretrained Models**: TIMM backbones for reliable emotion classification.
- **Strong Augmentation**: CutMix, MixUp and more to improve generalisation.
- **Careful Evaluation**: Training and validation splits chosen for honest results.

## Tags

CNN, PyTorch, RNN

## Elsewhere

- This page for people: https://ridwaanhall.com/projects/emotion-detector-cnn
- Index of every page as Markdown: [llms.txt](https://ridwaanhall.com/llms.txt)
