# mxnet.js **Repository Path**: mirrors_dmlc/mxnet.js ## Basic Information - **Project Name**: mxnet.js - **Description**: MXNetJS: Javascript Package for Deep Learning in Browser (without server) - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README MXNetJS Deep Learning in Browser ================================ MXNetJS is the [Apache MXNet](https://github.com/apache/incubator-mxnet) Javascript package. MXNetJS brings state of art deep learning inference API to the browser. It is generated with [Emscripten](https://github.com/kripken/emscripten) and [MXNet Amalgamation](https://github.com/apache/incubator-mxnet/tree/master/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 http-server ``` Then open browser http://127.0.0.1:8080/classify.html See [classify_image.js](classify_image.js) for how it works. Speed ----- 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/model2json.py](tools/model2json.py) 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](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](test_on_node.js) shows an example. - [libmxnet_predict.js](libmxnet_predict.js) is automatically generated by running ```./build.sh``` and should not be modified by hand. Unit Tests ---------- [test_on_node.js](test_on_node.js) will exercise the forward pass inference for a few models available at the [MXNet Model gallery](https://github.com/dmlc/mxnet-model-gallery). The model JSON files are prepared by running the script `./prepare_models.sh -all` from the `./model` folder. Currently the test exercises the following models - InceptionBN - SqueezeNET - ResNET18 - NiN Resources --------- Machine Eye -http://rupeshs.github.io/machineye/ Web service for local image file/image URL classification without uploading. Contrbute to MXNetJS -------------------- Contribution is more than welcomed!