{ "info": { "author": "Pavel Yakubovskiy", "author_email": "qubvel@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# EfficientNet Keras (and TensorFlow Keras)\n\nThis repository contains a Keras (and TensorFlow Keras) reimplementation of **EfficientNet**, a lightweight convolutional neural network architecture achieving the [state-of-the-art accuracy with an order of magnitude fewer parameters and FLOPS](https://arxiv.org/abs/1905.11946), on both ImageNet and\nfive other commonly used transfer learning datasets.\n\nThe codebase is heavily inspired by the [TensorFlow implementation](https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet).\n\n## Important!\nThere was a huge library update **24 of July**. Now efficintnet works with both frameworks: `keras` and `tensorflow.keras`.\nIf you have models, trained before that date, to load them, please, use efficientnet of 0.0.4 version (PyPI). You can roll back using `pip install -U efficientnet==0.0.4`.\n\n## Table of Contents\n\n 1. [About EfficientNet Models](#about-efficientnet-models)\n 2. [Examples](#examples)\n 3. [Models](#models)\n 4. [Installation](#installation)\n 5. [Frequently Asked Questions](#frequently-asked-questions)\n 6. [Acknowledgements](#acknowledgements)\n\n## About EfficientNet Models\n\nEfficientNets rely on AutoML and compound scaling to achieve superior performance without compromising resource efficiency. The [AutoML Mobile framework](https://ai.googleblog.com/2018/08/mnasnet-towards-automating-design-of.html) has helped develop a mobile-size baseline network, **EfficientNet-B0**, which is then improved by the compound scaling method to obtain EfficientNet-B1 to B7.\n\n\n\n \n \n\n
\n \n \n \n
\n\nEfficientNets achieve state-of-the-art accuracy on ImageNet with an order of magnitude better efficiency:\n\n* In high-accuracy regime, EfficientNet-B7 achieves the state-of-the-art 84.4% top-1 / 97.1% top-5 accuracy on ImageNet with 66M parameters and 37B FLOPS. At the same time, the model is 8.4x smaller and 6.1x faster on CPU inference than the former leader, [Gpipe](https://arxiv.org/abs/1811.06965).\n\n* In middle-accuracy regime, EfficientNet-B1 is 7.6x smaller and 5.7x faster on CPU inference than [ResNet-152](https://arxiv.org/abs/1512.03385), with similar ImageNet accuracy.\n\n* Compared to the widely used [ResNet-50](https://arxiv.org/abs/1512.03385), EfficientNet-B4 improves the top-1 accuracy from 76.3% of ResNet-50 to 82.6% (+6.3%), under similar FLOPS constraints.\n\n## Examples\n\n* *Initializing the model*:\n\n```python\n# models can be build with Keras or Tensorflow frameworks\n# use keras and tfkeras modules respectively\n# efficientnet.keras / efficientnet.tfkeras\nimport efficientnet.keras as efn \n\nmodel = efn.EfficientNetB0(weights='imagenet')\n\n```\n\n* *Loading the pre-trained weights*:\n\n```python\n# model use some custom objects, so before loading saved model\n# import module your network was build with\n# e.g. import efficientnet.keras / import efficientnet.tfkeras\nimport efficientnet.tfkeras\nfrom tensorflow.keras.models import load_model\n\nmodel = load_model('path/to/model.h5')\n```\n\nSee the complete example of loading the model and making an inference in the Jupyter notebook [here](https://github.com/qubvel/efficientnet/blob/master/examples/inference_example.ipynb).\n\n## Models\n\nThe performance of each model variant using the pre-trained weights converted from checkpoints provided by the authors is as follows:\n\n| Architecture | @top1* |\n| -------------- | :----: |\n| EfficientNetB0 | 0.772 |\n| EfficientNetB1 | 0.791 |\n| EfficientNetB2 | 0.802 |\n| EfficientNetB3 | 0.816 |\n| EfficientNetB4 | 0.830 |\n| EfficientNetB5 | 0.837 |\n| EfficientNetB6 | 0.841 |\n| EfficientNetB7 | 0.844 |\n\n**\\*** - topK accuracy score for converted models (imagenet `val` set)\n\n## Installation\n\n### Requirements\n\n* `Keras >= 2.2.0` / `TensorFlow >= 1.12.0`\n* `keras_applications >= 1.0.7`\n* `scikit-image`\n\n### Installing from the source\n\n```bash\n$ pip install -U git+https://github.com/qubvel/efficientnet\n```\n\n### Installing from PyPI\n\nPyPI stable release\n\n```bash\n$ pip install -U efficientnet\n```\n\nPyPI latest release (with keras and tf.keras support)\n\n```bash\n$ pip install -U --pre efficientnet\n```\n\n## Frequently Asked Questions\n\n* **How can I convert the original TensorFlow checkpoints to Keras HDF5?**\n\nPick the target directory (like `dist`) and run the [converter script](./scripts) from the repo directory as follows:\n\n```bash\n$ ./scripts/convert_efficientnet.sh --target_dir dist\n```\n\nYou can also optionally create the virtual environment with all the dependencies installed by adding `--make_venv=true` and operate in a self-destructing temporary location instead of the target directory by setting `--tmp_working_dir=true`.\n\n## Acknowledgements\nI would like to thanks community members who actively contribute to this repository:\n\n1) Sasha Illarionov ([@sdll](https://github.com/sdll)) for preparing automated script for weights conversion\n2) Bj\u00f6rn Barz ([@Callidior](https://github.com/Callidior)) for model code adaptation for keras and tensorflow.keras frameworks \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/qubvel/efficientnet", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "efficientnet", "package_url": "https://pypi.org/project/efficientnet/", "platform": "", "project_url": "https://pypi.org/project/efficientnet/", "project_urls": { "Homepage": "https://github.com/qubvel/efficientnet" }, "release_url": "https://pypi.org/project/efficientnet/1.0.0/", "requires_dist": [ "keras-applications (<=1.0.8,>=1.0.7)", "scikit-image", "pytest ; extra == 'test'" ], "requires_python": ">=3.0.0", "summary": "EfficientNet model re-implementation. Keras and TensorFlow Keras.", "version": "1.0.0" }, "last_serial": 5927695, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "03189ff5cb788e5f0684e91935613249", "sha256": "d74fa8f90f2a73ad7df4a2599fc938c01345b5deca4d6647976197e9e7ba915f" }, "downloads": -1, "filename": "efficientnet-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "03189ff5cb788e5f0684e91935613249", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.0.0", "size": 10512, "upload_time": "2019-05-31T13:32:02", "url": "https://files.pythonhosted.org/packages/85/c2/d47aa1e692d03b59b8a35e9969919af1c0200e96eb56ed69619adf1f4bad/efficientnet-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "98ab287455997f7b273330e34f080036", "sha256": "83bbd5799a4c09f774a69016afb6614879d5383fa3f432a307e440f90276df73" }, "downloads": -1, "filename": "efficientnet-0.0.2.tar.gz", "has_sig": false, "md5_digest": "98ab287455997f7b273330e34f080036", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 11877, "upload_time": "2019-05-31T13:32:05", "url": "https://files.pythonhosted.org/packages/34/31/93031ed43e1c848b62f920e20757b5c947754946b3db9baa2ebc9af95065/efficientnet-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "ab768dc29e941807486f09a1bbeb8738", "sha256": "ea913bab2c21c694fdb9dde81df1ced52e578f485ea4d7b8e7539d19492964e2" }, "downloads": -1, "filename": "efficientnet-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab768dc29e941807486f09a1bbeb8738", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.0.0", "size": 11287, "upload_time": "2019-06-04T12:06:21", "url": "https://files.pythonhosted.org/packages/66/9c/8bee2927037da1a56e899eb62140fba2862a0d4faeeacbdbe7a1f27bd528/efficientnet-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5343530cd9a6453fbbfd7426ae5ba4d5", "sha256": "880b33a0d6919f20079f5c678c5a6b4527e354d5dcf9967499efee18b0321c29" }, "downloads": -1, "filename": "efficientnet-0.0.3.tar.gz", "has_sig": false, "md5_digest": "5343530cd9a6453fbbfd7426ae5ba4d5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 12422, "upload_time": "2019-06-04T12:06:23", "url": "https://files.pythonhosted.org/packages/78/3b/d68dc41b1c3c7741b512ab41106ef0081e8fd2fe3683af196a523e3bc5f2/efficientnet-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "abc04c6d8974f8a07a987c557e41b45e", "sha256": "b5a74cb90531fac350efc728a434e727c9a174262201f0ec907c2296e4dd4321" }, "downloads": -1, "filename": "efficientnet-0.0.4.tar.gz", "has_sig": false, "md5_digest": "abc04c6d8974f8a07a987c557e41b45e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 13934, "upload_time": "2019-07-16T13:56:20", "url": "https://files.pythonhosted.org/packages/a6/80/f2c098284f7c07491e66af18d9a5fea595d4b507d10c0845275b8d47dc6f/efficientnet-0.0.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "77d14d6420b843ad57b9008ed3d6743e", "sha256": "c6fd035d856c9f1c409f3ac19e7655e54a13851046c821e9d4417fd12bcbaae4" }, "downloads": -1, "filename": "efficientnet-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "77d14d6420b843ad57b9008ed3d6743e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0.0", "size": 17685, "upload_time": "2019-10-04T10:15:05", "url": "https://files.pythonhosted.org/packages/97/82/f3ae07316f0461417dc54affab6e86ab188a5a22f33176d35271628b96e0/efficientnet-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f440c98ae3a65c3d110e528ea8e2cc9e", "sha256": "868715f6f5467186c0fa67ee8c9d50260b22f3a1bfb5919acd9911358be54df9" }, "downloads": -1, "filename": "efficientnet-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f440c98ae3a65c3d110e528ea8e2cc9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 15153, "upload_time": "2019-10-04T10:15:07", "url": "https://files.pythonhosted.org/packages/da/94/0af58e74b6e3f1f217a84289e9fd5a11e75276ac675d5c24d512f6a56720/efficientnet-1.0.0.tar.gz" } ], "1.0.0b1": [ { "comment_text": "", "digests": { "md5": "e864b3c161d1c1b71b85b11e45304db2", "sha256": "896d15c3af3bf667cd01f7b4be3d01977563c36497a9bdf20063fdb881692a60" }, "downloads": -1, "filename": "efficientnet-1.0.0b1.tar.gz", "has_sig": false, "md5_digest": "e864b3c161d1c1b71b85b11e45304db2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 15066, "upload_time": "2019-08-02T11:46:59", "url": "https://files.pythonhosted.org/packages/a3/57/3f6958739df536df03c15cf6ed620589ff66bba4eaae76e053cdb2d9206d/efficientnet-1.0.0b1.tar.gz" } ], "1.0.0b2": [ { "comment_text": "", "digests": { "md5": "6e1fde6bb8a933101b4e91d7ad32a4b8", "sha256": "96b3523124e141be16890d2a5164fad7bc6b29978c306f746e5dbf47e2cbb80a" }, "downloads": -1, "filename": "efficientnet-1.0.0b2.tar.gz", "has_sig": false, "md5_digest": "6e1fde6bb8a933101b4e91d7ad32a4b8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 15170, "upload_time": "2019-08-05T08:49:45", "url": "https://files.pythonhosted.org/packages/0d/3b/43d8559857c0ad75947ff9de116c35f69c41744a0e5bd776a88e8fd82371/efficientnet-1.0.0b2.tar.gz" } ], "1.0.0b3": [ { "comment_text": "", "digests": { "md5": "4523ffdd8b20627d899e848d87625ff6", "sha256": "36af60ce91ef47e8223d06d85fe6ee3908ac6599bc0d378bb0c17cf497ce6e42" }, "downloads": -1, "filename": "efficientnet-1.0.0b3.tar.gz", "has_sig": false, "md5_digest": "4523ffdd8b20627d899e848d87625ff6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 15056, "upload_time": "2019-08-08T15:40:08", "url": "https://files.pythonhosted.org/packages/7d/dc/b1c056e41651f939dc725e3ae8b9369fdb1ca9a72761328b4f4b4df28ddc/efficientnet-1.0.0b3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "77d14d6420b843ad57b9008ed3d6743e", "sha256": "c6fd035d856c9f1c409f3ac19e7655e54a13851046c821e9d4417fd12bcbaae4" }, "downloads": -1, "filename": "efficientnet-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "77d14d6420b843ad57b9008ed3d6743e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0.0", "size": 17685, "upload_time": "2019-10-04T10:15:05", "url": "https://files.pythonhosted.org/packages/97/82/f3ae07316f0461417dc54affab6e86ab188a5a22f33176d35271628b96e0/efficientnet-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f440c98ae3a65c3d110e528ea8e2cc9e", "sha256": "868715f6f5467186c0fa67ee8c9d50260b22f3a1bfb5919acd9911358be54df9" }, "downloads": -1, "filename": "efficientnet-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f440c98ae3a65c3d110e528ea8e2cc9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0.0", "size": 15153, "upload_time": "2019-10-04T10:15:07", "url": "https://files.pythonhosted.org/packages/da/94/0af58e74b6e3f1f217a84289e9fd5a11e75276ac675d5c24d512f6a56720/efficientnet-1.0.0.tar.gz" } ] }