{ "info": { "author": "Luke", "author_email": "lmelaskyriazi@college.harvard.edu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": "# EfficientNet PyTorch\n\n### Update (October 15, 2019)\n\nThis update allows you to choose whether to use a memory-efficient Swish activation. The memory-efficient version is chosen by default, but it cannot be used when exporting using PyTorch JIT. For this purpose, we have also included a standard (export-friendly) swish activation function. To switch to the export-friendly version, simply call `model.set_swish(memory_efficient=False)` after loading your desired model. This update addresses issues [#88](https://github.com/lukemelas/EfficientNet-PyTorch/pull/88) and [#89](https://github.com/lukemelas/EfficientNet-PyTorch/pull/89).\n\n#### Update (October 12, 2019)\n\nThis update makes the Swish activation function more memory-efficient. It also addresses pull requests [#72](https://github.com/lukemelas/EfficientNet-PyTorch/pull/72), [#73](https://github.com/lukemelas/EfficientNet-PyTorch/pull/73), [#85](https://github.com/lukemelas/EfficientNet-PyTorch/pull/85), and [#86](https://github.com/lukemelas/EfficientNet-PyTorch/pull/86). Thanks to the authors of all the pull requests! \n\n### Update (July 31, 2019)\n\n_Upgrade the pip package with_ `pip install --upgrade efficientnet-pytorch`\n\nThe B6 and B7 models are now available. Additionally, _all_ pretrained models have been updated to use AutoAugment preprocessing, which translates to better performance across the board. Usage is the same as before: \n```python\nfrom efficientnet_pytorch import EfficientNet\nmodel = EfficientNet.from_pretrained('efficientnet-b7') \n```\n\n### Update (June 29, 2019)\n\nThis update adds easy model exporting ([#20](https://github.com/lukemelas/EfficientNet-PyTorch/issues/20)) and feature extraction ([#38](https://github.com/lukemelas/EfficientNet-PyTorch/issues/38)). \n\n * [Example: Export to ONNX](#example-export)\n * [Example: Extract features](#example-feature-extraction)\n * Also: fixed a CUDA/CPU bug ([#32](https://github.com/lukemelas/EfficientNet-PyTorch/issues/32))\n\nIt is also now incredibly simple to load a pretrained model with a new number of classes for transfer learning:\n```python\nmodel = EfficientNet.from_pretrained('efficientnet-b1', num_classes=23)\n``` \n\n\n### Update (June 23, 2019)\n\nThe B4 and B5 models are now available. Their usage is identical to the other models: \n```python\nfrom efficientnet_pytorch import EfficientNet\nmodel = EfficientNet.from_pretrained('efficientnet-b4') \n```\n\n### Overview\nThis repository contains an op-for-op PyTorch reimplementation of [EfficientNet](https://arxiv.org/abs/1905.11946), along with pre-trained models and examples. \n\nThe goal of this implementation is to be simple, highly extensible, and easy to integrate into your own projects. This implementation is a work in progress -- new features are currently being implemented. \n\nAt the moment, you can easily: \n * Load pretrained EfficientNet models \n * Use EfficientNet models for classification or feature extraction \n * Evaluate EfficientNet models on ImageNet or your own images\n\n_Upcoming features_: In the next few days, you will be able to:\n * Train new models from scratch on ImageNet with a simple command \n * Quickly finetune an EfficientNet on your own dataset\n * Export EfficientNet models for production\n\n### Table of contents\n1. [About EfficientNet](#about-efficientnet)\n2. [About EfficientNet-PyTorch](#about-efficientnet-pytorch)\n3. [Installation](#installation)\n4. [Usage](#usage)\n * [Load pretrained models](#loading-pretrained-models)\n * [Example: Classify](#example-classification)\n * [Example: Extract features](#example-feature-extraction)\n * [Example: Export to ONNX](#example-export)\n6. [Contributing](#contributing) \n\n### About EfficientNet\n\nIf you're new to EfficientNets, here is an explanation straight from the official TensorFlow implementation: \n\nEfficientNets are a family of image classification models, which achieve state-of-the-art accuracy, yet being an order-of-magnitude smaller and faster than previous models. We develop EfficientNets based on AutoML and Compound Scaling. In particular, we first use [AutoML Mobile framework](https://ai.googleblog.com/2018/08/mnasnet-towards-automating-design-of.html) to develop a mobile-size baseline network, named as EfficientNet-B0; Then, we use the compound scaling method to scale up this baseline to obtain EfficientNet-B1 to B7.\n\n
\n \n | \n \n \n | \n