ch3cook-fdu / Vote2Cap-DETR

[CVPR 2023] Vote2Cap-DETR and [T-PAMI 2024] Vote2Cap-DETR++; A set-to-set perspective towards 3D Dense Captioning; State-of-the-Art 3D Dense Captioning methods
MIT License
76 stars 5 forks source link

dataset processing issue #3

Closed cactusycy closed 9 months ago

cactusycy commented 9 months ago

Hi, I've noticed that batch_load_scannet_data.py is the same as one in Scan2Cap. So there is the same issue.

Traceback (most recent call last): File "batch_load_scannet_data.py", line 84, in batch_export() File "batch_load_scannet_data.py", line 79, in batch_export export_one_scan(scan_name, output_filename_prefix) File "batch_load_scannet_data.py", line 29, in export_one_scan mesh_vertices, aligned_vertices, semantic_labels, instance_labels, instance_bboxes, aligned_instance_bboxes = export(mesh_file, agg_file, seg_file, meta_file, LABEL_MAP_FILE, None) File "/root/autodl-tmp/Vote2Cap-DETR/data/scannet/load_scannet_data.py", line 56, in export mesh_vertices = scannet_utils.read_mesh_vertices_rgb_normal(mesh_file) File "/root/autodl-tmp/Vote2Cap-DETR/data/scannet/scannet_utils.py", line 99, in read_mesh_vertices_rgb_normal assert(os.path.isfile(filename)) AssertionError

So how should I fix it? By the way, here is the original link: https://github.com/daveredrum/Scan2Cap/issues/11

ch3cook-fdu commented 9 months ago

This error implies that the directory you choose does not contain the .ply mesh file. To fix this issue, please modify the data directory in this line: https://github.com/daveredrum/Scan2Cap/blob/main/data/scannet/batch_load_scannet_data.py#L16C1-L16C22 to where you store the scannet raw datasets.

For instance, if you have downloaded the scannet under /remote-home/scannet, the directory should look like this:

/remote-home/scannet
          scannet_meta_data 
          scannetv2-labels.combined.tsv
          scans
          scans_test
          tasks

Here, you shall set SCANNET_DIR = '/remote-home/scannet/scans'.

cactusycy commented 9 months ago

Thanks for your reply! But I'm afraid that I did not give a clear question. I knew how to modify the data directory, but the main problem is that after loading 706 scenes this error I mentioned before occurs. It's not a problem about data directory. I guess it's because scannetv2.txt contains 806 scenes while Directory 'data/scannet/scans/' contains only 706 scenes for train and val. So after loading 706 scenes, the program cannot find the 707th. I highly recommend you read the original link: https://github.com/daveredrum/Scan2Cap/issues/11.

ch3cook-fdu commented 9 months ago

You can dismiss that error as long as you can find the corresponding .npy files in the scannet_data directory, since the preprocessing script (batch_load_scannet.py) reads a list of scan_names rather than the folder names.

If you wish to process the last 100 scenes (for test), you can manually set:

SCANNET_DIR = '/remote-home/scannet/scans_test'

Hope this will help you.

cactusycy commented 9 months ago

Thanks! So I guess loading the last 100 scenes is not compulsory?

ch3cook-fdu commented 9 months ago

If you wish to evaluate your models on the validation set only, it is not required to process the test set data. But if you wish to submit results to the official website (scene0707_00 - scene_0806_00), processing the test set is necessary.

ch3cook-fdu commented 9 months ago

The simplest solution is to set:

SCAN_NAMES = os.listdir(SCANNET_DIR)