Documentation
¶
Overview ¶
Package extract is an optional HTTP client for a poser (https://codeberg.org/datuch/poser-extractor) instance, used purely as a stateless landmark-extraction service (image -> 33 landmarks). It is a separate package so consumers that already have landmarks, or run their own extractor, take no net/http dependency.
poser-extractor has no authentication — the configured instance must only be reachable by trusted callers (e.g. an internal network).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoPose = errors.New("no pose detected")
ErrNoPose means poser processed the image but found no human pose in it. Distinct from a bad image: the input was valid, it just had no person.
Functions ¶
Types ¶
type Client ¶
Client extracts pose landmarks from images via a poser-extractor instance.
func New ¶
New returns a Client for the poser instance at baseURL with a generous default timeout (MediaPipe's model can take seconds per image, more on the first inference after startup).
func (*Client) Extract ¶
func (c *Client) Extract(ctx context.Context, r io.Reader, mimeType string) ([]pose.Landmark, error)
Extract sends the image to poser and returns its 33 pose landmarks. Error taxonomy: ErrNoPose (valid image, no human), *PermanentError (bad input, don't retry), anything else transient (network, timeout, 5xx).
type PermanentError ¶
type PermanentError struct {
Message string
}
PermanentError is a non-transient rejection (unreadable or unsupported image); retrying the same input will not succeed. Everything that is neither ErrNoPose nor a PermanentError (network failure, timeout, 5xx) is transient and may be retried.
func (*PermanentError) Error ¶
func (e *PermanentError) Error() string