{ "info": { "author": "System Research Group, Microsoft Research Asia", "author_email": "mmdnn_feedback@microsoft.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# ![MMdnn](https://ndqzpq.dm2304.livefilestore.com/y4mF9ON1vKrSy0ew9dM3Fw6KAvLzQza2nL9JiMSIfgfKLbqJPvuxwOC2VIur_Ycz4TvVpkibMkvKXrX-N9QOkyh0AaUW4qhWDak8cyM0UoLLxc57apyhfDaxflLlZrGqiJgzn1ztsxiaZMzglaIMhoo8kjPuZ5-vY7yoWXqJuhC1BDHOwgNPwIgzpxV1H4k1oQzmewThpAJ_w_fUHzianZtMw?width=35&height=35&cropmode=none) MMdnn\n\n[![PyPi Version](https://img.shields.io/pypi/v/mmdnn.svg)](https://pypi.org/project/mmdnn/)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Linux](https://travis-ci.org/Microsoft/MMdnn.svg?branch=master)](https://travis-ci.org/Microsoft/MMdnn)\n\nA comprehensive, cross-framework solution to convert, visualize and diagnose deep neural network models. The \"MM\" in MMdnn stands for model management and \"dnn\" is an acronym for the deep neural network.\n\nMajor features\n\n- **Find model**\n\n - We provide a [model collection](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/models/README.md) to help you find some popular models.\n - We provide a model visualizer to display the network architecture more intuitively.\n\n- **Conversion**\n\n - We implement a universal converter to convert DNN models between frameworks, which means you can train on one framework and deploy on another.\n\n- **Retrain**\n\n - In the converter, we can generate some training/inference code snippet to simplify the retrain/evaluate work.\n\n- **Deployment**\n\n - We provide some guidelines to help you deploy your models to another hardware platform.\n - [Android](https://github.com/Microsoft/MMdnn/wiki/Deploy-your-TensorFlow-Lite-Model-in-Android)\n - [Serving](https://github.com/Microsoft/MMdnn/wiki/Tensorflow-Serving-Via-Docker)\n\n - We provide a guide to help you accelerate inference with TensorRT.\n - [TensorRT](https://github.com/Microsoft/MMdnn/wiki/Using-TensorRT-to-Accelerate-Inference)\n\n\n## Related Projects\n[Microsoft Research Asia (MSRA)](https://www.microsoft.com/en-us/research/group/systems-research-group-asia/)\nand Microsoft Search Technology Center Asia (STCA)\nhave released some projects to advance the state-of-art technology:\n* [Open Platform for AI (OpenPAI)](https://github.com/Microsoft/pai): an open source platform that provides complete AI model training and resource management capabilities.\nIt is easy to extend and supports on-premise, cloud and hybrid environments in various scale.\n* [Neural Network Intelligence (NNI)](https://github.com/Microsoft/nni): an open source AutoML toolkit for neural architecture search and hyper-parameter tuning.\n\nWe encourage researchers, developers and students to leverage such projects to boost their Deep Learning / AI productivity.\n\n## Installation\n\n### Install manually\n\nYou can get a stable version of MMdnn by\n\n```bash\npip install mmdnn\n```\nAnd make sure to have [Python](https://www.python.org/) installed\nor you can try the newest version by\n\n```bash\npip install -U git+https://github.com/Microsoft/MMdnn.git@master\n```\n\n### Install with docker image\n\nMMdnn provides a docker image, which packages MMdnn and Deep Learning frameworks that we support as well as other dependencies.\nYou can easily try the image with the following steps:\n\n1. Install Docker Community Edition(CE)\n\n [_Learn more about how to install docker_](https://github.com/Microsoft/MMdnn/blob/master/docs/InstallDockerCE.md)\n\n1. Pull MMdnn docker image\n ```bash\n docker pull mmdnn/mmdnn:cpu.small\n ```\n\n1. Run image in an interactive mode\n\n ```bash\n docker run -it mmdnn/mmdnn:cpu.small\n ```\n\n## Features\n\n### Model Conversion\n\nAcross the industry and academia, there are a number of existing frameworks available for developers and researchers to design a model, where each framework has its own network structure definition and saving model format. The gaps between frameworks impede the inter-operation of the models.\n\n\n\nWe provide a model converter to help developers convert models between frameworks through an intermediate representation format.\n\n#### Support frameworks\n\n> [Note] You can click the links to get detail README of each framework\n\n- [Caffe](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/caffe/README.md)\n- [Microsoft Cognitive Toolkit (CNTK)](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/cntk/README.md)\n- [CoreML](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/coreml/README.md)\n- [Keras](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/keras/README.md)\n- [MXNet](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/mxnet/README.md)\n- [ONNX](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/onnx/README.md) (Destination only)\n- [PyTorch](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/pytorch/README.md)\n- [TensorFlow](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/tensorflow/README.md) (Experimental) (We highly recommend you read the README of TensorFlow first)\n- [DarkNet](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/darknet/README.md) (Source only, Experiment)\n\n#### Tested models\n\nThe model conversion between currently supported frameworks is tested on some **ImageNet** models.\n\nModels | Caffe | Keras | TensorFlow | CNTK | MXNet | PyTorch | CoreML | ONNX\n:-----:|:-----:|:-----:|:----------:|:----:|:-----:|:--------:|:------:|:-----:|\n[VGG 19](https://arxiv.org/abs/1409.1556.pdf) | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a\n[Inception V1](https://arxiv.org/abs/1409.4842v1) | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a\n[Inception V3](https://arxiv.org/abs/1512.00567) | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a\n[Inception V4](https://arxiv.org/abs/1512.00567) | \u221a | \u221a | \u221a | o | \u221a | \u221a | \u221a | \u221a\n[ResNet V1](https://arxiv.org/abs/1512.03385) | \u00d7 | \u221a | \u221a | o | \u221a | \u221a | \u221a | \u221a\n[ResNet V2](https://arxiv.org/abs/1603.05027) | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a\n[MobileNet V1](https://arxiv.org/pdf/1704.04861.pdf) | \u00d7 | \u221a | \u221a | o | \u221a | \u221a | \u221a | \u221a | \u221a\n[MobileNet V2](https://arxiv.org/pdf/1704.04861.pdf) | \u00d7 | \u221a | \u221a | o | \u221a | \u221a | \u221a | \u221a | \u221a\n[Xception](https://arxiv.org/pdf/1610.02357.pdf) | \u221a | \u221a | \u221a | o | \u00d7 | \u221a | \u221a | \u221a | \u221a\n[SqueezeNet](https://arxiv.org/pdf/1602.07360) | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a\n[DenseNet](https://arxiv.org/abs/1608.06993) | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a\n[NASNet](https://arxiv.org/abs/1707.07012) | x | \u221a | \u221a | o | \u221a | \u221a | \u221a | x\n[ResNext](https://arxiv.org/abs/1611.05431) | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a | \u221a\n[voc FCN](https://people.eecs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf) | | | \u221a | \u221a | |\nYolo3 | | \u221a | | \u221a |\n\n#### Usage\n\nOne command to achieve the conversion. Using TensorFlow **ResNet V2 152** to PyTorch as our example.\n\n```bash\n$ mmdownload -f tensorflow -n resnet_v2_152 -o ./\n$ mmconvert -sf tensorflow -in imagenet_resnet_v2_152.ckpt.meta -iw imagenet_resnet_v2_152.ckpt --dstNodeName MMdnn_Output -df pytorch -om tf_resnet_to_pth.pth\n```\n\nDone.\n\n#### On-going frameworks\n\n- Torch7 (help wanted)\n- Chainer (help wanted)\n\n#### On-going Models\n\n- Face Detection\n- Semantic Segmentation\n- Image Style Transfer\n- Object Detection\n- RNN\n\n---\n\n### Model Visualization\n\nYou can use the [MMdnn model visualizer](http://vis.mmdnn.com/) and submit your IR json file to visualize your model. In order to run the commands below, you will need to install [requests](https://anaconda.org/anaconda/requests), [keras](https://anaconda.org/anaconda/keras), and [TensorFlow](https://anaconda.org/anaconda/tensorflow) using your favorite package manager.\n\nUse the [Keras \"inception_v3\" model](https://github.com/fchollet/deep-learning-models) as an example again.\n\n1. Download the pre-trained models\n\n```bash\n$ mmdownload -f keras -n inception_v3\n```\n\n2. Convert the pre-trained model files into an intermediate representation\n\n```bash\n$ mmtoir -f keras -w imagenet_inception_v3.h5 -o keras_inception_v3\n```\n\n3. Open the [MMdnn model visualizer](http://mmdnn.eastasia.cloudapp.azure.com:8080/) and choose file *keras_inception_v3.json*\n\n![vismmdnn](docs/vismmdnn.png)\n\n---\n\n## Examples\n\n### Official Tutorial\n\n- [Keras \"inception V3\" to CNTK](https://github.com/Microsoft/MMdnn/blob/master/docs/keras2cntk.md) and [related issue](https://github.com/Microsoft/MMdnn/issues/19)\n\n- [TensorFlow slim model \"ResNet V2 152\" to PyTorch](https://github.com/Microsoft/MMdnn/blob/master/docs/tf2pytorch.md)\n\n- [Mxnet model \"LResNet50E-IR\" to TensorFlow](https://github.com/Microsoft/MMdnn/issues/85) and [related issue](https://github.com/Microsoft/MMdnn/issues/135)\n\n### Users' Examples\n\n- [MXNet \"ResNet-152-11k\" to PyTorch](https://github.com/Microsoft/MMdnn/issues/6)\n\n- [MXNet \"ResNeXt\" to Keras](https://github.com/Microsoft/MMdnn/issues/58)\n\n- [TensorFlow \"ResNet-101\" to PyTorch](https://github.com/Microsoft/MMdnn/issues/22)\n\n- [TensorFlow \"mnist mlp model\" to CNTK](https://github.com/Microsoft/MMdnn/issues/11)\n\n- [TensorFlow \"Inception_v3\" to MXNet](https://github.com/Microsoft/MMdnn/issues/30)\n\n- [Caffe \"voc-fcn\" to TensorFlow](https://github.com/Microsoft/MMdnn/issues/29)\n\n- [Caffe \"AlexNet\" to TensorFlow](https://github.com/Microsoft/MMdnn/issues/10)\n\n- [Caffe \"inception_v4\" to TensorFlow](https://github.com/Microsoft/MMdnn/issues/26)\n\n- [Caffe \"VGG16_SOD\" to TensorFlow](https://github.com/Microsoft/MMdnn/issues/27)\n\n- [Caffe \"SqueezeNet v1.1\" to CNTK](https://github.com/Microsoft/MMdnn/issues/48)\n\n---\n\n## Contributing\n\n### Intermediate Representation\n\nThe intermediate representation stores the **network architecture** in **protobuf binary** and **pre-trained weights** in **NumPy** native format.\n\n> [Note!] Currently the IR weights data is in NHWC (channel last) format.\n\nDetails are in [ops.txt](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/common/IR/ops.pbtxt) and [graph.proto](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/common/IR/graph.proto). New operators and any comments are welcome.\n\n### Frameworks\n\nWe are working on other frameworks conversion and visualization, such as PyTorch, CoreML and so on. We're investigating more RNN related operators. Any contributions and suggestions are welcome! Details in [Contribution Guideline](https://github.com/Microsoft/MMdnn/wiki/Contribution-Guideline).\n\n### License\n\nMost contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Authors\n\nCheng CHEN (Microsoft Research Asia): Project Manager; Caffe, CNTK, CoreML Emitter, Keras, MXNet, TensorFlow\n\nJiahao YAO (Peking University): CoreML, MXNet Emitter, PyTorch Parser; HomePage\n\nRu ZHANG (Chinese Academy of Sciences): CoreML Emitter, DarkNet Parser, Keras, TensorFlow frozen graph Parser; Yolo and SSD models; Tests\n\nYuhao ZHOU (Shanghai Jiao Tong University): MXNet\n\nTingting QIN (Microsoft Research Asia): Caffe Emitter\n\nTong ZHAN (Microsoft): ONNX Emitter\n\nQianwen WANG (Hong Kong University of Science and Technology): Visualization\n\n## Acknowledgements\n\nThanks to [Saumitro Dasgupta](https://github.com/ethereon), the initial code of *caffe -> IR converting* is references to his project [caffe-tensorflow](https://github.com/ethereon/caffe-tensorflow).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Microsoft/MMdnn", "keywords": "deep learning model converter visualization", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mmdnn", "package_url": "https://pypi.org/project/mmdnn/", "platform": "", "project_url": "https://pypi.org/project/mmdnn/", "project_urls": { "Homepage": "https://github.com/Microsoft/MMdnn" }, "release_url": "https://pypi.org/project/mmdnn/0.2.5/", "requires_dist": [ "numpy (>=1.15.0)", "protobuf (>=3.6.0)", "six (>=1.10.0)", "pillow (>=3.1.0)" ], "requires_python": "", "summary": "Deep learning model converter, visualization and editor.", "version": "0.2.5" }, "last_serial": 5147947, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "8da02daa32aa40ec92c32dc58ff63067", "sha256": "50d4aaf4b592bfdc3cac82bb02aeedf1e66565231e83be99b0cd4ae76948cb66" }, "downloads": -1, "filename": "mmdnn-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8da02daa32aa40ec92c32dc58ff63067", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 209142, "upload_time": "2018-04-10T13:23:39", "url": "https://files.pythonhosted.org/packages/54/96/9147077bdce25102c721de81d61de1fab29a0dee3cc91f8170f7d4548061/mmdnn-0.1.5-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e681d79e3909449d81d3680e1d0e1087", "sha256": "db63fd3253c7a93e93f376eff30529ffce5ef88e32cb316dc7fffbb60a11e33a" }, "downloads": -1, "filename": "mmdnn-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e681d79e3909449d81d3680e1d0e1087", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 246313, "upload_time": "2018-05-15T08:48:32", "url": "https://files.pythonhosted.org/packages/f3/4f/20f0c72d3e34c985cf8063aa35113fe4047c2352eee6474c39dae55e8a8f/mmdnn-0.2.0-py2.py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "26f111a534d302f62bb6c3df2450db21", "sha256": "279f411edded9216ad0eace48d7ed0762f9614142e94a7211ee18d0577f94c1b" }, "downloads": -1, "filename": "mmdnn-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "26f111a534d302f62bb6c3df2450db21", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 249495, "upload_time": "2018-05-22T09:15:27", "url": "https://files.pythonhosted.org/packages/d1/1b/fd65b54598c284947d6e561d4c843f719654654491cd015a7b5efc3991bc/mmdnn-0.2.1-py2.py3-none-any.whl" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "0b8961f6faca34b96ab25a54f4f8d5d8", "sha256": "f564f7f28531479a177f28595f0d19aa0721f5864e3f9aa6dbece73664cb2f5f" }, "downloads": -1, "filename": "mmdnn-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0b8961f6faca34b96ab25a54f4f8d5d8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 266269, "upload_time": "2018-06-11T09:16:25", "url": "https://files.pythonhosted.org/packages/1a/06/0b65c2574eea2c0fece070e16d34152d523c9fcb163607639a20a313269b/mmdnn-0.2.2-py2.py3-none-any.whl" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "9c90be9c6ca52c98e663adbad608af1b", "sha256": "62c37362ce50a56b1292b73debca29295195ce0b20cda3457e87fdbc9544e617" }, "downloads": -1, "filename": "mmdnn-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9c90be9c6ca52c98e663adbad608af1b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 284008, "upload_time": "2018-07-21T02:50:09", "url": "https://files.pythonhosted.org/packages/3e/e1/e7389325a160f9134b53b9d3813a074109ba33ba1838ddec24fe8eb7c973/mmdnn-0.2.3-py2.py3-none-any.whl" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "07e7176e139e4d3c153d76f5e42ca9c1", "sha256": "16eabad531b49bb10cb12961638daa453917336122a72f77b01981a9c118fdee" }, "downloads": -1, "filename": "mmdnn-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "07e7176e139e4d3c153d76f5e42ca9c1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 316706, "upload_time": "2019-03-03T04:26:53", "url": "https://files.pythonhosted.org/packages/ce/98/57bfb7de7a99106765433a78690ff089ae564d0a37fba871adf136c3f00b/mmdnn-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a659599534646667883346c944a8687f", "sha256": "67a4d157aae2eaf5377c2a41f81465b93489d15077bb9d795d3c3a75f6b3539b" }, "downloads": -1, "filename": "mmdnn-0.2.4.tar.gz", "has_sig": false, "md5_digest": "a659599534646667883346c944a8687f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 237909, "upload_time": "2019-03-03T04:26:55", "url": "https://files.pythonhosted.org/packages/b6/28/d0b2d32c1f33018592f829531f2b880f86b303fdb9b9d52ded50238736ad/mmdnn-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "d4d84e98e071dc37acd531ec598e1299", "sha256": "c8f7105e46e112a6b313eabda2cccd50a053afb90240233f30f3cb0e5a33ff24" }, "downloads": -1, "filename": "mmdnn-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d4d84e98e071dc37acd531ec598e1299", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 317326, "upload_time": "2019-04-16T03:48:04", "url": "https://files.pythonhosted.org/packages/a5/20/1fb6420b806c546392c045f98ff3d0ede51011db2b56f9552a18a1b31506/mmdnn-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c024653e8952e8b64b7dea548f964cc", "sha256": "cc37036c2c103c7296bf03aaa00acc258cbef301e3663b168b86fd4b9b2be09c" }, "downloads": -1, "filename": "mmdnn-0.2.5.tar.gz", "has_sig": false, "md5_digest": "6c024653e8952e8b64b7dea548f964cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 238436, "upload_time": "2019-04-16T03:48:06", "url": "https://files.pythonhosted.org/packages/26/30/cb8b4e8809b2c64163e74838cccd1684bd834437fb1c85aad986e177a3aa/mmdnn-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d4d84e98e071dc37acd531ec598e1299", "sha256": "c8f7105e46e112a6b313eabda2cccd50a053afb90240233f30f3cb0e5a33ff24" }, "downloads": -1, "filename": "mmdnn-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d4d84e98e071dc37acd531ec598e1299", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 317326, "upload_time": "2019-04-16T03:48:04", "url": "https://files.pythonhosted.org/packages/a5/20/1fb6420b806c546392c045f98ff3d0ede51011db2b56f9552a18a1b31506/mmdnn-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c024653e8952e8b64b7dea548f964cc", "sha256": "cc37036c2c103c7296bf03aaa00acc258cbef301e3663b168b86fd4b9b2be09c" }, "downloads": -1, "filename": "mmdnn-0.2.5.tar.gz", "has_sig": false, "md5_digest": "6c024653e8952e8b64b7dea548f964cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 238436, "upload_time": "2019-04-16T03:48:06", "url": "https://files.pythonhosted.org/packages/26/30/cb8b4e8809b2c64163e74838cccd1684bd834437fb1c85aad986e177a3aa/mmdnn-0.2.5.tar.gz" } ] }