Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

人脸识别问题 #2949

Open
lvxingchenGit opened this issue Jan 22, 2025 · 1 comment
Open

人脸识别问题 #2949

lvxingchenGit opened this issue Jan 22, 2025 · 1 comment
Assignees

Comments

@lvxingchenGit
Copy link

描述问题

我创建完特征库,去识别照片,为什么返回的结果能识别到人脸,但是是否是同一个人识别不出来,识别的人脸是特征库里边的人脸,也识别不到。

下边是代码

pipeline = create_pipeline(pipeline="face_recognition")
index_data = pipeline.build_index(gallery_imgs="./face_demo_gallery1", gallery_label="./face_demo_gallery1/gallery.txt", index_type="Flat", metric_type="IP")
index_data.save("face_index")
output = pipeline.predict("img.jpg", index=index_data)
for res in output:
res.print()
res.save_to_img("./output/")

返回结果如下:
{'input_path': 'img.jpg', 'boxes': [{'labels': None, 'rec_scores': None, 'det_score': 0.9210686683654785, 'coordinate': [217.95045, 163.63374, 450.76477, 457.2522]}]}
labels为None;rec_scores也为None。

是我使用错了吗????

  1. 您是否已经正常运行我们提供的教程
    程序可以正常运行。

  2. 您是否在教程的基础上修改代码内容?还请您提供运行的代码
    代码如上。

  3. 您使用的数据集是?
    人脸检测模块=PP-YOLOE_plus-S_face
    人脸特征模块=ResNet50_face

  4. 请提供您出现的报错信息及相关log
    F:\anaconda\2024\envs\paddleX\python.exe G:\AAAAAA_paddleX\PaddleX\index.py
    Using official model (PP-YOLOE_plus-S_face), the model files will be be automatically downloaded and saved in C:\Users\Administrator.paddlex\official_models.��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ���
    F:\anaconda\2024\envs\paddleX\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:686: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
    warnings.warn(warning_message)
    Using official model (ResNet50_face), the model files will be be automatically downloaded and saved in C:\Users\Administrator.paddlex\official_models.
    {'input_path': 'img.jpg', 'boxes': [{'labels': None, 'rec_scores': None, 'det_score': 0.9210686683654785, 'coordinate': [217.95045, 163.63374, 450.76477, 457.2522]}]}
    The result has been saved in output\img.jpg.

环境

  1. 请提供您使用的PaddlePaddle和PaddleX的版本号
    paddlex=3.0.0b2,PaddlePaddle=3.0.0b2
  2. 请提供您使用的操作系统信息,如Linux/Windows/MacOS
    操作系统为:windows10
  3. 请问您使用的Python版本是?
    python = 3.9
  4. 请问您使用的CUDA/cuDNN的版本号是?
    用的cpu
@leo-q8
Copy link
Collaborator

leo-q8 commented Jan 24, 2025

建库的时候图像大小应该只包含人脸的范围,检查一下看看是不是

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants