leondgarse / Keras_insightface

Insightface Keras implementation
MIT License
230 stars 56 forks source link

Error in video_test.py #122

Closed HamadYA closed 9 months ago

HamadYA commented 9 months ago

Hi, I wanted to thank you as I used your code as a baseline for many of my projects and it is really helpful.

I noticed that you may have error in video_test.py line 46

bboxes, pps = det.detect(imm_BGR, (640, 640))

I think you should replace it with (double underscore before and after the word call bboxes, pps, ccs = det._call_(imm_BGR)

OR bboxes, pps, ccs, _ = det.detect_in_image(imm_BGR)

Thanks again

HamadYA commented 9 months ago

One more thing, if I am using knowledge distillation, how to resume feature extraction if the code crashes and moreover how to ensure that the GPU is working in the below code

python data_distiller.py -M subcenter-arcface-logs/r100-arcface-msfdrop75/model,0 -D datasets/faces_casia_112x112_folders/ -b 32 --use_fp16

Thanks for your time

leondgarse commented 9 months ago
  1. Ya you are right, the previous det.detect is used for SCRFD, but forget to update after switch to YoloV5FaceDetector.
  2. Just added some info print after defining device usage, like for MXNet it's data_distiller.py#L24.
  3. Added a parameter --recover which can be used for restoring from previous breakpoint if TFRecord format, just works in my basic tests.