Instructions to use rsortino/trf-sg2im with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rsortino/trf-sg2im with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rsortino/trf-sg2im", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from rsortino/trf-sg2im: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/rsortino/trf-sg2im/resolve/main/README.md
- Command line
-
hf download hf://rsortino/trf-sg2im/README.md
-
curl -L -o README.md https://huggingface.co/rsortino/trf-sg2im/resolve/main/README.md
1.08 kB
metadata
license: apache-2.0
datasets:
- multi-train/coco_captions_1107
- visual_genome
language:
- en
pipeline_tag: text-to-image
tags:
- scene_graph
- transformers
- laplacian
- autoregressive
- vqvae
trf-sg2im
Model card for the paper "Transformer-Based Image Generation from Scene Graphs". Original GitHub implementation here.
Model
This model is a two-stage scene-graph-to-image approach. It takes a scene graph as input and generates a layout using a transformer-based architecture with Laplacian Positional Encoding. Then, it uses this estimated layout to condition an autoregressive GPT-like transformer to compose the image in the latent, discrete space, converted into the final image by a VQVAE.
Usage
For usage instructions, please refer to the original GitHub repo.
Results
Comparison with other state-of-the-art approaches


