0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

How to Make a Pose Reference With AI Using a Joint-Angle Validator

0
Posted at

A pose-reference schema, joint skeleton, and validator that rejects a cropped hand

AIでポーズ参考画像を作るときは、雰囲気の一致ではなく、関節角度・接地脚・手足の可視性を入力契約として定義します。生成後に17点のランドマークを抽出し、許容角度を超えた画像や手足が切れた画像を reject すれば、再現可能なレビュー工程になります。

Input contract

version: 1
pose:
  name: contrapposto_right
  weight_leg: right
  left_elbow_deg: 92
  right_knee_deg: 164
  torso_lean_deg: 6
visibility:
  hands: both
  feet: both
preserve:
  - face
  - outfit
  - background
tolerance_deg: 12

入力写真は全身が見え、手足が重ならず、強いモーションブラーがないものを使います。第三者の写真は許可を取ってください。

Generate the candidate

現在の AI Pose Generator は Nano Banana 2 を固定モデルとして使い、Poses / Describe / 3D pose の3経路、必須の人物画像、アスペクト比、Advanced Settings、Public visibility、sign-in gate を表示します。

Current Voor AI Pose Generator showing pose modes, required subject image, aspect ratios, Public visibility, and sign-in gate

Describe モード用の指示例:

Repose the same authorized person into a right-leg contrapposto.
Right knee nearly straight at 164 degrees; left elbow bent about 92 degrees;
torso leans 6 degrees left. Both hands and both feet fully visible.
Preserve face, hairstyle, outfit, camera height, and background.
No extra fingers, no cropped limbs, no body-shape change.

Deterministic angle validation

MediaPipe Pose のランドマークを (x, y) として保存した前提で、3点角を計算します。

from math import acos, degrees

def angle(a, b, c):
    ba = (a[0] - b[0], a[1] - b[1])
    bc = (c[0] - b[0], c[1] - b[1])
    dot = ba[0] * bc[0] + ba[1] * bc[1]
    norm = (ba[0] ** 2 + ba[1] ** 2) ** .5 * (bc[0] ** 2 + bc[1] ** 2) ** .5
    if norm == 0:
        raise ValueError("collapsed joint")
    return degrees(acos(max(-1, min(1, dot / norm))))

def within(actual, target, tolerance=12):
    return abs(actual - target) <= tolerance

left_elbow = angle(points["LEFT_SHOULDER"], points["LEFT_ELBOW"], points["LEFT_WRIST"])
right_knee = angle(points["RIGHT_HIP"], points["RIGHT_KNEE"], points["RIGHT_ANKLE"])

assert within(left_elbow, 92)
assert within(right_knee, 164)

ランドマークの confidence が低い場合は合格にせず、撮り直しまたは再生成に回します。

Visibility validator

required = ["LEFT_WRIST", "RIGHT_WRIST", "LEFT_ANKLE", "RIGHT_ANKLE"]
missing = [name for name in required if points[name]["visibility"] < 0.75]
if missing:
    raise ValueError(f"cropped or occluded joints: {missing}")

さらに次を人間が確認します。

  • 手の指が増減していない
  • 接地脚と骨盤の傾きが矛盾していない
  • 顔・服・背景が不要に変更されていない
  • ポーズが危険または物理的に無理ではない

Failure modes

symptom likely cause fix
手が切れる 元画像の余白不足 全身画像・縦長比率を使う
顔が変わる ポーズ変更が大きすぎる 角度差を小さくして段階生成
関節が不自然 指示が抽象的 左右・角度・接地脚を数値化
validator が不安定 遮蔽・低解像度 confidence 閾値で reject

Technical limits

2Dランドマーク角度は3D関節角度ではありません。カメラ方向、遠近、衣服の遮蔽で値が変わります。生成画像は解剖学的な ground truth ではなく、レビュー対象の参考資料です。モデルやUIは変更される可能性があります。sign-out 状態では数値 credits が表示されないため、実際の画像・比率・設定を入れた後の live estimate を確認してください。

契約と validator を先に用意してから、同じフォームで候補を1枚生成し、失敗した画像を「好み」で通さない運用にします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?