--- license: mit language: - en tags: - materials_engineering - materials - steel --- # UHCS Microstructure CNN Classifier A CNN model for classifying ultra-high carbon steel (UHCS) microstructures from microscopy images. ## Model Description Trained on the UHCS Microstructure dataset (Kaggle). Classifies grayscale microscopy images into 4 classes: - spheroidite - network - pearlite - martensite ## Architecture - 3 convolutional blocks (16/32/64 filters) - MaxPooling after each block - Fully connected layers (16384 -> 256 -> 4) - Dropout (p=0.5) - Input size: 128x128 grayscale ## Performance | Model | Test Accuracy | |---|---| | Logistic Regression (baseline) | 51.3% | | **CNN** | **84.7%** | ## Usage Model was trained with PyTorch. To load: ```python import torch model = MicrostructureCNN() model.load_state_dict(torch.load("best_model.pth")) model.eval() ``` ## Dataset [UHCS Microstructure dataset on Kaggle](https://www.kaggle.com/datasets/sagarupsc/uhcs-microstructure-01) ## Full Project Full code and notebook available on [GitHub](https://github.com/xJadzix/microstructure-classification). --- license: mit language: - en ---