Skip to content

Questions about inference with SCFRD in TensorRT #76

Closed

Description

@lpkoh

Hi,

I am trying to convert SCFRD from Pytorch to TensorRT and run inference, and I am using this repo as reference. I am looking at #37 as a similar, previous question.

First question:
I converted SCFRD to TensorRT and the bindings that I obtained were below:
image
Only the first is the input binding. Could I clarify:

  • What is the difference between (1, x, 1) and (1, x, 4). The previous post seems to describe it as anchor center vs bbos prediction. If it is bbox prediction, could I ask where is the objectness/class score, as is typical?
  • Why are there 3 values of x?

Second question:
Would I need to pre process the image by subtracting the mean of 127.5 and standardizing by 128? My original weights and scfrd2onnx script is from https://github.com/deepinsight/insightface

Activity

  1. SthPhoenix commented on Mar 28, 2022

    @SthPhoenix
    Owner
    1. Hi! Actually 1,x,1 is scores, while 1,x,4 is bboxes.
      Anchor centers are calculated once for desired resolution and it's used internally to convert bbox predictions to actual coordinates.
      There are three set of arrays because scrfd uses the strides for detection (same as retina), which are basically a set of three scales used for detection. Each scale produces it's own predictions which are later filtered by score and NMS.

    2. Yes, you need to preprocess image.

  2. lpkoh commented on Mar 28, 2022

    @lpkoh
    Author

    Ah thank you so much for clarification!

    I was looking through the repo and I couldn't find a script to filter the predictions by score and NMS. I was wondering if you have that available for reference? Also, all three scales's predictions are to be taken together right?

  3. SthPhoenix commented on Mar 28, 2022

    @SthPhoenix
    Owner

    This is my scrfd implementation: scrfd.py
    And this is nms

    Yes, all three scales are used to select best candidates with help of thresholding and NMS.

  4. Repository owner locked and limited conversation to collaborators on Dec 22, 2022
  5. converted this issue into a discussion #107 on Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions