harisreedhar / face-upscalers-onnx Goto Github PK
View Code? Open in Web Editor NEWONNX-Powered Inference for State-of-the-Art Face Upscalers
ONNX-Powered Inference for State-of-the-Art Face Upscalers
How do I use the codeformer.onnx model.
from pth to onnx?
I try it ,but the resout of pth and onnx is different/
can u share your code?
I'm planning to create an app in Unity3D using barracuda. the model size seems larger than expected. Can you help me to create a low size models like tflite?
I have tested gfpganv1.4.onnx on my custom image. However, it leads to a quality decrease (compared with gfpganv1.4.pth).
Thus, I want to know the reasons and figure out how to achieve the same quality as gfpganv1.4.pth. My test code and results are attached below.
# gfpgan v1.4 pytorch
from gfpgan import GFPGANer
def load_sr():
run_params = GFPGANer(
model_path="checkpoints/GFPGANv1.4.pth",
upscale=1,
arch="clean",
channel_multiplier=2,
bg_upsampler=None,
)
return run_params
def upscale(image, properties):
_, _, output = properties.enhance(
image, has_aligned=False, only_center_face=False, paste_back=True
)
return output
# inference with onnx
from GFPGAN.GFPGAN import GFPGAN
def load_sr_onnx():
gfpganv14 = GFPGAN(model_path="GFPGANv1.4.onnx", device="cuda")
return gfpganv14
def upscale_onnx(image, model):
return model.enhance(image)
I need that, because my GPU is AMD, and only works with NCNN, and with CPU only takes a LOT time to do an upscale.
I've tried to convert any of this models with chaiNNer
from ONNX or PTH to NCNN without success.
Previously was able to convert some models from PTH or ONNX.
I don't know nothing about to code, maybe a simple bash script sometimes.
@harisreedhar, thanks so much for sharing the models and code!
for sharing code and converted models.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.