exadel-inc / exadel-inc/compreface-python-sdk

Can't use face detection "pose" plugin

オープン
#23 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
167
フォーク
55
PR マージ指標
30日以内にマージされた PR はありません

説明

**Describe the bug**
"pose" plugin not listed in common/typed_dict.py check_fields_by_name function

**To Reproduce**
Try to call detection.detect(image_path = INPUT_IMAGE_PATH, options={"face_plugins": "pose"})

**Expected behavior**
pose plugin used during detection and pitch roll yaw fields appeared in detection result

**Logs**
Traceback (most recent call last):
File "//crf2.py", line 56, in
ddata = detection.detect(image_path = INPUT_IMAGE_PATH, options={"face_plugins": "pose"})
File "/usr/local/lib/python3.13/site-packages/compreface/service/detection_service.py", line 55, in detect
return self.detect_face_from_image.execute(request, pass_dict(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
self.options, ExpandedOptionsDict) if options == {} else options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/compreface/use_cases/detect_face_from_image.py", line 37, in execute
result: dict = self.detect_face_from_image.post(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
request.image_path, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/compreface/client/detect_face_from_image.py", line 54, in post
check_fields_by_name(key, options[key])
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/compreface/common/typed_dict.py", line 60, in check_fields_by_name
raise IncorrectFieldException(
"face_plugins must be only contains calculator,age,gender,landmarks,mask. "
"Incorrect value {}".format(row))
compreface.exceptions.field_exception.IncorrectFieldException: face_plugins must be only contains calculator,age,gender,landmarks,mask. Incorrect value pose

P.S. Tried to add " and row.find('pose') == -1" to line 59 of common\typed_dict.py - this helps

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

common/typed_dict.py の check_fields_by_name から開始し、face_plugins を pose に設定した detection.detect の呼び出しを追跡します。許可される face_plugins の値がどのように検証されるかを確認し、pose が受け入れられて pitch、roll、yaw が detection 結果に現れるようにします。報告された呼び出しを再現して、フィールド例外が発生しなくなったことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
computer-vision
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。