An open API service indexing awesome lists of open source software.

https://github.com/songquanpeng/pytorch-deployment

A template for rapid deployment of PyTorch models.
https://github.com/songquanpeng/pytorch-deployment

flask-application pytorch-template stargan-v2

Last synced: about 1 year ago
JSON representation

A template for rapid deployment of PyTorch models.

Awesome Lists containing this project

README

          

# PyTorch Deployment
> A template for rapid deployment of PyTorch models.

点击以展开中文 README

## 功能
+ [x] API.
+ [x] Web 前端.
+ [x] 支持图像转换模型.
+ [ ] 支持图像分类模型.
+ [ ] 支持图像生成模型.

## 演示
![starganv2_afhq](https://user-images.githubusercontent.com/39998050/155641683-fbef7d4a-7a44-4f60-bf96-7df79a02c0ee.gif)

## 部署步骤
1. 安装依赖:`pip install -r requirements.txt`
2. 启动服务,你有以下选择:
1. `flask run -p 3000`,注意该方式性能较差。
2. 使用 Gunicorn:
1. 安装 Gunicorn:`pip install gunicorn`
2. 启动应用:`gunicorn -b 127.0.0.1:3009 app:app`

请注意,模型的权重是从 Github 上下载的,如果你的服务器无法正常访问 Github,请手动下载权重并放到 data 文件夹下。

目前内置的模型:
+ starganv2_afhq.ckpt:https://github.com/songquanpeng/pytorch-deployment/releases/download/v0.1.0/starganv2_afhq.ckpt

## Features
+ [x] API.
+ [x] Web frontend.
+ [x] Support image translation models.
+ [ ] Support image classification models.
+ [ ] Support image generation models.

## Demo
![starganv2_afhq](https://user-images.githubusercontent.com/39998050/155641683-fbef7d4a-7a44-4f60-bf96-7df79a02c0ee.gif)