DEV Community

AnyISalIn
AnyISalIn

Posted on

3

5 lines of Python code to change the posture of photography

Mix Pose API novita.ai

You can install the Novita Python SDK using just one command

pip install novita-client
Enter fullscreen mode Exit fullscreen mode

then you can get NOVITA_API_KEY from https://novita.ai/get-started/

Finally, you can try the mix pose demo by following this code.

import os

from novita_client import NovitaClient
from novita_client.utils import base64_to_image

client = NovitaClient(os.getenv('NOVITA_API_KEY'))
res = client.mixpose(
    image="https://image.uniqlo.com/UQ/ST3/my/imagesgoods/455359/item/mygoods_23_455359.jpg?width=494",
    pose_image="https://image.uniqlo.com/UQ/ST3/ca/imagesgoods/455359/item/cagoods_02_455359.jpg?width=494",
)

base64_to_image(res.image_file).save("./mixpose.png")

Enter fullscreen mode Exit fullscreen mode

novita-client is the Python SDK of Novita.AI, which provides the following features.

Sentry mobile image

Improving mobile performance, from slow screens to app start time

Based on our experience working with thousands of mobile developer teams, we developed a mobile monitoring maturity curve.

Read more

Top comments (2)

Collapse
 
pavelee profile image
Paweł Ciosek

Cool! 😎

Collapse
 
anyisalin profile image
AnyISalIn

thanks

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more