Giter Site home page Giter Site logo

zhongyunuestc / paddlehub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paddlepaddle/paddlehub

0.0 0.0 0.0 26.27 MB

A toolkit for managing pretrained models of PaddlePaddle and helping user getting started with transfer learning more efficiently. (『飞桨』预训练模型管理和迁移学习工具 )

Home Page: http://hub.paddlepaddle.org.cn

License: Apache License 2.0

Shell 0.35% Python 99.65%

paddlehub's Introduction

PaddleHub

Build Status License Version

PaddleHub是基于PaddlePaddle生态下的预训练模型管理和迁移学习工具,可以结合预训练模型更便捷地开展迁移学习工作。通过PaddleHub,您可以:

  • 便捷地获取PaddlePaddle生态下的所有预训练模型,涵盖了图像分类、目标检测、词法分析、语义模型、情感分析、语言模型、视频分类、图像生成八类主流模型。
  • 通过PaddleHub Fine-tune API,结合少量代码即可完成大规模预训练模型的迁移学习,具体Demo可参考以下链接:
  • PaddleHub引入『模型即软件』的设计理念,支持通过Python API或者命令行工具,一键完成预训练模型地预测,更方便的应用PaddlePaddle模型库。

环境依赖

  • Python==2.7 or Python>=3.5
  • PaddlePaddle>=1.4.0

除上述依赖外,PaddleHub的预训练模型和预置数据集需要连接服务端进行下载,请确保机器可以正常访问网络

答疑

当安装或者使用遇到问题时,可以通过FAQ查找解决方案。 如果在FAQ中没有找到解决方案,欢迎您将问题和bug报告以Github Issues的形式提交给我们,我们会第一时间进行跟进

安装

pip安装方式如下:

$ pip install paddlehub

快速体验

安装成功后,执行下面的命令,可以快速体验PaddleHub无需代码、一键预测的命令行功能:

示例一

使用词法分析模型LAC进行分词

$ hub run lac --input_text "今天是个好日子"
[{'word': ['今天', '', '', '好日子'], 'tag': ['TIME', 'v', 'q', 'n']}]

示例二

使用情感分析模型Senta对句子进行情感预测

$ hub run senta_bilstm --input_text "今天是个好日子"
[{'text': '今天是个好日子', 'sentiment_label': 2, 'sentiment_key': 'positive', 'positive_probs': 0.6065, 'negative_probs': 0.3935}]

示例三

使用目标检测模型 SSD/YOLO v3/Faster RCNN 对图片进行目标检测

$ wget --no-check-certificate https://paddlehub.bj.bcebos.com/resources/test_object_detection.jpg
$ hub run ssd_mobilenet_v1_pascal --input_path test_object_detection.jpg
$ hub run yolov3_coco2017 --input_path test_object_detection.jpg
$ hub run faster_rcnn_coco2017 --input_path test_object_detection.jpg

SSD检测结果

除了上述三类模型外,PaddleHub还发布了语言模型、语义模型、图像分类、生成模型、视频分类等业界主流模型,更多PaddleHub已经发布的模型,请前往 http://hub.paddlepaddle.org.cn 查看

教程

API

迁移学习

自定义迁移任务

在线体验

我们在AI Studio和AIBook上提供了IPython NoteBook形式的demo,您可以直接在平台上在线体验,链接如下:

版权和许可证

PaddleHub由Apache-2.0 license提供

paddlehub's People

Contributors

nepeplwu avatar zeyuchen avatar steffy-zxf avatar austendeng avatar cclauss avatar yma-admin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.