Skip to main content

Image Composition Toolbox

Project description


libcom: everything about image composition


PyPI PyPI - Downloads Hits GitHub Repo stars Static Badge Static Badge GitHub

Introduction

libcom is an image composition toolbox covering various related tasks, including naive image composition, image blending, color transfer, image harmonization, painterly harmonization, object placement, etc.

Usage

Create runtime environment

git clone https://github.com/bcmi/libcom.git
cd libcom/requirements
conda env create -f libcom.yaml
conda activate Libcom
pip install -r runtime.txt # -i https://pypi.tuna.tsinghua.edu.cn/simple
# install a specific version of taming-transformers from source code
cd ../libcom/controllable_composition/source/ControlCom/src/taming-transformers
python setup.py install

Installation

pip install libcom

or

python setup.py install

After that, you can verify the installation by running:

cd tests
sh run_all_tests.sh

The visualization results can be found in results folder.

Download pretrained models

During using the toolbox, the pretrained models and related files will be automatically downloaded to the installation directory. Note downloading the pretrained models may take some time when you first call some models, especially ControlComModel and PainterlyHarmonizationModel.

Alternatively, you can download these files from [Modelscope] or [Huggingface] in advance, and move them to the installation directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libcom-0.0.1.post2.tar.gz (241.8 kB view hashes)

Uploaded Source

Built Distribution

libcom-0.0.1.post2-cp38-cp38-manylinux1_x86_64.whl (2.2 MB view hashes)

Uploaded CPython 3.8

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page