hamer-p150 / code /README.md
changh95's picture
Python API: warm-up so the first real call is fast (warmup_variants, model.warmup()), quiet logs, install extras
77e087f verified
|
Raw History Blame Contribute Delete
768 Bytes

hamer (code/)

The hamer Python package: HaMeR hand mesh recovery on a Tenstorrent Blackhole chip, plus its HTTP server (hamer.server.app). Install into an environment that already has a built tt-metal / ttnn:

pip install -e code/            # or: pip install code/
from hamer import HamerModel

with HamerModel.from_pretrained(device_id=0) as model:   # also warms up all call variants
    hand = model("media/sample1.jpg", bbox=[20, 170, 295, 260], is_right=True)   # path relative to the repo root

from_pretrained warms up the device and all call variants, so the first call is as fast as the later calls. Install code/[server,test] for the HTTP server and the tests.

Full API reference: PYTHON.md at the repository root.