chenguolin / InstructScene

[ICLR 2024 spotlight] Official implementation of "InstructScene: Instruction-Driven 3D Indoor Scene Synthesis with Semantic Graph Prior".
https://chenguolin.github.io/projects/InstructScene
MIT License
54 stars 7 forks source link

ValueError: Could not find a backend to open graph.png with iomode ri. #10

Closed arjuntheprogrammer closed 2 days ago

arjuntheprogrammer commented 2 days ago

Got the following error while running Semantic Graph Prior Inference with --draw_scene_graph flag to generate and visualise the scene graph PNG:

Exception has occurred: ValueError
Could not find a backend to open `graph.png`` with iomode `ri`.
Based on the extension, the following plugins might add capable backends:
  pyav:  pip install imageio[pyav]
  opencv:  pip install imageio[opencv]
  File "/home/cto_auraml_com/Development/InstructScene/src/utils/visualize.py", line 407, in draw_scene_graph
    img = imread(output_filename)
  File "/home/cto_auraml_com/Development/InstructScene/src/generate_sg.py", line 605, in main
    image = draw_scene_graph(
  File "/home/cto_auraml_com/Development/InstructScene/src/generate_sg.py", line 641, in <module>
    main()
ValueError: Could not find a backend to open `graph.png`` with iomode `ri`.
Based on the extension, the following plugins might add capable backends:
  pyav:  pip install imageio[pyav]
  opencv:  pip install imageio[opencv]

image

Command:

generate_sg.py configs/bedroom_sg_diffusion_vq_objfeat.yaml --tag bedroom_sgdiffusion_vq_objfeat --fvqvae_tag threedfront_objfeat_vq
vae --sg2sc_tag bedroom_sg2scdiffusion_objfeat --checkpoint_epoch -1 --cfg_scale 1.0 --sg2sc_cfg_scale 1.0 --n
_scenes 2 --visualize --verbose --resolution 1024 --draw_scene_graph 
arjuntheprogrammer commented 2 days ago

Was able to resolve this issue by installing graphviz using following command: sudo apt-get install graphviz