SthPhoenix / InsightFace-REST

InsightFace REST API for easy deployment of face recognition services with TensorRT in Docker.
Apache License 2.0
487 stars 118 forks source link

How to use SCRFD detect() in latest insightface? #108

Open antongonz opened 1 year ago

antongonz commented 1 year ago

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!

SthPhoenix commented 1 year ago

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.