PVG icon indicating copy to clipboard operation
PVG copied to clipboard

data extraction on Windows

Open antithing opened this issue 1 year ago • 3 comments

Hi, I am looking at extracting the waymo data on a Windows machine, and the

"PVG\scripts\extract_scenes_waymo.py" file fails due to the 'cp' command.

I have tried switching to:

for scene_idx, scene_id in enumerate(scene_ids):
    scene_dir = join(out_dir, f'{scene_id:04d}001')
    os.makedirs(scene_dir, exist_ok=True)

    for tag in tags:
        os.makedirs(join(scene_dir, tag), exist_ok=True)
    for post, tag in zip(posts,tags):
        for i in tqdm(range(scene_nums[scene_idx][0], scene_nums[scene_idx][1])):
            src = join(data_root,tag,f'{scene_id:04d}{i:03d}'+post)
            dst = join(scene_dir, tag, f'{scene_id:04d}{i:03d}'+post)
            shutil.copy2(src,dst)
          #  cmd = "copy {} {}".format(join(data_root,tag,f'{scene_id:04d}{i:03d}'+post),
          #                          join(scene_dir, tag, f'{scene_id:04d}{i:03d}'+post))
            os.system(cmd)

But I keep getting 'file not found ' errors.

What else can I do to use this script on Windows? Thanks!

antithing avatar Mar 19 '24 12:03 antithing

This is just an example script. You need to customize it for your own dataset. If you are getting 'file not found ' error, please make sure your path is correct. Print the path out and see what it is.

SuLvXiangXin avatar Mar 19 '24 13:03 SuLvXiangXin

I understand, thank you! I am using the provided dataset, and I see this error when training:


100%|███████████████████████████████████████████████████████████████████████████████| 147/147 [00:01<00:00, 114.76it/s]
Loading Test Cameras
0it [00:00, ?it/s]
Number of points at initialization :  1000000
Training progress:   0%|                                                          | 1/30000 [00:04<36:44:47,  4.41s/it]
Traceback (most recent call last):
  File "C:\Users\ss\Documents\NeRF\PVG\train.py", line 364, in <module>
    training(args)
  File "C:\Users\ss\Documents\NeRF\PVG\train.py", line 198, in training
    log_dict['iter_time'] = iter_start.elapsed_time(iter_end)
  File "C:\Users\ss\AppData\Local\miniconda3\envs\pvg\lib\site-packages\torch\cuda\streams.py", line 208, in elapsed_time
    return super().elapsed_time(end_event)
RuntimeError: CUDA error: device not ready
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

What might be causing this?

I am on windows, with an RTX 4090 GPU, CUDA 11.7

antithing avatar Mar 19 '24 13:03 antithing

I have resolved this by adding:

torch.cuda.synchronize()

to line 184 of train.py

antithing avatar Mar 19 '24 13:03 antithing