SthPhoenix / InsightFace-REST

InsightFace REST API for easy deployment of face recognition services with TensorRT in Docker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use SCRFD detect() in latest insightface?

antongonz opened this issue · comments

Hello,

I want to be able to call the detect here:

https://github.com/deepinsight/insightface/blob/6baaa7bcaf1a1624feec75270022e2dafeb6883b/detection/scrfd/tools/scrfd.py

I have this code:

detector = insightface.model_zoo.model_zoo.get_model('insightface/models/antelope/scrfd_10g_bnkps.onnx')
detector.prepare(0,input_size=(640,640))
bboxes,kpss = detector.detect(img,0.5,None,1,'default')

But this no longer works in the latest version.

Thanks!

Hi! You can use snippet I have provided here as reference

Though I should mention that code you provided refers to original repo, which is quite different from code provided in this repo. I have committed some changes there, but high level abstractions like model_zoo are maintained mostly by deepinsight team, so you'd better check their documentation for changes.