OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Factualscenegraph

Factualscenegraph is a Python research benchmark and toolkit that parses text into scene graphs of entities, attributes and relations, and provides pretrained parsers, datasets and evaluation tools.

Independent OpenViST project profile, based on linked sources.

Factualscenegraph — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a research or NLP workflow needs structured entities and relations extracted from text, or when evaluating parsers on single-sentence and multi-sentence descriptions.

Who it is for

  • Researchers evaluating the faithfulness and consistency of textual scene graph parsers.
  • Developers and research teams converting captions or longer descriptions into structured entities and relations.
  • Users training or evaluating parsing models with the included benchmark datasets.

Documented uses

  • Convert a sentence into a structured scene graph.
  • Parse multi-sentence descriptions by splitting, merging and deduplicating sentence-level graphs.
  • Train or evaluate scene graph parsing models with the supplied datasets.
  • Compare parser outputs using SPICE, Soft-SPICE and Set Match.
Before you choose

Requirements & limits

The repository is public and identifies the project as open source. The README documents Python 3.8 or later and installation through pip.

  • The default mode is for single sentences; sentence_merge and DiscoSG-Refiner support multi-sentence parsing.
  • The toolkit documents CPU, CUDA and Apple Silicon MPS device choices.
  • Core parsing dependencies differ from the additional dependencies listed for refinement and evaluation.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install FactualSceneGraph for a Python parsing workflow

Set up the package and its documented device prerequisites before using a pretrained parser.

Before you start

  • Python 3.8 or later.
  • Install PyTorch, Transformers, NLTK and spaCy as core dependencies.
  • For CUDA, install a CUDA-enabled PyTorch build before installing the package.

Steps

  1. Install the package with the command below.

    Documented command
    pip install FactualSceneGraph
  2. Choose the documented device setting: CPU, device='mps' for Apple Silicon, or CUDA after preparing the CUDA-enabled PyTorch installation.

Expected outcome

The package and its core dependencies are set up for a subsequent parsing workflow.

Guide limitations

  • This setup guidance does not itself run a parser or confirm a successful installation.
  • Refinement and evaluation workflows list additional dependencies.
Source-based practical guide

Parse a single sentence with a pretrained model

Convert a supplied sentence into text-form scene graph relations with the documented Python parser interface.

Before you start

  • FactualSceneGraph installed in a Python 3.8-or-later environment.
  • Core dependencies: PyTorch, Transformers, NLTK and spaCy.
  • A documented device choice such as CPU.

Steps

  1. Import SceneGraphParser from factual_scene_graph.parser.scene_graph_parser.

  2. Initialize it with the pretrained model identifier lizhuang144/flan-t5-base-VG-factual-sg and a device setting.

  3. Call parse with a list containing the sentence, beam_size=1, and return_text=True.

Expected outcome

The example returns scene graph text containing entities and relations; the README's example also represents attributes as relations such as `is`.

Guide limitations

  • The documented minimal example covers single-sentence parsing; multi-sentence inputs use a separate parser mode.
  • This is repository guidance, not a compatibility guarantee or a reported execution test.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
zhuang-li/FactualSceneGraph · Official homepage title · retained in its source language