Synthesis-AI-Dev / documentation

Synthesis Face API Documentation - Appendix Files
https://docs.synthesis.ai/
MIT License
3 stars 1 forks source link

New Feature: Arms #12

Open ck4adventure opened 3 years ago

ck4adventure commented 3 years ago

The arms feature allows for percentage groups of arms configurations to be set. An arms configuration consists of individually set left and right arms, both disabled by default. At the minimum, an arm must be enabled to appear, and will be given a default gesture and rotation. Arms have a wide range of motion along each axis. Arms each have a hand_gesture which can be specified individually or with the keyword all. The held_object for each hand can be specified, it can also include all, or be set to none. If a gesture and object combination occur with a gesture that cannot hold an item, the held_object will be set to none.

Min fields req to enable arms with defaults

      "arms": [
        {
          "left": {
            "enabled": true
          },
          "right": {
            "enabled": true
          },
          "percent": 100
        }
      ],

Full fields values with ranges

      "arms": [
        {
          "left": {
            "enabled": true,
            "elbow_pitch": {
              "type": "range",
              "values": {
                "min": 90,
                "max": 90
              }
            },
            "elbow_yaw": {
              "type": "range",
              "values": {
                "min": -180,
                "max": 180
              }
            },
            "elbow_roll": {
              "type": "range",
              "values": {
                "min": -180,
                "max": 180
              }
            },
            "hand_gesture": [
              "all"
            ],
            "held_object": [
              "all", "none"
            ],
            "held_object_pose_seed": {
              "type": "range",
              "values": {
                "min": 0,
                "max": 1
              }
            }
          },
          "right": {
            "enabled": true,
            "elbow_pitch": {
              "type": "range",
              "values": {
                "min": -90,
                "max": 90
              }
            },
            "elbow_yaw": {
              "type": "range",
              "values": {
                "min": -180,
                "max": 180
              }
            },
            "elbow_roll": {
              "type": "range",
              "values": {
                "min": -180,
                "max": 180
              }
            },
            "hand_gesture": [
              "all"
            ],
            "held_object": [
              "all", "none"
            ],
            "held_object_pose_seed": {
              "type": "range",
              "values": {
                "min": 0,
                "max": 1
              }
            }
          },
          "percent": 100
        }
      ],
jimiayler commented 3 years ago

Hey, @ck4adventure (cc-ing @moorage) — jk here. :)

Question: I'm trying to run a job with just your defaults for arms above, but getting errors saying Additional property arms is not allowed when adding to faces, which the cli is also saying is needed to run a job. Can you give me an example of the correct command(s) to run on web.staging to generate default arm images? LMK and many thanks for your help.

moorage commented 3 years ago

@jimiayler can you post both your json file and how you called the CLI? E.g. the full output

jimiayler commented 3 years ago

JSON request:

{
  "render": {
    "resolution": {
      "w": 1024,
      "h": 1024
    }
  },
  "faces": [
    {
      "identities": {
        "ids": [
          24
        ],
        "renders_per_identity": 10
      },
      "body": {
        "enabled": [
          "true"
        ],
        "type": [
          "2"
        ]
      }
    }
  ],
    "arms": [
        {
          "left": {
            "enabled": true
          },
          "right": {
            "enabled": true
          },
          "percent": 100
        }
    ]
}

Full CLI output:

MacBook-Pro-6:docs imacuser$ SYNTHESIS_CLIENT_PROMPT=1 synthesis --env=stage user init jXIGUwIx6CB8ZH8zqzPC aylerworx
WARN[0000] Environment variable SYNTHESIS_CLIENT_PROMPT is set 

Server is set to https://stage.synthesis.ai. Hit enter to continue or Control-C to exit
Checking connectivity with Synthesis AI at: https://stage.synthesis.ai
Server reachable
Validating API key
Authenticated successfully with the API key
Confirmed membership in aylerworx

API key and org saved to config
MacBook-Pro-6:docs imacuser$ SYNTHESIS_CLIENT_PROMPT=1 synthesis --env=stage faces create second_job.json
WARN[0000] Environment variable SYNTHESIS_CLIENT_PROMPT is set 

Server is set to https://stage.synthesis.ai. Hit enter to continue or Control-C to exit
Error: invalid request: Error parsing json-- - (root): Additional property arms is not allowed 
Please try sending the request again.

FATA[0002] unexpected server response: 
moorage commented 3 years ago

@jimiayler your arms declaration is outside the entire faces array element

jimiayler commented 3 years ago

As a general rule, I don't consider arms to be a part a face. :)

I have successfully done a separate job, will run one with full field values now. Thank you.