deepinsight / deepinsight/insightface

Multiple output bindings for TRT SCFRD

Open
#1,952 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29.7k
Forks
6.1k
PR merge metrics
No merged PRs in 30d

Description

Hi, I have converted SCFRD_10g.pt to onnx and then to TensorRT. When I run it and check the binding shapes, I more binding outputs than input/output.
```
for binding in fd_engine:
print(fd_engine.get_binding_shape(binding))
if fd_engine.binding_is_input(binding):
print('input')
fd_device_input = cuda.mem_alloc(trt.volume(fd_engine.get_binding_shape(binding)) * fd_engine.max_batch_size * np.dtype(np.float32).itemsize)
else:
print('not input')
fd_host_output = cuda.pagelocked_empty(trt.volume(fd_engine.get_binding_shape(binding)) * fd_engine.max_batch_size, dtype=np.float32)
fd_device_output = cuda.mem_alloc(fd_host_output.nbytes)
```
The output is as follows:
![image](https://user-images.githubusercontent.com/48631399/160373793-04bb57d3-63fd-4502-8717-7dbf8a24f45f.png)
The input size is correct. As for the rest, I expected to have one output, but received many. When I tested conversion (I am using TensorRT 8.0.1) with Yolov5sface, I obtained:
![image](https://user-images.githubusercontent.com/48631399/160374102-ef11e245-7ec3-4388-9eef-a80bf0807575.png)
May I check why this is so?

Referring to the link here (https://github.com/SthPhoenix/InsightFace-REST/issues/37), it says that it is anchor center and bbox prediction. Is this correct? And why are there three different values?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.