https://github.com/ryanking13/style-transfer-pyodide
Deep learning inference example with Pyodide + OpenCV
https://github.com/ryanking13/style-transfer-pyodide
pyodide
Last synced: 6 months ago
JSON representation
Deep learning inference example with Pyodide + OpenCV
- Host: GitHub
- URL: https://github.com/ryanking13/style-transfer-pyodide
- Owner: ryanking13
- Created: 2022-04-25T06:08:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-29T02:17:47.000Z (about 4 years ago)
- Last Synced: 2025-02-02T18:27:18.388Z (over 1 year ago)
- Topics: pyodide
- Language: Vue
- Homepage: https://ryanking13.github.io/style-transfer-pyodide
- Size: 2.56 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# style-transfer-pyodide
A simple proof-of-concept of running deep learning model in the browser using Pyodide + OpenCV DNN module.
Codes are based on:
- [fast-neural-style-pytorch](https://github.com/rrmina/fast-neural-style-pytorch)
- [Nuxt.js web worker example](https://github.com/nuxt/nuxt.js/tree/dev/examples/web-worker)
## Usage
### Running web application
```sh
cd style-transfer-pyodide
npm install
npm run dev
```
### (optional) Converting torch model to onnx model
```sh
git submodule init && git submodule update
cd python
pip install -r requirements.txt
python convert.py # convert torch model to onnx
python stylize.py # run inference with OpenCV DNN module (for test)
```