README.md 17.2 KB
Newer Older
G
grasswolfs 已提交
1
English | [简体中文](README_ch.md)
W
wuzewu 已提交
2

C
chunzhang-hub 已提交
3
<p align="center">
D
Daniel Yang 已提交
4 5 6 7 8
 <img src="./docs/imgs/paddlehub_logo.jpg" align="middle">
<p align="center">
<div align="center">  
  <h3> <a href=#QuickStart> QuickStart </a> | <a href="https://paddlehub.readthedocs.io/en/release-v2.1"> Tutorial </a> | <a href="https://www.paddlepaddle.org.cn/hublist"> Models List </a> | <a href="https://www.paddlepaddle.org.cn/hub"> Demos </a> </h3>
</div>
G
grasswolfs 已提交
9

Z
Zeyu Chen 已提交
10 11
------------------------------------------------------------------------------------------

W
wuzewu 已提交
12
<p align="center">
W
wuzewu 已提交
13 14
    <a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache%202-dfd.svg"></a>
    <a href="https://github.com/PaddlePaddle/PaddleHub/releases"><img src="https://img.shields.io/github/v/release/PaddlePaddle/PaddleHub?color=ffa"></a>
W
wuzewu 已提交
15
    <a href=""><img src="https://img.shields.io/badge/python-3.6.2+-aff.svg"></a>
W
wuzewu 已提交
16 17 18 19
    <a href=""><img src="https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-pink.svg"></a>
    <a href=""><img src="https://img.shields.io/pypi/format/paddlehub?color=c77"></a>
</p>
<p align="center">
W
wuzewu 已提交
20 21 22 23 24
    <a href="https://github.com/PaddlePaddle/PaddleHub/graphs/contributors"><img src="https://img.shields.io/github/contributors/PaddlePaddle/PaddleHub?color=9ea"></a>
    <a href="https://github.com/PaddlePaddle/PaddleHub/commits"><img src="https://img.shields.io/github/commit-activity/m/PaddlePaddle/PaddleHub?color=3af"></a>
    <a href="https://pypi.org/project/paddlehub/"><img src="https://img.shields.io/pypi/dm/paddlehub?color=9cf"></a>
    <a href="https://github.com/PaddlePaddle/PaddleHub/issues"><img src="https://img.shields.io/github/issues/PaddlePaddle/PaddleHub?color=9cc"></a>
    <a href="https://github.com/PaddlePaddle/PaddleHub/stargazers"><img src="https://img.shields.io/github/stars/PaddlePaddle/PaddleHub?color=ccf"></a>
W
wuzewu 已提交
25
</p>
C
chunzhang-hub 已提交
26

G
grasswolfs 已提交
27 28


D
Daniel Yang 已提交
29
## Introduction and Features
D
Daniel Yang 已提交
30
- **PaddleHub** aims to provide developers with rich, high-quality, and directly usable pre-trained models.
D
Daniel Yang 已提交
31 32
- **Abundant Pre-trained Models**: 300+ pre-trained models cover the 5 major categories, including Image, Text, Audio, Video, and Industrial application. All of them are free for download and offline usage.
- **No Need for Deep Learning Background**: you can use AI models quickly and enjoy the dividends of the artificial intelligence era.
D
Daniel Yang 已提交
33
- **Quick Model Prediction**: model prediction can be realized through a few lines of scripts to quickly experience the model effect.
D
Daniel Yang 已提交
34
- **Model As Service**: one-line command to build deep learning model API service deployment capabilities.
D
Daniel Yang 已提交
35
- **Easy-to-use Transfer Learning**: few lines of codes to complete the transfer-learning task such as image classification and text classification based on high quality pre-trained models.
D
Daniel Yang 已提交
36
- **Cross-platform**: support Linux, Windows, MacOS and other operating systems.
G
grasswolfs 已提交
37

