vobecant / POP3D

Source code for NeurIPS paper "POP-3D: Open-Vocabulary 3D Occupancy Prediction from Images"
https://vobecant.github.io/POP3D/
79 stars 7 forks source link

Error while saving results to folder #7

Open bqm1111 opened 6 months ago

bqm1111 commented 6 months ago

I tried to save result by running eval.py with argument --plot-dir and got this error

fts_path: ./data/nuscenes/maskclip_features_projections/CAM_FRONT/n008-2018-08-01-16-03-27-0400__CAM_FRONT__1533153857912404.pth.npy
Traceback (most recent call last):
  File "/home/sherlock/workspace/POP3D/eval.py", line 788, in <module>
    torch.multiprocessing.spawn(main, args=(args,), nprocs=args.gpus)
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes
    while not context.join():
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 150, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException: 

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap
    fn(i, *args)
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
    return func(*args, **kwargs)
  File "/home/sherlock/workspace/POP3D/eval.py", line 510, in main
    plt.savefig(save_path, bbox_inches='tight')
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/matplotlib/pyplot.py", line 977, in savefig
    res = fig.savefig(*args, **kwargs)
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/matplotlib/figure.py", line 3058, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/matplotlib/backend_bases.py", line 2299, in print_figure
    bbox_inches = self.figure.get_tightbbox(
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/matplotlib/figure.py", line 1684, in get_tightbbox
    bbox = a.get_tightbbox(renderer)
  File "/home/sherlock/anaconda3/envs/maskclip/lib/python3.9/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 3369, in get_tightbbox
    if axis_bb:
UnboundLocalError: local variable 'axis_bb' referenced before assignment

What seems to be the problem here?

bqm1111 commented 6 months ago

By the way, Could you show me how to visualize your result as shown in Figure 3 in your paper?

vobecant commented 6 months ago

Hi, I don't know what is the problem with the plotting. It seems to be matplotlib-related. I also encounter the problem on my side. I will investigate it and let you know as soon as I fix it.

I think that you mean Figure 5 in the main paper, right? For that, I exported the results in a text format, where every line has the following format: [x,y,z,R,G,B], where x,y,z are 3D point coordinates and R,G,B are red, green and blue values. Then, I visualize the results with Cloud Compare.

bqm1111 commented 5 months ago

Is there any progress on fixing the bug? Furthermore, there is a question I would like to ask. In two consecutive frames, let's consider a single voxel representing a single point in 3D space. In those 2 frames, your model outputs 2 different labels for that voxel but one has high confidence score, one has low confidence score. Do you apply any post-processing operation to handle the variance of the outcome of your model, or do you simply choose the model prediction for the current frame?