# google/sg2im

Code for "Image Generation from Scene Graphs", Johnson et al, CVPR 2018

Repository: https://github.com/google/sg2im
Canonical: https://ross.abutalabs.com/products/sg2im
Language: Python
License: Apache-2.0
License Family: permissive
Archived: true
Last push: 2024-07-25T10:13:10+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2987, "days_push": 769, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1325, forks 229 (observed 2026-08-28T04:04:22.538125+00:00)

## What it is
A PyTorch research implementation of the CVPR 2018 paper 'Image Generation from Scene Graphs' by Johnson et al. It converts a structured scene graph of objects and relationships into a synthetic image using graph convolution networks, layout prediction, and cascaded refinement networks trained adversarially.

## Use cases
- generate images from scene graphs
- control object layout in generated images
- reproduce the sg2im paper results
- experiment with graph convolution networks for image synthesis
- generate images conditioned on object relationships
- research structured image generation models

## When to choose
- you need to generate images from structured scene graph descriptions
- you want fine-grained control over objects and their relationships in generated images
- you are reproducing or building on the CVPR 2018 sg2im paper
- you need a PyTorch baseline for layout-based image synthesis

## When to avoid
- you need modern high-fidelity text-to-image generation like diffusion models
- you want a production-supported Google product
- you need compatibility with recent PyTorch versions without modification
- you need pretrained models for domains beyond the paper's datasets

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, image-processing, graphics
- domain: machine-learning, computer-vision, image-processing, deep-learning
- platform: python
- tags: scene-graph, image-generation, gan, pytorch, research-code, cvpr-2018, graph-convolution-network, linux, gpu

## Member repositories
- google/sg2im (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.538125+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:46:34.551939+00:00, confidence not recorded.
  - readme: https://github.com/google/sg2im (fetched 2026-08-28T04:04:22.538125+00:00, sha 836735d565b2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