D
Daniel Yang 已提交
38
### Recent updates
D
Daniel Yang 已提交
39
- **2021.05.12:** Add an open-domain dialogue system, i.e., [plato-mini](https://www.paddlepaddle.org.cn/hubdetail?name=plato-mini&en_category=TextGeneration), to make it easy to build a chatbot in wechat with the help of the wechaty, [See Demo](https://github.com/KPatr1ck/paddlehub-wechaty-demo)
D
Daniel Yang 已提交
40 41 42
- **2021.04.27:** The v2.1.0 version is released. [1] Add supports for five new models, including two high-precision semantic segmentation models based on VOC dataset and three voice classification models. [2] Enforce the transfer learning capabilities for image semantic segmentation, text semantic matching and voice classification on related datasets. [3] Add the export function APIs for two kinds of model formats, i.,e, ONNX and PaddleInference. [4] Add the support for [BentoML](https://github.com/bentoml/BentoML/), which is a cloud native framework for serving deployment. Users can easily serve pre-trained models from PaddleHub by following the [Tutorial notebooks](https://github.com/PaddlePaddle/PaddleHub/blob/release/v2.1/demo/serving/bentoml/cloud-native-model-serving-with-bentoml.ipynb). Also, see this announcement and [Release note](https://github.com/bentoml/BentoML/releases/tag/v0.12.1) from BentoML. (Many thanks to @[parano](https://github.com/parano) @[cqvu](https://github.com/cqvu) @[deehrlic](https://github.com/deehrlic) for contributing this feature in PaddleHub). [5] The total number of pre-trained models reaches **【300】**.
- **2021.02.18:** The v2.0.0 version is released, making model development and debugging easier, and the finetune task is more flexible and easy to use.The ability to transfer learning for visual tasks is fully upgraded, supporting various tasks such as image classification, image coloring, and style transfer; Transformer models such as BERT, ERNIE, and RoBERTa are upgraded to dynamic graphs, supporting Fine-Tune capabilities for text classification and sequence labeling; Optimize the Serving capability, support multi-card prediction, automatic load balancing, and greatly improve performance; the new automatic data enhancement capability Auto Augment can efficiently search for data enhancement strategy combinations suitable for data sets. 61 new word vector models were added, including 51 Chinese models and 10 English models; add 4 image segmentation models, 2 depth models, 7 image generation models, and 3 text generation models, the total number of pre-trained models reaches **【274】**.
- [【more】](./docs/docs_en/release.md)
G
grasswolfs 已提交
43

C
chunzhang-hub 已提交
44 45


G
grasswolfs 已提交
46

D
Daniel Yang 已提交
47 48
## Visualization Demo [[More]](./docs/docs_en/visualization.md)
### **Computer Vision (161 models)**
G
grasswolfs 已提交
49
<div align="center">
D
Daniel Yang 已提交
50
<img src="./docs/imgs/Readme_Related/Image_all.gif"  width = "530" height = "400" />
G
grasswolfs 已提交
51
</div>
G
grasswolfs 已提交
52

D
Daniel Yang 已提交
53
- Many thanks to CopyRight@[PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection)[PaddleGAN](https://github.com/PaddlePaddle/PaddleGAN)[AnimeGAN](https://github.com/TachibanaYoshino/AnimeGANv2)[openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose)[PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg)[Zhengxia Zou](https://github.com/jiupinjia/SkyAR)[PaddleClas](https://github.com/PaddlePaddle/PaddleClas) for the pre-trained models, you can try to train your models with them.
G
grasswolfs 已提交
54

C
chunzhang-hub 已提交
55

D
Daniel Yang 已提交
56
### **Natural Language Processing (129 models)**
C
chunzhang-hub 已提交
57
<div align="center">
D
Daniel Yang 已提交
58
<img src="./docs/imgs/Readme_Related/Text_all.gif"  width = "640" height = "240" />
C
chunzhang-hub 已提交
59 60
</div>

D
Daniel Yang 已提交
61
- Many thanks to CopyRight@[ERNIE](https://github.com/PaddlePaddle/ERNIE)[LAC](https://github.com/baidu/LAC)[DDParser](https://github.com/baidu/DDParser)for the pre-trained models, you can try to train your models with them.
C
chunzhang-hub 已提交
62

G
grasswolfs 已提交
63 64


D
Daniel Yang 已提交
65
### Speech (3 models)
G
grasswolfs 已提交
66 67
- TTS speech synthesis algorithm, multiple algorithms are available.
- Many thanks to CopyRight@[Parakeet](https://github.com/PaddlePaddle/Parakeet) for the pre-trained models, you can try to train your models with Parakeet.
G
grasswolfs 已提交
68 69
- Input: `Life was like a box of chocolates, you never know what you're gonna get.`
- The synthesis effect is as follows:
G
grasswolfs 已提交
70 71 72 73 74 75 76 77
<div align="center">
<table>
    <thead>
    </thead>
    <tbody>
        <tr>
            <th>deepvoice3 </th>
            <th>fastspeech </th>
G
grasswolfs 已提交
78
            <th>transformer</th>
G
grasswolfs 已提交
79 80 81
        </tr>
        <tr>
            <th>
G
grasswolfs 已提交
82
            <a href="https://paddlehub.bj.bcebos.com/resources/deepvoice3_ljspeech-0.wav">
G
grasswolfs 已提交
83 84 85
            <img src="./docs/imgs/Readme_Related/audio_icon.png" width=250 /></a><br>
            </th>
            <th>
G
grasswolfs 已提交
86
            <a href="https://paddlehub.bj.bcebos.com/resources/fastspeech_ljspeech-0.wav">
G
grasswolfs 已提交
87 88 89
            <img src="./docs/imgs/Readme_Related/audio_icon.png" width=250 /></a><br>
            </th>
            <th>
G
grasswolfs 已提交
90
            <a href="https://paddlehub.bj.bcebos.com/resources/transformer_tts_ljspeech-0.wav">
G
grasswolfs 已提交
91 92 93 94 95 96
            <img src="./docs/imgs/Readme_Related/audio_icon.png" width=250 /></a><br>
            </th>
        </tr>
    </tbody>
</table>
</div>
G
grasswolfs 已提交
97

D
Daniel Yang 已提交
98
### Video (8 models)
G
grasswolfs 已提交
99
- Short video classification trained via large-scale video datasets, supports 3000+ tag types prediction for short Form Videos.
G
grasswolfs 已提交
100
- Many thanks to CopyRight@[PaddleVideo](https://github.com/PaddlePaddle/PaddleVideo) for the pre-trained model, you can try to train your models with PaddleVideo.
G
grasswolfs 已提交
101
- `Example: Input a short video of swimming, the algorithm can output the result of "swimming"`
G
grasswolfs 已提交
102
<div align="center">
G
grasswolfs 已提交
103
<img src="./docs/imgs/Readme_Related/Text_Video.gif"  width = "400" height = "400" />
G
grasswolfs 已提交
104
</div>
G
grasswolfs 已提交
105

Z
Zeyu Chen 已提交
106 107
## ===**Key Points**===
- All the above pre-trained models are all open source and free, and the number of models is continuously updated. Welcome **⭐Star⭐** to pay attention.
G
grasswolfs 已提交
108
<div align="center">
G
grasswolfs 已提交
109
<a href="https://github.com/PaddlePaddle/PaddleHub/stargazers">
Z
Zeyu Chen 已提交
110
    <img src="./docs/imgs/Readme_Related/star_en.png"  width = "411" height = "100" /></a>  
G
grasswolfs 已提交
111 112
</div>

G
grasswolfs 已提交
113
<a name="Welcome_joinus"></a>
Z
Zeyu Chen 已提交
114

G
grasswolfs 已提交
115
## Welcome to join PaddleHub technical group
Z
Zeyu Chen 已提交
116 117

If you have any questions during the use of the model, you can join the official WeChat group to get more efficient questions and answers, and fully communicate with developers from all walks of life. We look forward to your joining.
G
grasswolfs 已提交
118 119 120
<div align="center">
<img src="./docs/imgs/joinus.PNG"  width = "200" height = "200" />
</div>  
121
please add WeChat above and send "Hub" to the robot, the robot will invite you to join the group automatically.
G
grasswolfs 已提交
122

D
Daniel Yang 已提交
123 124 125
<a name="QuickStart"></a>
## QuickStart

126
### The installation of required components.
D
Daniel Yang 已提交
127
```python
128
# install paddlepaddle with gpu
D
Daniel Yang 已提交
129
# !pip install --upgrade paddlepaddle-gpu
130 131

# or install paddlepaddle with cpu
D
Daniel Yang 已提交
132
!pip install --upgrade paddlepaddle
133 134

# install paddlehub
D
Daniel Yang 已提交
135
!pip install --upgrade paddlehub
136
```
137

138
### The simplest cases of Chinese word segmentation.
D
Daniel Yang 已提交
139

140
```python
D
Daniel Yang 已提交
141 142 143 144 145 146 147 148 149
import paddlehub as hub

lac = hub.Module(name="lac")
test_text = ["今天是个好天气。"]

results = lac.cut(text=test_text, use_gpu=False, batch_size=1, return_tag=True)
print(results)
#{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}
```
150 151 152 153 154 155 156 157 158
### The simplest command of deploying lac service.
</div>

```python
!hub serving start -m lac
```

More model description, please refer [Models List](https://www.paddlepaddle.org.cn/hublist)

D
Daniel Yang 已提交
159
More API for transfer learning, please refer [Tutorial](https://paddlehub.readthedocs.io/en/release-v2.1/transfer_learning_index.html)
G
grasswolfs 已提交
160 161 162 163 164 165 166

<a name="License"></a>
## License
The release of this project is certified by the <a href="./LICENSE">Apache 2.0 license</a>.

<a name="Contribution"></a>
## Contribution
W
wuzewu 已提交
167 168 169 170 171 172 173 174

<p align="center">
    <a href="https://github.com/nepeplwu"><img src="https://avatars.githubusercontent.com/u/45024560?v=4" width=75 height=75></a>
    <a href="https://github.com/Steffy-zxf"><img src="https://avatars.githubusercontent.com/u/48793257?v=4" width=75 height=75></a>
    <a href="https://github.com/ZeyuChen"><img src="https://avatars.githubusercontent.com/u/1371212?v=4" width=75 height=75></a>
    <a href="https://github.com/ShenYuhan"><img src="https://avatars.githubusercontent.com/u/28444161?v=4" width=75 height=75></a>
    <a href="https://github.com/kinghuin"><img src="https://avatars.githubusercontent.com/u/11913168?v=4" width=75 height=75></a>
    <a href="https://github.com/grasswolfs"><img src="https://avatars.githubusercontent.com/u/23690325?v=4" width=75 height=75></a>
W
wuzewu 已提交
175
    <a href="https://github.com/haoyuying"><img src="https://avatars.githubusercontent.com/u/35907364?v=4" width=75 height=75></a>
W
wuzewu 已提交
176 177 178 179 180
    <a href="https://github.com/sjtubinlong"><img src="https://avatars.githubusercontent.com/u/2063170?v=4" width=75 height=75></a>
    <a href="https://github.com/KPatr1ck"><img src="https://avatars.githubusercontent.com/u/22954146?v=4" width=75 height=75></a>
    <a href="https://github.com/jm12138"><img src="https://avatars.githubusercontent.com/u/15712990?v=4" width=75 height=75></a>
    <a href="https://github.com/DesmonDay"><img src="https://avatars.githubusercontent.com/u/20554008?v=4" width=75 height=75></a>
    <a href="https://github.com/chunzhang-hub"><img src="https://avatars.githubusercontent.com/u/63036966?v=4" width=75 height=75></a>
W
wuzewu 已提交
181
    <a href="https://github.com/adaxiadaxi"><img src="https://avatars.githubusercontent.com/u/58928121?v=4" width=75 height=75></a>
W
wuzewu 已提交
182 183
    <a href="https://github.com/linshuliang"><img src="https://avatars.githubusercontent.com/u/15993091?v=4" width=75 height=75></a>
    <a href="https://github.com/eepgxxy"><img src="https://avatars.githubusercontent.com/u/15946195?v=4" width=75 height=75></a>
W
wuzewu 已提交
184
    <a href="https://github.com/linjieccc"><img src="https://avatars.githubusercontent.com/u/40840292?v=4" width=75 height=75></a>
W
wuzewu 已提交
185 186
    <a href="https://github.com/paopjian"><img src="https://avatars.githubusercontent.com/u/20377352?v=4" width=75 height=75></a>
    <a href="https://github.com/zbp-xxxp"><img src="https://avatars.githubusercontent.com/u/58476312?v=4" width=75 height=75></a>
W
wuzewu 已提交
187 188
    <a href="https://github.com/houj04"><img src="https://avatars.githubusercontent.com/u/35131887?v=4" width=75 height=75></a>
    <a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4" width=75 height=75></a>
W
wuzewu 已提交
189
    <a href="https://github.com/dxxxp"><img src="https://avatars.githubusercontent.com/u/15886898?v=4" width=75 height=75></a>
W
wuzewu 已提交
190
    <a href="https://github.com/jianganbai"><img src="https://avatars.githubusercontent.com/u/50263321?v=4" width=75 height=75></a>
W
wuzewu 已提交
191 192 193 194 195
    <a href="https://github.com/1084667371"><img src="https://avatars.githubusercontent.com/u/50902619?v=4" width=75 height=75></a>
    <a href="https://github.com/Channingss"><img src="https://avatars.githubusercontent.com/u/12471701?v=4" width=75 height=75></a>
    <a href="https://github.com/Austendeng"><img src="https://avatars.githubusercontent.com/u/16330293?v=4" width=75 height=75></a>
    <a href="https://github.com/BurrowsWang"><img src="https://avatars.githubusercontent.com/u/478717?v=4" width=75 height=75></a>
    <a href="https://github.com/cqvu"><img src="https://avatars.githubusercontent.com/u/37096589?v=4" width=75 height=75></a>
W
wuzewu 已提交
196
    <a href="https://github.com/DeepGeGe"><img src="https://avatars.githubusercontent.com/u/51083814?v=4" width=75 height=75></a>
W
wuzewu 已提交
197 198 199
    <a href="https://github.com/Haijunlv"><img src="https://avatars.githubusercontent.com/u/28926237?v=4" width=75 height=75></a>
    <a href="https://github.com/holyseven"><img src="https://avatars.githubusercontent.com/u/13829174?v=4" width=75 height=75></a>
    <a href="https://github.com/MRXLT"><img src="https://avatars.githubusercontent.com/u/16594411?v=4" width=75 height=75></a>
W
wuzewu 已提交
200
    <a href="https://github.com/Wgm-Inspur"><img src="https://avatars.githubusercontent.com/u/89008682?v=4" width=75 height=75></a>
W
wuzewu 已提交
201
    <a href="https://github.com/cclauss"><img src="https://avatars.githubusercontent.com/u/3709715?v=4" width=75 height=75></a>
W
wuzewu 已提交
202
    <a href="https://github.com/rainyfly"><img src="https://avatars.githubusercontent.com/u/22424850?v=4" width=75 height=75></a>
W
wuzewu 已提交
203 204
    <a href="https://github.com/hu-qi"><img src="https://avatars.githubusercontent.com/u/17986122?v=4" width=75 height=75></a>
    <a href="https://github.com/jayhenry"><img src="https://avatars.githubusercontent.com/u/4285375?v=4" width=75 height=75></a>
W
wuzewu 已提交
205 206
    <a href="https://github.com/hlmu"><img src="https://avatars.githubusercontent.com/u/30133236?v=4" width=75 height=75></a>
    <a href="https://github.com/yma-admin"><img src="https://avatars.githubusercontent.com/u/40477813?v=4" width=75 height=75></a>
W
wuzewu 已提交
207
    <a href="https://github.com/zl1271"><img src="https://avatars.githubusercontent.com/u/22902089?v=4" width=75 height=75></a>
W
wuzewu 已提交
208
    <a href="https://github.com/brooklet"><img src="https://avatars.githubusercontent.com/u/1585799?v=4" width=75 height=75></a>
W
wuzewu 已提交
209
    <a href="https://github.com/wj-Mcat"><img src="https://avatars.githubusercontent.com/u/10242208?v=4" width=75 height=75></a>
W
wuzewu 已提交
210 211
</p>

G
grasswolfs 已提交
212 213
We welcome you to contribute code to PaddleHub, and thank you for your feedback.

C
chunzhang-hub 已提交
214
* Many thanks to [肖培楷](https://github.com/jm12138), Contributed to street scene cartoonization, portrait cartoonization, gesture key point recognition, sky replacement, depth estimation, portrait segmentation and other modules
G
grasswolfs 已提交
215 216 217 218 219 220 221
* Many thanks to [Austendeng](https://github.com/Austendeng) for fixing the SequenceLabelReader
* Many thanks to [cclauss](https://github.com/cclauss) optimizing travis-ci check
* Many thanks to [奇想天外](http://www.cheerthink.com/),Contributed a demo of mask detection
* Many thanks to [mhlwsk](https://github.com/mhlwsk),Contributed the repair sequence annotation prediction demo
* Many thanks to [zbp-xxxp](https://github.com/zbp-xxxp),Contributed modules for viewing pictures and writing poems
* Many thanks to [zbp-xxxp](https://github.com/zbp-xxxp) and [七年期限](https://github.com/1084667371),Jointly contributed to the Mid-Autumn Festival Special Edition Module
* Many thanks to [livingbody](https://github.com/livingbody),Contributed models for style transfer based on PaddleHub's capabilities and Mid-Autumn Festival WeChat Mini Program
C
chunzhang-hub 已提交
222
* Many thanks to [BurrowsWang](https://github.com/BurrowsWang) for fixing Markdown table display problem
C
chunzhang-hub 已提交
223
* Many thanks to [huqi](https://github.com/hu-qi) for fixing readme typo
224
* Many thanks to [parano](https://github.com/parano) [cqvu](https://github.com/cqvu) [deehrlic](https://github.com/deehrlic) for contributing this feature in PaddleHub
C
chunzhang-hub 已提交
225
* Many thanks to [paopjian](https://github.com/paopjian) for correcting the wrong website address [#1424](https://github.com/PaddlePaddle/PaddleHub/issues/1424)
W
wuzewu 已提交
226 227
* Many thanks to [Wgm-Inspur](https://github.com/Wgm-Inspur) for correcting the demo errors in readme
* Many thanks to [zl1271](https://github.com/zl1271) for fixing serving docs typo