README.md 6.35 KB
Newer Older
1
2
3
<div align="center">
  <img src="https://storage.googleapis.com/tf_model_garden/tf_model_garden_logo.png">
</div>
4

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
5
# TensorFlow Official Models
6

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
7
8
9
10
The TensorFlow official models are a collection of models
that use TensorFlow’s high-level APIs.
They are intended to be well-maintained, tested, and kept up to date
with the latest TensorFlow API.
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
11

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
12
13
14
15
They should also be reasonably optimized for fast performance while still
being easy to read.
These models are used as end-to-end tests, ensuring that the models run
with the same or improved speed and performance with each new TensorFlow build.
16

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
17
## More models to come!
18

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
19
20
21
The team is actively developing new models.
In the near future, we will add:

22
23
* State-of-the-art language understanding models.
* State-of-the-art image classification models.
bhack's avatar
bhack committed
24
* State-of-the-art object detection and instance segmentation models.
25
* State-of-the-art video classification models.
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
26
27

## Table of Contents
28

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
29
30
31
32
- [Models and Implementations](#models-and-implementations)
  * [Computer Vision](#computer-vision)
    + [Image Classification](#image-classification)
    + [Object Detection and Segmentation](#object-detection-and-segmentation)
33
    + [Video Classification](#video-classification)
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
34
35
36
  * [Natural Language Processing](#natural-language-processing)
  * [Recommendation](#recommendation)
- [How to get started with the official models](#how-to-get-started-with-the-official-models)
37
- [Contributions](#contributions)
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
38
39

## Models and Implementations
Hongkun Yu's avatar
Hongkun Yu committed
40

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
41
### Computer Vision
Hongkun Yu's avatar
Hongkun Yu committed
42

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
43
44
45
46
#### Image Classification

| Model | Reference (Paper) |
|-------|-------------------|
Yeqing Li's avatar
Yeqing Li committed
47
48
49
50
51
| [MNIST](legacy/image_classification) | A basic model to classify digits from the [MNIST dataset](http://yann.lecun.com/exdb/mnist/) |
| [ResNet](vision/MODEL_GARDEN.md) | [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) |
| [ResNet-RS](vision/MODEL_GARDEN.md) | [Revisiting ResNets: Improved Training and Scaling Strategies](https://arxiv.org/abs/2103.07579) |
| [EfficientNet](legacy/image_classification) | [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946) |
| [Vision Transformer](vision/MODEL_GARDEN.md) | [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) |
52

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
53
#### Object Detection and Segmentation
54

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
55
56
| Model | Reference (Paper) |
|-------|-------------------|
Yeqing Li's avatar
Yeqing Li committed
57
58
59
60
61
| [RetinaNet](vision/MODEL_GARDEN.md) | [Focal Loss for Dense Object Detection](https://arxiv.org/abs/1708.02002) |
| [Mask R-CNN](vision/MODEL_GARDEN.md) | [Mask R-CNN](https://arxiv.org/abs/1703.06870) |
| [ShapeMask](legacy/detection) | [ShapeMask: Learning to Segment Novel Objects by Refining Shape Priors](https://arxiv.org/abs/1904.03239) |
| [SpineNet](vision/MODEL_GARDEN.md) | [SpineNet: Learning Scale-Permuted Backbone for Recognition and Localization](https://arxiv.org/abs/1912.05027) |
| [Cascade RCNN-RS and RetinaNet-RS](vision/MODEL_GARDEN.md) | [Simple Training Strategies and Model Scaling for Object Detection](https://arxiv.org/abs/2107.00057)|
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
62

63
64
65
66
67
68
#### Video Classification

| Model | Reference (Paper) |
|-------|-------------------|
| [Mobile Video Networks (MoViNets)](projects/movinet) | [MoViNets: Mobile Video Networks for Efficient Video Recognition](https://arxiv.org/abs/2103.11511) |

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
69
### Natural Language Processing
70

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
71
72
| Model | Reference (Paper) |
|-------|-------------------|
73
74
| [ALBERT (A Lite BERT)](nlp/MODEL_GARDEN.md#available-model-configs) | [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942) |
| [BERT (Bidirectional Encoder Representations from Transformers)](nlp/MODEL_GARDEN.md#available-model-configs) | [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805) |
Yuexin Wu's avatar
Yuexin Wu committed
75
| [NHNet (News Headline generation model)](projects/nhnet) | [Generating Representative Headlines for News Stories](https://arxiv.org/abs/2001.09386) |
76
| [Transformer](nlp/MODEL_GARDEN.md#available-model-configs) | [Attention Is All You Need](https://arxiv.org/abs/1706.03762) |
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
77
| [XLNet](nlp/xlnet) | [XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237) |
78
| [MobileBERT](projects/mobilebert) | [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) |
79

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
80
81
### Recommendation

82
83
84
85
86
Model                            | Reference (Paper)
-------------------------------- | -----------------
[DLRM](recommendation/ranking)   | [Deep Learning Recommendation Model for Personalization and Recommendation Systems](https://arxiv.org/abs/1906.00091)
[DCN v2](recommendation/ranking) | [Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems](https://arxiv.org/abs/2008.13535)
[NCF](recommendation)            | [Neural Collaborative Filtering](https://arxiv.org/abs/1708.05031)
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
87
88

## How to get started with the official models
Hongkun Yu's avatar
Hongkun Yu committed
89

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
90
91
92
93
94
95
96
97
* The models in the master branch are developed using TensorFlow 2,
and they target the TensorFlow [nightly binaries](https://github.com/tensorflow/tensorflow#installation)
built from the
[master branch of TensorFlow](https://github.com/tensorflow/tensorflow/tree/master).
* The stable versions targeting releases of TensorFlow are available
as tagged branches or [downloadable releases](https://github.com/tensorflow/models/releases).
* Model repository version numbers match the target TensorFlow release,
such that
98
[TensorFlow-models v2.5.0](https://github.com/tensorflow/models/releases/tag/v2.5.0)
Vishnuvardhan Janapati's avatar
Vishnuvardhan Janapati committed
99
is compatible with
Hongkun Yu's avatar
Hongkun Yu committed
100
[TensorFlow v2.5.0](https://github.com/tensorflow/tensorflow/releases/tag/v2.5.0).
Hongkun Yu's avatar
Hongkun Yu committed
101

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
102
Please follow the below steps before running models in this repository.
103

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
104
### Requirements
105

106
* The latest TensorFlow Model Garden release and the latest TensorFlow 2
Hongkun Yu's avatar
Hongkun Yu committed
107
  * If you are on a version of TensorFlow earlier than 2.2, please
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
108
upgrade your TensorFlow to [the latest TensorFlow 2](https://www.tensorflow.org/install/).
Hongkun Yu's avatar
Hongkun Yu committed
109

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
110
111
```shell
pip3 install tf-nightly
112
# pip3 install tensorflow # for latest stable version
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
113
```
Hongkun Yu's avatar
Hongkun Yu committed
114

Hongkun Yu's avatar
Hongkun Yu committed
115
116
117
118
119
* Python 3.7+

Our integration tests run with Python 3.7. Although Python 3.6 should work, we
don't recommend earlier versions.

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
120
### Installation
Hongkun Yu's avatar
Hongkun Yu committed
121

122
Please check the installation instructions [here](https://github.com/tensorflow/models#Installation)
Chen Chen's avatar
Chen Chen committed
123

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
124
## Contributions
125

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
126
If you want to contribute, please review the [contribution guidelines](https://github.com/tensorflow/models/wiki/How-to-contribute).