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.
- Host: GitHub
- URL: https://github.com/songquanpeng/pytorch-deployment
- Owner: songquanpeng
- Created: 2021-08-20T01:53:57.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-10-08T13:35:48.000Z (over 3 years ago)
- Last Synced: 2025-03-28T17:11:10.579Z (about 1 year ago)
- Topics: flask-application, pytorch-template, stargan-v2
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 64
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyTorch Deployment
> A template for rapid deployment of PyTorch models.
点击以展开中文 README
## 功能
+ [x] API.
+ [x] Web 前端.
+ [x] 支持图像转换模型.
+ [ ] 支持图像分类模型.
+ [ ] 支持图像生成模型.
## 演示

## 部署步骤
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
