PaddlePaddle / PaddleX

All-in-One Development Tool based on PaddlePaddle(飞桨低代码开发工具)
Apache License 2.0
4.93k stars 965 forks source link

人脸识别产线的demo数据是不是错误的,不能进行推理 #2548

Open Barry-1212 opened 23 hours ago

Barry-1212 commented 23 hours ago

https://paddlepaddle.github.io/PaddleX/main/pipeline_usage/tutorials/cv_pipelines/face_recognition.html#222-python

from paddlex import create_pipeline

pipeline = create_pipeline(pipeline="face_recognition")

pipeline.build_index(data_root="face_demo_gallery", index_dir="face_gallery_index")

output = pipeline.predict("friends1.jpg", index_dir="face_gallery_index") for res in output: res.print() res.save_to_img("./output/")

控制台打印: Using official model (MobileFaceNet), the model files will be be automatically downloaded and saved in C:\Users\PC.paddlex\official_models. Traceback (most recent call last): File "D:\code\PaddleX\myUtils\face_test.py", line 5, in pipeline.build_index(data_root="face_demo_gallery", index_dir="face_gallery_index") TypeError: ShiTuV2Pipeline.build_index() missing 2 required positional arguments: 'gallery_imgs' and 'gallery_label'

Barry-1212 commented 23 hours ago

文档的代码是不是也是错了

leo-q8 commented 19 hours ago

文档还没更新,最新的接口data_root变成了gallery_imgs, index_dir变成了gallery_label

leo-q8 commented 4 hours ago

@Barry-1212 最新文档参考https://paddlepaddle.github.io/PaddleX/main/pipeline_usage/tutorials/cv_pipelines/face_recognition.html