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.
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_mergeandDiscoSG-Refinersupport 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.
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
Install the package with the command below.
pip install FactualSceneGraphChoose 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.
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
Import
SceneGraphParserfromfactual_scene_graph.parser.scene_graph_parser.Initialize it with the pretrained model identifier
lizhuang144/flan-t5-base-VG-factual-sgand a device setting.Call
parsewith a list containing the sentence,beam_size=1, andreturn_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.
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

