HamadYA / GhostFaceNets

This repository contains the official implementation of GhostFaceNets, State-Of-The-Art lightweight face recognition models.
https://ieeexplore.ieee.org/document/10098610
MIT License
194 stars 38 forks source link

Tensorrt of ghostFaceNets #14

Closed robosina closed 1 year ago

robosina commented 1 year ago

I am attempting to develop TensorRT versions of the GhostfaceNet model, but unfortunately, I am encountering incorrect results. I have successfully generated identical embeddings using Python, ONNX in Python, and ONNX runtime in C++. However, the TensorRT C++ embedding is yielding completely different results. Have you ever experienced similar issues when implementing these models in TensorRT?

HamadYA commented 1 year ago

I am attempting to develop TensorRT versions of the GhostfaceNet model, but unfortunately, I am encountering incorrect results. I have successfully generated identical embeddings using Python, ONNX in Python, and ONNX runtime in C++. However, the TensorRT C++ embedding is yielding completely different results. Have you ever experienced similar issues when implementing these models in TensorRT?

Hi, I did not try to use TensorRT with the models, but I may can help, what kind of issues are you facing?

robosina commented 1 year ago

I am attempting to develop TensorRT versions of the GhostfaceNet model, but unfortunately, I am encountering incorrect results. I have successfully generated identical embeddings using Python, ONNX in Python, and ONNX runtime in C++. However, the TensorRT C++ embedding is yielding completely different results. Have you ever experienced similar issues when implementing these models in TensorRT?

Hi, I did not try to use TensorRT with the models, but I may can help, what kind of issues are you facing?

I appreciate your response. What seems to be the issue is that the embedding vectors being returned from the model are not aligning with those obtained from the Python or C++ ONNX runtime counterparts. To rule out the possibility that there might be an error in the preprocessing steps, I've conducted an experiment where I fed a black image to the network on the Python side. This essentially feeds a value close to -1 into the network. Similarly, in TensorRT, I utilized the cudaMemSet function to set the 1x112x112x3 float value close to -1, and then fed it to the network. Unfortunately, the results obtained are not as expected.

HamadYA commented 1 year ago

bedding vectors being returned from the model are not aligning with those obtained from the Python or C++ ONNX runtime counterparts. To rule out the possibility that there might be an error in the preprocessing steps, I've conducted

Unfortunately, I cannot help in this matter as I did not convert the model to TensorRT. Do you have any working code and the environment that I can view to see if I can solve the issue?

robosina commented 1 year ago

It is fixed thanks

Hab2Verer commented 9 months ago

@robosina can you share your code or approach to convert the model to ONNX ?