INNER CODE UNIT · Python

duration_ms

GenielabsOpenSource/spine-animation-ai · reskin-app/app/backend/server.py:286

        duration_ms=(_time.time() - t0) * 1000,
    )
    return rebuilt


@app.post("/api/skin/{skin_name}/embedding/{slot}")
def get_slot_embedding(skin_name: str, slot: str):
    """Proxy to the SAM segmentation server's /image_segmentation route to
    get an image embedding for the slot's raw image. The embedding lives
    locally so the frontend can run mask decoding ONNX inference without
    re-uploading the image each time.

    Returns the embedding payload directly (the same JSON shape the SAM
    server returns), with the embedding bytes in base64.
    """
    import base64
    import numpy as np
    import requests

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…