Git Product home page Git Product logo

face-mask-classification-pytorch's Introduction

Transfer Learning for Face-mask Classification using PyTorch

This repository includes codes for training and evaluating the Mask Classifier model, which is mostly implemented in Python 3 and PyTorch framework.

This code is tested on PyTorch=0.4.1

๐Ÿ‘ Download Data

You can download Mask Classifier dataset from here and then save it into a folder name data/

Sample images

๐Ÿ‘ What is Treansfer Learning ?

In reality, very few people train the entire Convolutional Network from scratch (with random initialization) because it is fairly difficult to have a data set of adequate scale. Alternatively, it is popular to pre-train ConvNet on a very large dataset (e.g. ImageNet, which includes 1.2 million images with 1000 categories) and then use ConvNet either as an initialization or as a fixed feature extractor for the task of interest.

Two major transfer learning scenarios appear as follows:

๐Ÿ‘ Finetuning the convnet

Instead of random initialization, we initialise the network with a pre-trained network, like the one trained on the imageet 1000 dataset. The remainder of the preparation is as normal.

๐Ÿ‘ ConvNet as a fixed feature extractor

We freeze the weights for the entire network except for the final fully connected layer. This last fully connected layer is replaced by a new one with random weights and only this layer is trained.

๐Ÿ‘ Results by Finetuning the convnet

Classwise accuracy

๐Ÿ‘ Results by ConvNet as a fixed feature extractor

Classwise accuracy

๐Ÿ‘ Visualizing the model predictions

Thanks! โค๏ธ โค๏ธ โค๏ธ

face-mask-classification-pytorch's People

Contributors

mahfujur1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.