Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to generate RegionPLC captions #50

Open
junha-l opened this issue Jul 3, 2024 · 3 comments
Open

Command to generate RegionPLC captions #50

junha-l opened this issue Jul 3, 2024 · 3 comments

Comments

@junha-l
Copy link

junha-l commented Jul 3, 2024

Hello,

Thank you for your time and for sharing your work!

I'm interested in reproducing the generated caption dataset provided in here. However, I couldn't find specific instructions on how to generate this dataset.

Could you please provide the exact command(s) or script used to produce the generated captions?
Especially, the one used for scannet - spconv_clip_base15 experiment, i.e. caption_detic-template_and_kosmos_125k_iou0.2.json and scannet_caption_idx_detic-template_and_kosmos_125k_iou0.2.pkl?
This would be extremely helpful for reproducing your results and understanding the generation process.

@jihanyang
Copy link
Member

Hi, the guideline for generating regional captions in RegionPLC.

  • Step 1: Generate captions. You can just check

    elif args.caption_mode == 'kosmos2_dense_caption':
    . You should generate kosmos2 and detic_crop_caption in this case.

  • Step 2: Generate caption index. This is to build the mapping between captions and points in 3D. Please check this file:
    https://github.com/CVMI-Lab/PLA/blob/regionplc/tools/process_tools/generate_caption_idx.py.

  • Step 3: SFusion. You can run this file to merge different captions with SFusion:

    if __name__ == '__main__':
    parser = argparse.ArgumentParser('')
    parser.add_argument('--caption_path_list',
    default=['data/scannetv2/text_embed/caption_dense_scannet_kosmos2_25k.json',
    'data/scannetv2/text_embed/caption_basic_crop_scannet_ofa_image-caption_coco_large_en_ofa_w400-500_over0.3.json'],
    nargs='+', help='')
    parser.add_argument('--caption_idx_path_list',
    default=['data/scannetv2/scannetv2_caption_idx_kosmos2_densecap_25k.pkl',
    'data/scannetv2/scannet_caption_idx_basic_crop.pkl'],
    nargs='+', help='')
    parser.add_argument('--caption_save_path', required=True, type=str, help='')
    parser.add_argument('--caption_idx_save_path', required=True, type=str, help='')
    parser.add_argument('--iou_high_thresh', default=[0.2, 0.2], nargs='+', type=float, help='iou below such threshold can be merge')
    parser.add_argument('--iou_low_thresh', default=[0.0, 0.0], nargs='+', type=float, help='iou higher such threshold can be merge')
    parser.add_argument('--no_cascade', action='store_true', help='if True, the caption idx will not be cascade merged')

@junha-l
Copy link
Author

junha-l commented Jul 5, 2024

Thanks for the prompt and thorough instruction!

@junha-l junha-l closed this as completed Jul 5, 2024
@junha-l junha-l reopened this Jul 10, 2024
@junha-l
Copy link
Author

junha-l commented Jul 10, 2024

Could you also share the arguments for generate_caption_idx.py for ScanNet dataset? I've checked the script but there are only examples for nuscenes dataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants