Giter Club home page Giter Club logo

teaching-02-transfer's Introduction

Practicing transfer learning

Introduction

This file is a step by step tutorial to practice basics of transfer learning on an industrial dataset composed of pictures, for a use case of quality control. You will also find the dataset and Jupyter notebooks with code that can help you address the questions.

Cast defect dataset

  • available in casting_512x512.zip or on Kaggle: https://www.kaggle.com/datasets/ravirajsinh45/real-life-industrial-dataset-of-casting-product
  • This dataset provides image data of impellers for submersible pumps.
  • There are many types of defect in casting like blow holes, pinholes, burr, shrinkage defects, mould material defects, pouring metal defects, metallurgical defects, etc.
  • Raw dataset = 519 ok + 781 defect
  • (Kaggle also has an already augmented dataset = 7348 pictures)

Carry out transfer learning with a pretrained DL image classification model

  • Use this Keras tutorial:
  • Take a pretrained DL image classification model
  • Freeze weights
  • Remove last layer
  • Replace it by what makes sense to your question
  • Train only the part you added
  • See 01_defects_transfer.ipynb for example code

What tweaks to try

  • With different kinds of image classification models
  • With different layers on top of the pre-trained model
  • With or without data augmentation
  • With a different number of input pictures

Possible output:

Scenario Type of model Data augmentation Number of training images Number of test images Training accuracy Testing accuracy Training duration
1..n Xception, MobileNet, ResNet, ... y/n 5% 10% 50% 80% of total

Ideas to go further

  • You can look into explainability for computer vision algorithms

Classic CV approach (optional)

  • SIFT (or AKAZE)
  • Bag of words
  • Classification with SVM
  • See 02_defects_AKAZE_SVM.ipynb

Notes

Used in 2022 and 2023 with AI engineering students in Bordeaux.

teaching-02-transfer's People

Contributors

jbudynek 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.