Skip to content
MXNetJS: Javascript Package for Deep Learning in Browser (without server)
Branch: master
Clone or download
Latest commit 1bd1ac5 Oct 19, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
model Add new JSON models obtained from the MXNet model gallery Mar 6, 2017
mxnet @ 104bb1e Add new files Mar 6, 2017
tools add classify from URL Dec 4, 2015
.gitignore initial commit Dec 4, 2015
.gitmodules cleanup Dec 4, 2015
LICENSE Updating readme Sep 21, 2017
libmxnet_predict.js Add new JSON models obtained from the MXNet model gallery Mar 6, 2017
test_on_node.js Add new files Mar 6, 2017

MXNetJS Deep Learning in Browser

MXNetJS is the Apache MXNet Javascript package. MXNetJS brings state of art deep learning inference API to the browser. It is generated with Emscripten and MXNet Amalgamation. MXNetJS allows you to run prediction of state-of-art deep learning models in any computational graph, and brings the fun of deep learning to the client side.

Try it in your browser

This requires Python 2:

python -m SimpleHTTPServer

Then open browser http://localhost:8000/classify.html

NodeJS User:

npm install http-server -g

Then open browser

See classify_image.js for how it works.


On Microsoft Edge and Firefox, performance is at least 8 times better than Google Chrome. We assume it is optimization difference on ASM.js.

Use Your Own Model

MXNetJS can take any model trained with mxnet, use tools/ to convert the model into json format and you are ready to go (note that only Python 2 is supported currently)

Library Code

  • mxnet_predict.js contains documented library code and provides convenient APIs to use in your JS application.
    • This is the API code your application should use. test_on_node.js shows an example.
  • libmxnet_predict.js is automatically generated by running ./ and should not be modified by hand.

Unit Tests

test_on_node.js will exercise the forward pass inference for a few models available at the MXNet Model gallery. The model JSON files are prepared by running the script ./ -all from the ./model folder. Currently the test exercises the following models

  • InceptionBN
  • SqueezeNET
  • ResNET18
  • NiN


Machine Eye - Web service for local image file/image URL classification without uploading.

Contrbute to MXNetJS

Contribution is more than welcomed!

You can’t perform that action at this time.