Tencent / FaceDetection-DSFD

腾讯优图高精度双分支人脸检测器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: cannot import name 'pa_sfd_match'

ncthong opened this issue · comments

Hi Team,
I tried to follow your doc: https://github.com/Tencent/FaceDetection-DSFD
and when i run demo.py and got the following error:
Traceback (most recent call last):
File "demo.py", line 27, in
from face_ssd import build_ssd
File "D:\TRI TUE NHAN TAO AI\FaceDetection-DSFD-master\face_ssd.py", line 13, in
from layers import *
File "D:\TRI TUE NHAN TAO AI\FaceDetection-DSFD-master\layers_init_.py", line 2, in
from .modules import *
File "D:\TRI TUE NHAN TAO AI\FaceDetection-DSFD-master\layers\modules_init_.py", line 2, in
from .multibox_loss import MultiBoxLoss, focalLoss
File "D:\TRI TUE NHAN TAO AI\FaceDetection-DSFD-master\layers\modules\multibox_loss.py", line 13, in
from ..box_utils import (log_sum_exp, match, pa_sfd_match, refine_match,
ImportError: cannot import name 'pa_sfd_match'

I've installed torch

I am also having the same issue. Please let me know if you figured it out.

commented

Hi all,
I am facing the same error. Could you please share a solution if you had an answer.

Thank you very much

I found the issue, go to multibox_loss where the library was imported and just remove the pa_sfd_match from the line from ..box_utils import (log_sum_exp, match, pa_sfd_match, refine_match, where it is imported because it does not seem to be used and does not exist in boxutils. Everything then works for me without error

This issue may be closed now as I believe the problem has been solved @ncthong

thanks guys, I have solved the problem in the way of @hypadr1v3.

You are very welcome. Although it is strange that this function is not called or mentioned anywhere else apart from the import statement.