Building a Convolutional Neural Network for Hair Type Classification: A Hands-On Approach
In the Machine Learning Zoomcamp 2024 , led by Alexey Grigorev at DataTalksClub, we participants are tasked with building a convolutional neural network (CNN) for classifying hair types. Unlike using pre-trained models, the goal here is to design a model from scratch to handle a dataset of hair images, which will be split into training and test sets. This exercise provides a deep dive into the essential principles of CNNs, including data preparation, model construction, and evaluation. Dataset and Model Architecture The dataset for this homework consists of approximately 1,000 images of hair, divided into training and test sets. Each image is of size 200x200x3 (200 pixels by 200 pixels with 3 color channels—RGB). The objective is to design a CNN that will learn from this dataset and predict the hair type. The model construction follows a typical CNN pipeline, beginning with input processing and progressing through various layers. Key Layers in the Model Input Layer: The model begins by...