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

C
chunzhang-hub 已提交
3
<p align="center">
Z
Zeyu Chen 已提交
4
 <img src="./docs/imgs/paddlehub_logo.jpg" align="middle" width="400" />
D
Daniel Yang 已提交
5 6
<p align="center">
<div align="center">  
Z
Zeyu Chen 已提交
7
  <h3> <a href=#QuickStart> Quick Start </a> | <a href="./modules"> Model List </a> | <a href=#demos> Demos </a> </h3>
D
Daniel Yang 已提交
8
</div>
Z
Zeyu Chen 已提交
9

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

W
wuzewu 已提交
12
<p align="center">
W
wuzewu 已提交
13
    <a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache%202-dfd.svg"></a>
W
wuzewu 已提交
14
    <a href=""><img src="https://img.shields.io/badge/python-3.6.2+-aff.svg"></a>
W
wuzewu 已提交
15 16
    <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>
W
wuzewu 已提交
17 18
    <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/stargazers"><img src="https://img.shields.io/github/stars/PaddlePaddle/PaddleHub?color=ccf"></a>
A
AK391 已提交
19
    <a href="https://huggingface.co/PaddlePaddle"><img src="https://img.shields.io/badge/%F0%9F%A4%97-Hugging%20Face-blue"></a>
W
wuzewu 已提交
20
</p>
C
chunzhang-hub 已提交
21

G
grasswolfs 已提交
22

D
DanielYang 已提交
23
## ⭐Features
Z
Zeyu Chen 已提交
24
- **📦400+ AI Models**: Rich, high-quality AI models, including CV, NLP, Speech, Video and Cross-Modal. 
Z
Zeyu Chen 已提交
25 26
- **🧒Easy to Use**: 3 lines of code to predict 400+ AI models.
- **💁Model As Service**: Easy to serve model with only one line of command.
Z
Zeyu Chen 已提交
27
- **💻Cross-platform**: Support Linux, Windows and MacOS.
G
grasswolfs 已提交
28

