JeffreyXiang / ivid

PyTorch implementation of the ICCV paper "3D-aware Image Generation using 2D Diffusion Models"
https://jeffreyxiang.github.io/ivid/
MIT License
306 stars 4 forks source link

failed when preparing data for training #9

Open bbbbubble opened 11 months ago

bbbbubble commented 11 months ago

Thanks for your great work!

I encountered some problem preparing data for training when following your instructions. I'm not sure if it is because the depth pics. The default results of MiDas is .png and .pfm files, not .npz file you suggests in README. So I change the code in MiDas as follows: image However, when start training, it shows the error:

Traceback (most recent call last):
  File "/home/azhe.cp/adamesh_local/ivid/train.py", line 162, in <module>
    main(0, cfg)
  File "/home/azhe.cp/adamesh_local/ivid/train.py", line 86, in main
    model_summary = get_model_summary(backbone)
  File "/home/azhe.cp/adamesh_local/ivid/train.py", line 58, in get_model_summary
    model_summary += str(summary(
  File "/home/azhe.cp/anaconda3/envs/ivid/lib/python3.10/site-packages/torchinfo/torchinfo.py", line 222, in summary                                                 
    summary_list, correct_input_size, get_total_memory_used(x), formatting
  File "/home/azhe.cp/anaconda3/envs/ivid/lib/python3.10/site-packages/torchinfo/torchinfo.py", line 461, in get_total_memory_used                                   
    result = traverse_input_data(
  File "/home/azhe.cp/anaconda3/envs/ivid/lib/python3.10/site-packages/torchinfo/torchinfo.py", line 421, in traverse_input_data                                     
    return aggregate(
  File "/home/azhe.cp/anaconda3/envs/ivid/lib/python3.10/site-packages/torchinfo/torchinfo.py", line 466, in <lambda>                                                
    lambda data: (lambda d: sum(d.values()))
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
JeffreyXiang commented 11 months ago

It seems that the error is not related to the depth pic format but to torchinfo package. It is used here to print a summary for the network. And It will not affect the trainng process. I don't know where exactly is the problem lies, but you can just skip the summary part.