Git Product home page Git Product logo

oreilly-pytorch-dl's Introduction

oreilly-logo

Introduction to Deep Learning with PyTorch

This repository contains code for the O'Reilly Live Online Training for Introduction to Deep Learning with PyTorch

This training provides the theory, practical concepts, and comprehensive introduction to machine learning and deep learning with PyTorch. By making your way through several real-world case studies including object recognition and text classification, this session is an excellent crash course in deep learning with PyTorch.

We will use tools including large pre-trained models and model training dashboards to set up reproducible deep learning experiments and build machine learning models optimized for performance. There will be several code examples throughout the training to help solidify the theoretical concepts that will be introduced.

Notebooks

First steps with Deep Learning with MNIST

All data can be downloaded here. Note it is about 6GB so it may take a bit.

RNNs and CNNs

Working with pre-trained models

Production Optimization

Flask App

app.py is a Flask app that uses a VGG16 model to classify the art style of an uploaded image. The app currently supports 10 different art styles:

  • Abstract Expressionism
  • Art Nouveau (Modern)
  • Baroque
  • Expressionism
  • Impressionism
  • Northern Renaissance
  • Post-Impressionism
  • Realism
  • Romanticism
  • Symbolism

Start the Flask app: python app.py

This should start the Flask app and make it available at http://localhost:5000.

How to Use the App

To classify an image, you can use a cURL request in the following format:

curl -X POST -F 'image=@/path/to/your/image.jpg' http://localhost:5000/predict

Replace /path/to/your/image.jpg with the path to your own image. The response will be in JSON format and will contain the predicted art style and associated confidence scores, as shown below:

e.g.
curl -X POST -F \
  'image=@images/Venus_and_Adonis_by_Peter_Paul_Rubens.jpg' \
  http://localhost:5000/predict

[
	["Northern_Renaissance",0.13392961025238037],
	["Realism",0.12794768810272217],
	["Romanticism",0.12592236697673798],
	["Post_Impressionism",0.11863630264997482],
	["Baroque",0.11325731128454208],
	["Symbolism",0.1120268702507019],
	["Expressionism",0.08971412479877472],
	["Impressionism",0.086906298995018],
	["Art_Nouveau_Modern",0.05910796299576759],
	["Abstract_Expressionism",0.03255145251750946]]

If there is an error with the request, such as no image being provided, the response will contain an error message instead:

{
	"error": "No image provided"
}

Instructor

Sinan Ozdemir is the Founder and CTO of LoopGenius where he uses State of the art AI to help people create and run their businesses. Sinan is a former lecturer of Data Science at Johns Hopkins University and the author of multiple textbooks on data science and machine learning. Additionally, he is the founder of the recently acquired Kylie.ai, an enterprise-grade conversational AI platform with RPA capabilities. He holds a master’s degree in Pure Mathematics from Johns Hopkins University and is based in San Francisco, CA.

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.