Code Monkey home page Code Monkey logo

face-restoration-tensorrt's People

Contributors

bychen7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

face-restoration-tensorrt's Issues

Directly convert GFPGAN1.4.onnx into GFPGAN1.4.engine and then receive API usage error when run images

I convert GFPGAN1.4.onnx by running ./convert ../models/model.onnx -s ../models/model.engine
When I run ./demo ../models/model.engine -i ../images/test.png

I receive error like:

Loaded engine size: 372 MiB [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +368, now: CPU 0, GPU 368 (MiB) [MS] Running engine with multi stream info [MS] Number of aux streams is 7 [MS] Number of total worker streams is 8 [MS] The main stream provided by execute/enqueue calls is the first worker stream [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +437, now: CPU 0, GPU 805 (MiB) CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See "Lazy Loading" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading 3: Cannot find binding of given name: output 3: [engine.cpp::getUserRegion::1312] Error Code 3: Internal Error (call of getBindingDataType with invalid bindingIndex -1) 3: [executionContext.cpp::enqueueInternal::795] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::enqueueInternal::795, condition: bindings[x] || nullBindingOK ) Cuda failure: 1 Aborted (core dumped)

I also change from 256 to 512:

static const int INPUT_H = 256;
static const int INPUT_W = 256;

Any suggestion if I want to run this with GFPGAN 1.4.
Thanks in advance.

Alternative Model download links

Hi, I'm not able to download models from Baidu (geo restricion). Could you please share the model using Google Drive?

Thank you in advance!

Which cuda and tensorrt verison are you using in fact?

I use cuda11.2 and tensorrt7.2.3.4 . But there are some errors.
Such as no member named ‘buildSerializedNetwork’
convert.cpp:37:45: error: ‘class nvinfer1::IBuilder’ has no member named ‘buildSerializedNetwork’
IHostMemory* serializedModel = builder->buildSerializedNetwork(*network, *c

how this model supports dynamic batch using tensorRT?

Thanks, It's a great project. How this model to support dynamic batch. I set the model input first dim -1, and change code to create engine of tensorRT with method of dynamic shape . but I get error " [executionContext.cpp::validateInputBindings::1838] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::validateInputBindings::1838, condition: profileMaxDims.d[i] >= dimensions.d[i]. Supplied binding dimension [2,512,512,3] for bindings[0] exceed min ~ max range at index 0, maximum dimension in profile is 1, minimum dimension in profile is 1, but supplied dimension is 2" during inference .

Cuda failure: 700

I am getting a 700 error with the model-512.onnx model.
However the model.onnx works without any issue.

Anyone knows why or can reproduce this?

Will you support batch operation?

Thank you very much for your great work and sharing. Will there be any opportunity to support batch processing in the future to further improve the inference speed for a single image? Thanks again.

when will it support more

Great job! when will it support face detection, face alignment, face parsing, and more, looking forward to it

is it possible to support 512x512

Great job!
the speed is much faster than pytorch origin model.
it seams the input/output size is 256x256,
is it possible to support 512x512 as the gfpgan officical release model?

Which model has better quality for Teeth and mouth regions?

I utilized the model weights provided by the repository. During the process of facial restoration and video generation, I observed noticeable pixelation effects on the teeth. My first question is about whether the model in the repository is GPEN or GFPGAN.
Second, to achieve an enhanced quality in facial restoration, particularly for teeth and mouth regions, which model would you recommend?

Thanks in advance.

onnx to tensorrt

I have successfully converted to ONNX, but I'm getting an error when converting to TensorRT. What should I do?
[TRT] [E] /ecd1/ecd1.0/ecd1.0.0/Conv: two inputs (data and weights) are allowed only in explicit-quantization mode.
In node 52 (parseGraph): INVALID_NODE: Invalid Node - /ecd1/ecd1.0/ecd1.0.0/Conv
/ecd1/ecd1.0/ecd1.0.0/Conv: two inputs (data and weights) are allowed only in explicit-quantization mode.

onnx model

Hi @bychen7 ~ thx for sharing this work. Could you share the way of converting GPEN torch model to onnx model please?

encountering error while loading shared libraries: libnvinfer_plugin.so.8 when convert onnx model

Hi. Thanks for the great work. I am using a ubuntu machine with GPU and following your tutorial from step 1 to step 4. However, I encounter some problem when I am trying to run
./convert ../models/model.onnx -s ../models/model.engine
and return
error while loading shared libraries: libcublas.so.12: cannot open shared object file: No such file or directory

How do I solve this problem? Welcome to any advice.
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.