xx025 / Horse-to-Zebra

A simple project to convert Pytorch model to ONXX model and deploy it with Gradio.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Horse to Zebra

toy project pytorch onxx gradio gan horse2zebra cycleGAN

A simple project to convert Pytorch model to ONXX model and deploy it with Gradio.

0. Install Requirements

conda create -n horse2zebra python=3.10
pip install torch torchvision gradio numpy onnxruntime-gpu

Note: cuda' and cudnn' are required for onnxruntime-gpu to work with GPU.

1. Pytorch Model Convert ONXX

Model from Deep Learning with PyTorch

python convert2onxx.py

2. Deploy ONXX Model With Gradio

python app.py

3. Test

img.png

About

A simple project to convert Pytorch model to ONXX model and deploy it with Gradio.


Languages

Language:Python 100.0%