GithubHelp home page GithubHelp logo

julioacarrettoni / vggnet-metal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hollance/vggnet-metal

0.0 1.0 0.0 797 KB

iPhone version of the VGGNet convolutional neural network for image recognition

Swift 85.68% Metal 3.38% Python 10.94%

vggnet-metal's Introduction

VGGNet+Metal

This is the source code that accompanies my blog post Convolutional neural networks on the iPhone with VGGNet.

This project shows how to implement the 16-layer VGGNet convolutional neural network for basic image recognition on the iPhone.

VGGNet was a competitor in the ImageNet ILSVRC-2014 image classification competition and scored second place. For more details about VGGNet, see the project page and the paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
arXiv:1409.1556

The iPhone app uses the VGGNet version from the Caffe Model Zoo.

The demo app

How to run the app

You need an iPhone or iPad that supports Metal, running iOS 10 or better. (I have only tested the app on an iPhone 6s.)

NOTE: The source code won't run as-is. You need to do the following before you can build the Xcode project:

1 - Download the prototxt file.

2 - Download the caffemodel file.

3 - Run the conversion script from Terminal (requires Python 3 and the numpy and google.protobuf packages):

$ python3 convert_vggnet.py VGG_ILSVRC_16_layers_deploy.prototxt VGG_ILSVRC_16_layers.caffemodel ./output

This generates the file ./output/parameters.data. It will take a few minutes! The reason you need to download the caffemodel file and convert it yourself is that parameters.data is a 500+ MB file and you can't put those on GitHub.

4 - Copy parameters.data into the VGGNet-iOS/VGGNet folder.

5 - Now you can build the app in Xcode (version 8.0 or better). You can only build for the device, the simulator isn't supported (gives compiler errors).

The VGGNet+Metal source code is licensed under the terms of the MIT license.

vggnet-metal's People

Contributors

hollance avatar

Watchers

James Cloos 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.