GithubHelp home page GithubHelp logo

jottenlips / guitar-classifier Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 1.0 6.67 MB

🎸 Machine Learning for Guitars: Retraining InceptionV3 to classify guitars and Converting Tensorflow to CoreML for iOS (presentation code)

License: Other

Python 100.00%
machine-learning coreml tensorflow guitars fender mustang tfcoreml pillow tensorflow-for-poets ios

guitar-classifier's Introduction

Guitar-Classifier

Machine Learning for Guitars - this is an elaboration on tensorflow for poets

Tensorflow

pip install virtualenv

virtualenv env

source env/bin/activate
pip install -tensorflow
pip install -pillow
pip install -tfcoreml

IMAGE_SIZE=224 ARCHITECTURE="mobilenet_0.50_${IMAGE_SIZE}"

Download images

I used https://github.com/hardikvasa/google-images-download CLI

Resize Images

change the paths in resize.py

cd scripts python resize.py

Retrain Model on your images

python -m scripts.retrain \
  --bottleneck_dir=tf_files/bottlenecks \
  --how_many_training_steps=500 \
  --model_dir=tf_files/models/ \
  --summaries_dir=tf_files/training_summaries/"${ARCHITECTURE}" \
  --output_graph=tf_files/retrained_graph.pb \
  --output_labels=tf_files/retrained_labels.txt \
  --architecture="${ARCHITECTURE}" \
  --image_dir=tf_files/Guitars

Test tensorflow model

python -m scripts.label_image \
    --graph=tf_files/retrained_graph.pb  \
    --image=../Desktop/sg.jpg

tensorboard --logdir tf_files/training_summaries &

Conversion to CoreML

cd scripts

Change all paths to where you want to read/write your model and test your images.

Test conversion

python labelcoreml.py

Convert model

python converter.py

From Core ML in ArKit, my fork from the presentation will be up soon. https://github.com/hanleyweng/CoreML-in-ARKit

https://github.com/jottenlips/GuitarClassifier-iOS My fork of that repo.

guitar-classifier's People

Contributors

jottenlips avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

chris666-sys

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.