EGOHOME ANNOTATION EXAMPLES
Left & right hand annotation
Rinsing and organizing at the sink
17.20 sThey move the bottle toward the dish rack and place it there among the other dishes, then withdraw their hands.
Left hand 4
Right hand 3
Pose shows model-estimated hand keypoints. The 3D view is wrist-relative and uses default camera intrinsics; it is not a physical-size measurement.
Evaluation source: EgoHome · PerceptronAI ↗ · 36ec34a731cc_010 · Source clip 32.4–49.6 s
Shown under the evaluation permission. Playback copies are resized and muted. Excerpts follow recorded segment boundaries, with timestamps relative to the excerpt. Datumwell Annotation predictions were generated without reference labels as input. These examples are not full benchmark scores; review actions and timing against the video. CC BY-NC 4.0 · Evaluation permission
Download 2D / 3D Pose JSON ↓Download evaluation JSON ↓Annotate a video via API
Get separate left- and right-hand action timelines. The example above includes English descriptions and Chinese translations.
MP4 / MOV / WebM · Constant 30 fps
Direct upload to private object storage, up to 50 MB.
annotation:write · annotation:read
export ROBOROUTER_TOKEN='YOUR_API_TOKEN'
python3 - <<'PY'
import hashlib, json, os, sys, time, uuid
from pathlib import Path
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
video = Path("clip.mp4")
data = video.read_bytes()
key_file = video.with_suffix(video.suffix + ".request-id")
try:
with key_file.open("x", encoding="ascii") as saved:
saved.write(str(uuid.uuid4()))
except FileExistsError:
pass
job_id = str(uuid.UUID(key_file.read_text(encoding="ascii").strip()))
base = "https://datumwell.io/api/v1/annotations/" + job_id
headers = {"Authorization": "Bearer " + os.environ["ROBOROUTER_TOKEN"]}
print("Request ID:", job_id, file=sys.stderr)
def request(path, method="GET", data=None, content_type=None):
fields = dict(headers)
if content_type:
fields["Content-Type"] = content_type
try:
with urlopen(Request(base + path, data, fields, method=method),
timeout=300) as response:
return json.load(response)
except HTTPError as error:
print(error.read().decode("utf-8", errors="replace"), file=sys.stderr)
if error.headers.get("Retry-After"):
print("Retry-After:", error.headers["Retry-After"], file=sys.stderr)
sys.exit("Check the original request ID before continuing.")
except (URLError, TimeoutError):
sys.exit("Connection interrupted. Check the original request ID.")
metadata = json.dumps({
"filename": video.name, "size_bytes": len(data),
"sha256": hashlib.sha256(data).hexdigest(), "language": "en",
}).encode()
session = request("/upload-session", "POST", metadata, "application/json")
if session.get("upload"):
import subprocess
upload = session["upload"]
if not upload["url"].startswith("https://"):
sys.exit("Expected an HTTPS object storage URL.")
fields = [arg for key, value in upload["fields"].items()
for arg in ("--form-string", f"{key}={value}")]
subprocess.run(["curl", "--fail", "--silent", "--show-error",
"--max-time", "120", *fields,
"--form", f"file=@{video}", upload["url"]], check=True)
complete = json.dumps({"generation": upload["generation"]}).encode()
request("/upload-complete", "POST", complete, "application/json")
job = request("")
active = {"uploading", "processing", "translation_pending"}
retryable = {"annotation_recognition_retry", "annotation_translation_retry"}
# Upload confirmation alone does not start annotation. Submit once even when
# an unsubmitted job already advertises automatic processing.
if job["status"] in active and not job.get("worker_active"):
if not job.get("error_code") or job["error_code"] in retryable:
job = request("/process", "POST")
while job["status"] in active:
if job.get("processing_mode") == "automatic" or job.get("worker_active"):
time.sleep(5)
job = request("")
elif not job.get("error_code") or job["error_code"] in retryable:
job = request("/process", "POST")
if job["status"] in active:
time.sleep(1)
else:
break
if job["status"] == "completed" and job.get("result_paged"):
result = job["result"]
result["segments"] = []
offset = 0
while offset is not None:
page = request(f"/result?offset={offset}")
result["segments"].extend(page["segments"])
if offset == 0:
result["hands"] = page["hands"]
else:
result["hands"]["segments"].extend(page["hands"]["segments"])
result["hands"]["audit"].extend(page["hands"]["audit"])
next_offset = page["next_offset"]
if next_offset is not None and next_offset <= offset:
sys.exit("Invalid result cursor. Check the saved job ID.")
offset = next_offset
job["result_paged"] = False
print(json.dumps(job, ensure_ascii=False, indent=2))
if job["status"] != "completed":
sys.exit(1)
PY