English | [简体中文](README_ch.md)

QuickStart | Tutorial | Models List | Demos

------------------------------------------------------------------------------------------

## Introduction and Features - PaddleHub aims to provide developers with rich, high-quality, and directly usable pre-trained models. - **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. - **Quick Model Prediction**: Model prediction can be realized through a few lines of scripts to quickly experience the model effect. - **Model As Service**: one-line command to build deep learning model API service deployment capabilities. - **Easy-to-use Transfer Learning**: few lines of code to complete the transfer-learning task such as image classification and text classification based on high quality pre-trained models. - **Cross-platform**: support Linux, Windows, MacOS and other operating systems. ### Recent updates - **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) - **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) ## Visualization Demo [[More]](./docs/docs_en/visualization.md) ### **Computer Vision (161 models)**
- 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. ### **Natural Language Processing (129 models)**
- 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. ### Speech (3 models) - 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. - Input: `Life was like a box of chocolates, you never know what you're gonna get.` - The synthesis effect is as follows:
deepvoice3 fastspeech transformer



### Video (8 models) - Short video classification trained via large-scale video datasets, supports 3000+ tag types prediction for short Form Videos. - Many thanks to CopyRight@[PaddleVideo](https://github.com/PaddlePaddle/PaddleVideo) for the pre-trained model, you can try to train your models with PaddleVideo. - `Example: Input a short video of swimming, the algorithm can output the result of "swimming"`
## ===**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.
## Welcome to join PaddleHub technical group 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.
please add WeChat above and send "Hub" to the robot, the robot will invite you to join the group automatically. ## QuickStart ```python !pip install --upgrade paddlepaddle -i https://mirror.baidu.com/pypi/simple !pip install --upgrade paddlehub -i https://mirror.baidu.com/pypi/simple 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']} ``` More API for transfer learning, please refer [Tutorial](https://paddlehub.readthedocs.io/en/release-v2.1/transfer_learning_index.html) ## License The release of this project is certified by the Apache 2.0 license. ## Contribution

We welcome you to contribute code to PaddleHub, and thank you for your feedback. * 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 * 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 * Many thanks to [BurrowsWang](https://github.com/BurrowsWang) for fixing Markdown table display problem * Many thanks to [huqi](https://github.com/hu-qi) for fixing readme typo * Many thanks to [parano](https://github.com/parano) [cqvu](https://github.com/cqvu) [deehrlic](https://github.com/deehrlic) for contributing this feature in PaddleHub