SurroundOcc icon indicating copy to clipboard operation
SurroundOcc copied to clipboard

Visulization

Open dikubab opened this issue 3 years ago • 9 comments

Please can you provide further guidance on how to visualize the occupancy. I have tried to use the following but not working

python tools/visual.py ./projects/configs/surroundocc/surroundocc.py ckpts/surroundocc.pth --work-dir out/surrocc

FileNotFoundError: [Errno 2] No such file or directory: 'temp/pred.npy'

dikubab avatar Mar 28 '23 08:03 dikubab

You should refer to "Try your own data ,Occupancy prediction" part in README and save the occupancy result. Then you can change the file path as yours in visual.py and visualize the saved result.

weiyithu avatar Mar 28 '23 10:03 weiyithu

My question is how to visualize the occupancy and scene reconstruction on nuScenes dataset. I want to test it first on nuScenes then test on customized dataset. I have read your readme very carefully could not find clear guidance how to generate the occupancy visualization. I have tried to deal with your in-the-wild data. After inferencing .npy and .ply files are generated. But it not clear how to use them for visualization

dikubab avatar Mar 29 '23 02:03 dikubab

The inferencing .npy and .ply files are used for visualization. We provide two ways for visualization. You can use meshlab to directly visualize .ply files. Or you can change 'temp/pred.npy' as the inferencing .npy path and then run visual.py, which uses mayavi for visualization. For nuScenes visualization, you can substitute 'inference_infos.pkl' as 'nuscenes_infos_val.pkl'https://cloud.tsinghua.edu.cn/f/b3f169f4db034764bb87/?dl=1.

weiyithu avatar Mar 29 '23 05:03 weiyithu

We have updated visualization instruction and you can try it. Sorry for the confusion.

weiyithu avatar Mar 29 '23 06:03 weiyithu

The problem is not solved. why don't you provide how to run the visualization code visual.py?

dikubab avatar Mar 30 '23 07:03 dikubab

In fact, we have given an instruction on how to use visual.py here https://github.com/weiyithu/SurroundOcc/blob/main/docs/run.md . If you have a look at visual.py, you will find it easy to understand and use.

weiyithu avatar Mar 30 '23 08:03 weiyithu

Yeah, I tried it but canot visualize it. It generates an error massage "IsADirectoryError: [Errno 21] Is a directory: './save_dir/' " it . save_dir is the path for .npy files.

image

dikubab avatar Mar 30 '23 08:03 dikubab

You should use the path of a specific .npy file but not the whole directory. For example, python visual.py ./save_dir/1.npy

weiyithu avatar Mar 30 '23 08:03 weiyithu

Yeah, I tried it but canot visualize it. It generates an error massage "IsADirectoryError: [Errno 21] Is a directory: './save_dir/' " it . save_dir is the path for .npy files.

image

hi, what is the version of mayavi?

ryontang avatar Jan 24 '25 08:01 ryontang