D
DanielYang 已提交
29
### 💥Recent Updates
Z
Zeyu Chen 已提交
30
- **🔥2022.08.19:** The v2.3.0 version is released 🎉
Z
Zeyu Chen 已提交
31 32
  -  Supports [**ERNIE-ViLG**](./modules/image/text_to_image/ernie_vilg)([HuggingFace Space Demo](https://huggingface.co/spaces/PaddlePaddle/ERNIE-ViLG))
  -  Supports [**Disco Diffusion (DD)**](./modules/image/text_to_image/disco_diffusion_clip_vitb32) and [**Stable Diffusion (SD)**](./modules/image/text_to_image/stable_diffusion)
D
DanielYang 已提交
33

Z
Zeyu Chen 已提交
34
- **2022.02.18:** Release models to HuggingFace [PaddlePaddle Space](https://huggingface.co/PaddlePaddle)
C
chunzhang-hub 已提交
35

Z
Zeyu Chen 已提交
36
- For more previous release please refer to [**PaddleHub Release Note**](./docs/docs_en/release.md)
G
grasswolfs 已提交
37

D
DanielYang 已提交
38 39

<a name="demos"></a>
D
DanielYang 已提交
40
## 🌈Visualization Demo
C
chenjian 已提交
41

Q
qiceng 已提交
42 43 44 45 46




#### 🏜️ [Text-to-Image Models](https://github.com/PaddlePaddle/PaddleHub/tree/develop/modules/image/text_to_image)
C
chenjian 已提交
47
<div align="center">
Q
qiceng 已提交
48 49 50 51 52 53 54
<table>
    <tr>
        <td><img src="https://user-images.githubusercontent.com/59186797/200235049-fefa7642-6c4c-4f93-bd84-3b36a8a80595.gif"  width = "100%"></td>
        <td><img src="https://user-images.githubusercontent.com/59186797/200244625-77310db8-c9b2-4293-8fe9-c9aae27ee462.gif" width = "80%"></td>
        <td><img src="https://user-images.githubusercontent.com/59186797/200245387-daaf576d-8224-4937-82b8-27e31ee2df16.gif" width = "100%"></td>
    <tr>
    <tr>
G
GT-Zhang 已提交
55
        <td align="center"><a href="https://github.com/PaddlePaddle/PaddleHub/tree/develop/modules/image/text_to_image/ernie_vilg">Wenxin Big Models</a></td>
Q
qiceng 已提交
56 57 58 59 60 61 62 63 64 65 66 67 68
        <td align="center"><a href="https://github.com/PaddlePaddle/PaddleHub/tree/develop/modules/image/text_to_image/stable_diffusion">Stable_Diffusion series</a></td>
        <td align="center"><a href="https://github.com/PaddlePaddle/PaddleHub/tree/develop/modules/image/text_to_image/disco_diffusion_ernievil_base">Disco Diffusion series</a></td>
        
<tr>

<tr>
        <td align="center">Include ERNIE-ViLG, ERNIE-ViL, ERNIE 3.0 Zeus, supports applications such as text-to-image, writing essays, summarization, couplets, question answering, writing novels and completing text。</td>
        <td align="center">Supports functions such as text_to_image, image_to_image, inpainting, ACGN external service, etc.</td>
        <td align="center">Support Chinese and English input</td>
        
<tr>

</table>
C
chenjian 已提交
69 70
</div>

Q
qiceng 已提交
71 72 73



D
DanielYang 已提交
74
#### 👓 [Computer Vision Models](./modules#Image)
G
grasswolfs 已提交
75
<div align="center">
D
Daniel Yang 已提交
76
<img src="./docs/imgs/Readme_Related/Image_all.gif"  width = "530" height = "400" />
G
grasswolfs 已提交
77
</div>
G
grasswolfs 已提交
78

C
chenjian 已提交
79

Z
Zeyu Chen 已提交
80
- 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 已提交
81

C
chunzhang-hub 已提交
82

D
DanielYang 已提交
83
#### 🎤 [Natural Language Processing Models](./modules#Text)
C
chunzhang-hub 已提交
84
<div align="center">
D
Daniel Yang 已提交
85
<img src="./docs/imgs/Readme_Related/Text_all.gif"  width = "640" height = "240" />
C
chunzhang-hub 已提交
86 87
</div>

D
Daniel Yang 已提交
88
- 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 已提交
89

G
grasswolfs 已提交
90 91


D
DanielYang 已提交
92
#### 🎧 [Speech Models](./modules#Audio)
K
KP 已提交
93 94 95 96
<div align="center">
<table>
    <thead>
        <tr>
K
KP 已提交
97 98
            <th width=250> Input Audio  </th>
            <th width=550> Recognition Result  </th>
K
KP 已提交
99 100 101 102 103 104
        </tr>
    </thead>
    <tbody>
        <tr>
            <td align = "center">
            <a href="https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav" rel="nofollow">
K
KP 已提交
105
                    <img align="center" src="./docs/imgs/Readme_Related/audio_icon.png" width=250 ></a><br>
K
KP 已提交
106 107 108 109 110 111
            </td>
            <td >I knocked at the door on the ancient side of the building.</td>
            </tr>
            <tr>
            <td align = "center">
            <a href="https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav" rel="nofollow">
K
KP 已提交
112
                    <img align="center" src="./docs/imgs/Readme_Related/audio_icon.png" width=250></a><br>
K
KP 已提交
113 114 115 116 117 118
            </td>
            <td>我认为跑步最重要的就是给我带来了身体健康。</td>
        </tr>
    </tbody>
</table>
</div>
G
grasswolfs 已提交
119 120 121 122 123 124
<div align="center">
<table>
    <thead>
    </thead>
    <tbody>
        <tr>
D
DanielYang 已提交
125 126
            <th>Input Text </th>
            <th>Output Audio </th>
G
grasswolfs 已提交
127 128
        </tr>
        <tr>
D
DanielYang 已提交
129
            <th>Life was like a box of chocolates, you never know what you're gonna get.</th>
G
grasswolfs 已提交
130
            <th>
G
grasswolfs 已提交
131
            <a href="https://paddlehub.bj.bcebos.com/resources/fastspeech_ljspeech-0.wav">
G
grasswolfs 已提交
132 133 134 135 136 137
            <img src="./docs/imgs/Readme_Related/audio_icon.png" width=250 /></a><br>
            </th>
        </tr>
    </tbody>
</table>
</div>
G
grasswolfs 已提交
138

K
KP 已提交
139 140
- Many thanks to CopyRight@[PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech) for the pre-trained models, you can try to train your models with PaddleSpeech.

G
grasswolfs 已提交
141

D
DanielYang 已提交
142 143
### ⭐ Thanks for Your Star 
- 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 已提交
144
<div align="center">
G
grasswolfs 已提交
145
<a href="https://github.com/PaddlePaddle/PaddleHub/stargazers">
Z
Zeyu Chen 已提交
146
    <img src="./docs/imgs/Readme_Related/star_en.png"  width = "411" height = "100" /></a>  
G
grasswolfs 已提交
147 148
</div>

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

D
DanielYang 已提交
151
## 🍻Welcome to join PaddleHub technical group
Z
Zeyu Chen 已提交
152

D
DanielYang 已提交
153
- 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 已提交
154
<div align="center">
A
AK391 已提交
155
<img src="./docs/imgs/joinus.PNG"  width = "200" height = "200" />
D
DanielYang 已提交
156 157
</div> 

D
DanielYang 已提交
158
- please add WeChat above and send "Hub" to the robot, the robot will invite you to join the group automatically.
G
grasswolfs 已提交
159

D
Daniel Yang 已提交
160
<a name="QuickStart"></a>
D
DanielYang 已提交
161
## ✈️QuickStart
D
Daniel Yang 已提交
162

D
DanielYang 已提交
163
#### 🚁The installation of required components.
D
Daniel Yang 已提交
164
```python
165
# install paddlepaddle with gpu
D
Daniel Yang 已提交
166
# !pip install --upgrade paddlepaddle-gpu
167 168

# or install paddlepaddle with cpu
D
Daniel Yang 已提交
169
!pip install --upgrade paddlepaddle
170 171

# install paddlehub
D
Daniel Yang 已提交
172
!pip install --upgrade paddlehub
173
```
174

D
DanielYang 已提交
175
#### 🛫The simplest cases of Chinese word segmentation.
D
Daniel Yang 已提交
176

177
```python
D
Daniel Yang 已提交
178 179 180 181 182 183 184 185 186
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']}
```
D
DanielYang 已提交
187
#### 🛰️The simplest command of deploying lac service.
188 189 190 191 192 193
</div>

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

D
DanielYang 已提交
194
- 📣More model description, please refer [Models List](./modules)
G
grasswolfs 已提交
195 196

<a name="License"></a>
D
DanielYang 已提交
197
## 📚License
G
grasswolfs 已提交
198 199 200
The release of this project is certified by the <a href="./LICENSE">Apache 2.0 license</a>.

<a name="Contribution"></a>
D
DanielYang 已提交
201
## 👨‍👨‍👧‍👦Contribution
W
wuzewu 已提交
202 203 204 205 206 207 208 209

<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 已提交
210
    <a href="https://github.com/haoyuying"><img src="https://avatars.githubusercontent.com/u/35907364?v=4" width=75 height=75></a>
W
wuzewu 已提交
211 212 213 214 215
    <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 已提交
216
    <a href="https://github.com/rainyfly"><img src="https://avatars.githubusercontent.com/u/22424850?v=4" width=75 height=75></a>
W
wuzewu 已提交
217
    <a href="https://github.com/adaxiadaxi"><img src="https://avatars.githubusercontent.com/u/58928121?v=4" width=75 height=75></a>
W
wuzewu 已提交
218
    <a href="https://github.com/linjieccc"><img src="https://avatars.githubusercontent.com/u/40840292?v=4" width=75 height=75></a>
W
wuzewu 已提交
219 220 221 222
    <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>
    <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 已提交
223
    <a href="https://github.com/houj04"><img src="https://avatars.githubusercontent.com/u/35131887?v=4" width=75 height=75></a>
W
wuzewu 已提交
224
    <a href="https://github.com/Wgm-Inspur"><img src="https://avatars.githubusercontent.com/u/89008682?v=4" width=75 height=75></a>
W
wuzewu 已提交
225
    <a href="https://github.com/AK391"><img src="https://avatars.githubusercontent.com/u/81195143?v=4" width=75 height=75></a>
W
wuzewu 已提交
226
    <a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4" width=75 height=75></a>
W
wuzewu 已提交
227
    <a href="https://github.com/dxxxp"><img src="https://avatars.githubusercontent.com/u/15886898?v=4" width=75 height=75></a>
W
wuzewu 已提交
228
    <a href="https://github.com/jianganbai"><img src="https://avatars.githubusercontent.com/u/50263321?v=4" width=75 height=75></a>
W
wuzewu 已提交
229 230 231 232 233
    <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 已提交
234
    <a href="https://github.com/DeepGeGe"><img src="https://avatars.githubusercontent.com/u/51083814?v=4" width=75 height=75></a>
W
wuzewu 已提交
235 236 237 238 239
    <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>
    <a href="https://github.com/cclauss"><img src="https://avatars.githubusercontent.com/u/3709715?v=4" width=75 height=75></a>
    <a href="https://github.com/hu-qi"><img src="https://avatars.githubusercontent.com/u/17986122?v=4" width=75 height=75></a>
W
wuzewu 已提交
240
    <a href="https://github.com/itegel"><img src="https://avatars.githubusercontent.com/u/8164474?v=4" width=75 height=75></a>
W
wuzewu 已提交
241
    <a href="https://github.com/jayhenry"><img src="https://avatars.githubusercontent.com/u/4285375?v=4" width=75 height=75></a>
W
wuzewu 已提交
242
    <a href="https://github.com/hlmu"><img src="https://avatars.githubusercontent.com/u/30133236?v=4" width=75 height=75></a>
W
wuzewu 已提交
243 244
    <a href="https://github.com/shinichiye"><img src="https://avatars.githubusercontent.com/u/76040149?v=4" width=75 height=75></a>
    <a href="https://github.com/will-jl944"><img src="https://avatars.githubusercontent.com/u/68210528?v=4" width=75 height=75></a>
W
wuzewu 已提交
245
    <a href="https://github.com/yma-admin"><img src="https://avatars.githubusercontent.com/u/40477813?v=4" width=75 height=75></a>
W
wuzewu 已提交
246
    <a href="https://github.com/zl1271"><img src="https://avatars.githubusercontent.com/u/22902089?v=4" width=75 height=75></a>
W
wuzewu 已提交
247
    <a href="https://github.com/brooklet"><img src="https://avatars.githubusercontent.com/u/1585799?v=4" width=75 height=75></a>
W
wuzewu 已提交
248
    <a href="https://github.com/wj-Mcat"><img src="https://avatars.githubusercontent.com/u/10242208?v=4" width=75 height=75></a>
W
wuzewu 已提交
249 250
</p>

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

C
chunzhang-hub 已提交
253
* 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 已提交
254 255 256 257 258 259 260
* 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 已提交
261
* Many thanks to [BurrowsWang](https://github.com/BurrowsWang) for fixing Markdown table display problem
C
chunzhang-hub 已提交
262
* Many thanks to [huqi](https://github.com/hu-qi) for fixing readme typo
263
* 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 已提交
264
* Many thanks to [paopjian](https://github.com/paopjian) for correcting the wrong website address [#1424](https://github.com/PaddlePaddle/PaddleHub/issues/1424)
W
wuzewu 已提交
265
* Many thanks to [Wgm-Inspur](https://github.com/Wgm-Inspur) for correcting the demo errors in readme, and updating the RNN illustration in the text classification and sequence labeling demo
W
wuzewu 已提交
266
* Many thanks to [zl1271](https://github.com/zl1271) for fixing serving docs typo
W
wuzewu 已提交
267 268
* Many thanks to [AK391](https://github.com/AK391) for adding the webdemo of UGATIT and deoldify models in Hugging Face spaces
* Many thanks to [itegel](https://github.com/itegel) for fixing quick start docs typo
K
KP 已提交
269
* Many thanks to [AK391](https://github.com/AK391) for adding the webdemo of Photo2Cartoon model in Hugging Face spaces