Docs
Docs pages

Recipes

Labs: body points you can cite

You are measuring posture in a trial and need a table of body points per frame, plus enough detail that someone else can get the same table. Leans on pose Live

import csv
from vitalsbio import VitalsBio

client = VitalsBio()
r = client.pose("trial-07-pen-3.mp4", species="cattle", step_s=0.1, max_seconds=60)
names = r["keypoint_names"]

with open("trial-07-pen-3.pose.csv", "w", newline="") as out:
    w = csv.writer(out)
    w.writerow(["track_id", "t_s", "frame_index", "keypoint", "x", "y", "score"])
    for a in r["animals"]:
        for f in a["frames"]:
            for name, (x, y, score) in zip(names, f["keypoints"]):
                w.writerow([a["track_id"], f["t_s"], f["frame_index"], name, x, y, score])

# write this next to the data: it is your methods paragraph
print({"request_id": r.request_id, "api_version": r["api_version"], "schema_version": r["schema_version"],
       "model": r["model"], "capability": r["capability"], "video": r["video"]})

Making it reproducible