An end-to-end multimodal LLM for Scene Graph Generation (SGG), which was introduced in
Compile Scene Graphs with Reinforcement Learning
1- torch == 2.5.0 or 2.5.1 (cu124, optional)
2- transformers (supports Qwen2VL, Qwen2.5VL)
3- trl
4- vLLM
1from datasets import load_dataset
2
3db_train = load_dataset("JosephZ/vg150_train_sgg_prompt")["train"]
4db_val = load_dataset("JosephZ/vg150_val_sgg_prompt")["train"]
1db_train = load_dataset("JosephZ/psg_train_sg")["train"] # keys: image_id, image, objects, relationships
2db_val = load_dataset("JosephZ/psg_test_sg")["train"]
1DATASET_TYPE=vg # or psg
2python src/sgg_gather_preds.py $DATASET_TYPE $OUTPUT_DIR sgg_pred_results.json
3python src/vg150_eval.py $DATASET sgg_pred_results.json
The
GRPOTrainer used in this project is based on
trl's GRPOTrainer, extended to support multimodal inputs.
1@article{chen2025compile,
2 title={Compile Scene Graphs with Reinforcement Learning},
3 author={Chen, Zuyao and Wu, Jinlin and Lei, Zhen and Pollefeys, Marc and Chen, Chang Wen},
4 journal={arXiv preprint arXiv:2504.13617},
5 year={2025}
6}