princeton-vl / infinigen

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

errors when creating TreeFactory with season = 'winter' #200

Closed zzyunzhi closed 6 months ago

zzyunzhi commented 7 months ago

Describe the bug

In https://github.com/princeton-vl/infinigen/blob/66a449399f2f38d63e4b9aad689c02a4479f14df/infinigen/assets/trees/generate.py#L354, when specifying season="winter", I encountered the following error:

AssertionError: 
  In call to configurable 'TreeFactory' (<class 'infinigen.assets.trees.generate.TreeFactory'>)
  In call to configurable 'compose_scene' (<function compose_scene at 0x7f183862f2e0>)
  In call to configurable 'execute_tasks' (<function execute_tasks at 0x7f1701c3ad40>)

Steps to Reproduce

What version of the code were you using?

commit e8687f4ab5e809be28778fe42e26d26b414cca6a (HEAD, origin/main, origin/HEAD, main)

What command did you run?

  1. Create launch_0228_debug_winter.gin with the following content:
    
    random_season.weights = {'autumn': 0, 'spring': 0, 'summer': 0, 'winter': 1}

compose_scene.tree_density = 0.05 compose_scene.trees_chance = 1


2. In `generate_nature.py`, change https://github.com/princeton-vl/infinigen/blob/66a449399f2f38d63e4b9aad689c02a4479f14df/infinigen_examples/generate_nature.py#L109 to ```fac = trees.TreeFactory(np.random.randint(1e7), coarse=True, season=season)```

3. Run 
```# Generate a scene layout
python -m infinigen_examples.generate_nature --seed 0 --task coarse \
-g desert.gin simple.gin launch_0228_debug_winter.gin \
--output_folder outputs/hello_world/coarse \
--debug

What are your FULL output logs?

winter_stdout.txt

Additional context

Add any other context about the problem here.

araistrick commented 6 months ago

Hello! sorry for the delay and thanks for catching this. I believe I have fixed this crash as part of the latest commit on main, v1.2.4. It seems our unit tests only check one of the possible seasons of tree, so this slipped by --- apologies. Let me know if you have any other issues.