Python client for interacting with CSP's server-side AI technology preview features, for research purposes.
Use a modern version of python 3 and
pip install Pillow PyCryptodome
remove_tones
: Remove screentones from an imagegrayscale_tones
: Smooth over the screentones in grayscalepose
: Convert images of humans in poses to 3D poses. Uses a proprietary binary "Bone Layout" format that hasn't been reverse-engineeredcolorize
: Colorize images, using an optional color hint image. Only seems to accept up to 1024px width images.
c = CSPTechAPI()
with open("test.png", "rb") as f:
dat = c.grayscale_tones(f.read())
with open("output.png", "wb") as g:
g.write(dat)