Skip to content

Repository files navigation

ResNet model for image classification

Description of the model

This repository contains the implementation of the ResNet model (460,842 parameters) for image classification (mnist dataset). The model is implemented using the Keras library.

Residual Neural Network (also known as Residual Network, ResNet ) is a deep learning model in which weight layers learn residual functions with reference to layer inputs. The architecture of such networks avoids the fading/exploding gradient, improves BackProp patency for large/huge convolutional models.

ResBlock

ResNet building block architecture

Repository structure

  • Layers.py - A file that defines the ResidualConvBlock and ResidualIdentitiBlock classes that are used in the ResNet model.
  • ResNet.py - ResNet class definition file, which is a ResNet model for image classification.
  • DataPreparation.py - A file with data preprocessing and preparation of datasets for training and testing the model.
  • Learing.py - A file with training a ResNet model on pre-trained data and visualization of training results.
  • ResNet_Weights.h5 - The file where the trained weights of the model are saved.
  • configs.ini - File containing model settings

Usage

Install the required dependencies listed in requirements.txt

Run Learning.py to train the model on the pretrained data and save the trained weights to the ResNet_Weights.h5 file. The model can be used to classify images by loading weights from ResNet_Weights.h5 and applying them to new data.

Result of data preparation/training

mnist

Sample images of numbers

AccuracyGraph

Model training outcome (21st in the world according to paperswithcode)

Dependencies

  • Tensorflow 2.x
  • NumPy
  • matplotlib

Author

UltraGeoPro

License

The ResNet model and code in this repository are available under the MIT license. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages