princeton-vl / infinigen

Infinite Photorealistic Worlds using Procedural Generation
https://infinigen.org
BSD 3-Clause "New" or "Revised" License
5.16k stars 431 forks source link

ValueError: cannot reshape array of size 0 into shape (0,newaxis) #178

Open Joey880627 opened 7 months ago

Joey880627 commented 7 months ago

Describe the bug

Adding high_quality_terrain.gin to --configs produces the error "ValueError: cannot reshape array of size 0 into shape (0,newaxis)".

Steps to Reproduce

See Section "What command did you run?".

What version of the code were you using?

''' What is the output of git log -n 1? ''' commit 04d8e573f68b95981cc206ce858126bec0c5a57d (HEAD -> main, origin/main, origin/HEAD) Author: pvl-bot 136786582+pvl-bot@users.noreply.github.com Date: Fri Nov 24 13:29:53 2023 -0500

What command did you run?

python -m tools.manage_datagen_jobs --output_folder outputs/monocular_hq \
--num_scenes 1 --specific_seed 0 \
--configs desert.gin high_quality_terrain.gin \
--pipeline_configs local_16GB.gin monocular.gin blender_gt.gin cuda_terrain.gin

What are your FULL output logs?

From outputs/monocular_hq/0/logs/fineterrain_0_0_0048_0.out

The following command is sent: "nice -n 20 /usr/local/joey/infinigen/blender/blender --background -y -noaudio --python generate.py --threads 8 -- --input_folder /usr/local/joey/infinigen_test/infinigen/worldgen/outputs/monocular_hq/0/coarse --output_folder /usr/local/joey/infinigen_test/infinigen/worldgen/outputs/monocular_hq/0/fine_0_0_0048_0 --seed 0 --task fine_terrain --task_uniqname fineterrain_0_0_0048_0 -g desert.gin high_quality_terrain.gin -p          LOG_DIR='/usr/local/joey/infinigen_test/infinigen/worldgen/outputs/monocular_hq/0/logs'         Terrain.device='cuda'      execute_tasks.frame_range=[48,48] execute_tasks.camera_id=[0,0]"
Overriden parameters: ['', "        LOG_DIR='/usr/local/joey/infinigen_test/infinigen/worldgen/outputs/monocular_hq/0/logs'", "        Terrain.device='cuda'", '    ', 'execute_tasks.frame_range=[48,48]', 'execute_tasks.camera_id=[0,0]']
Blender 3.3.1 (hash b292cfe5a936 built 2022-10-05 00:14:35)
Read blend: /usr/local/joey/infinigen_test/infinigen/worldgen/outputs/monocular_hq/0/coarse/scene.blend
Error: Python: Traceback (most recent call last):
  File "/usr/local/joey/infinigen_test/infinigen/worldgen/generate.py", line 441, in <module>
    main()
  File "/usr/local/joey/infinigen_test/infinigen/worldgen/generate.py", line 431, in main
    infinigen.main(
  File "/usr/local/joey/infinigen_test/infinigen/worldgen/core.py", line 479, in main
    execute_tasks(
  File "/usr/local/joey/infinigen/blender/3.3/python/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/usr/local/joey/infinigen/blender/3.3/python/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
    raise proxy.with_traceback(exception.__traceback__) from None
  File "/usr/local/joey/infinigen/blender/3.3/python/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/usr/local/joey/infinigen_test/infinigen/worldgen/core.py", line 348, in execute_tasks
    terrain.fine_terrain(output_folder, optimize_terrain_diskusage=optimize_terrain_diskusage)
  File "/usr/local/joey/infinigen_test/infinigen/worldgen/terrain/core.py", line 274, in fine_terrain
    Mesh(obj=obj).save(output_folder / f"{mesh_name}.glb")
  File "/usr/local/joey/infinigen_test/infinigen/worldgen/terrain/utils/mesh.py", line 112, in __init__
    vertex_attributes = object_to_vertex_attributes(obj)
  File "/usr/local/joey/infinigen_test/infinigen/worldgen/terrain/utils/mesh.py", line 35, in object_to_vertex_attributes
    vertex_attributes[attr] = tmp.reshape((len(obj.data.vertices), -1))
ValueError: cannot reshape array of size 0 into shape (0,newaxis)
  In call to configurable 'execute_tasks' (<function execute_tasks at 0x7fd3d0909fc0>)
In view visible mesh angle resolution 90d/3240, about  1.09 marching cube per pixel
In view invisible mesh angle resolution 90d/810, about  0.27 marching cube per pixel
Out view mesh angle resolution 90d/405, about  0.14 marching cube per pixel
In view invisible mesh marching cube resolution 198x350x3204
In view mesh angle resolution 90d/30, about  0.01 marching cube per pixel
Out view mesh angle resolution 90d/30, about  0.01 marching cube per pixel

Blender quit

If this is your first time running Infinigen, what are the full output logs of install.sh ?**

I have successfully run the hello world commands for CPU and CUDA with simple.gin.

Platform

Additional context

None