PaddlePaddle / PaddlePaddle/FastDeploy

使用人脸识别的时候报错了,TypeError: 'str' object is not callable

Open
#1,879 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description

Environment

FastDeploy version: e.g 0.8.0 or the latest code in develop branch
OS Platform: e.g. Linux x64 / Windows x64 / Mac OSX 12.1(arm or intel)
Hardware: e.g. Nvidia GPU 3080Ti CUDA 11.2 CUDNN 8.3
Program Language: e.g. Python 3.8

Problem description

Please attach the log file if there's problem happend.
image

python examples\vision\faceid\insightface\python\infer_arcface.py --model ms1mv3_arcface_r100.onnx --face 3.jpg --face_positive h1.jpg --face_negative hyh.jpg --device gpu

报错:
[FastDeploy][INFO]: Successfully found CUDA ToolKit from system PATH env -> C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin
[INFO] fastdeploy/runtime/runtime.cc(293)::fastdeploy::Runtime::CreateOrtBackend Runtime initialized with Backend::ORT in Device::GPU.
FaceRecognitionResult: [Dim(512), Min(-2.607002), Max(2.137851), Mean(0.006605)]
FaceRecognitionResult: [Dim(512), Min(-0.931618), Max(1.009867), Mean(-0.024876)]
FaceRecognitionResult: [Dim(512), Min(-2.600491), Max(3.553268), Mean(0.038227)]
Cosine 01: 0.18622680545915404
Cosine 02: 0.016184934865728532
Traceback (most recent call last):
File "examples\vision\faceid\insightface\python\infer_arcface.py", line 81, in
print(model.runtime_option)
File "D:\anaconda3\envs\paddlex\lib\site-packages\fastdeploy\c_lib_wrap.py", line 176, in RuntimeOptionStr
attrs = dir(runtime_option)
TypeError: 'str' object is not callable

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/vision/faceid/insightface/python/infer_arcface.py at line 81 and inspect RuntimeOptionStr in fastdeploy/c_lib_wrap.py around line 176. Reproduce the command shown in the issue and trace the runtime option formatting; done means the example completes without the TypeError and prints the runtime option successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.