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

High Memory Usage During Initialization #68

Open
kaankarakose opened this issue Mar 15, 2024 · 2 comments
Open

High Memory Usage During Initialization #68

kaankarakose opened this issue Mar 15, 2024 · 2 comments

Comments

@kaankarakose
Copy link

Hi, thank you so much for sharing this great work with us.

I've been working with your repository and have encountered a situation where the software requires a significant amount of memory for initialization (demo_automatic.py). Specifically, during initialization, it allocates around 35GiB of memory for a moment, and subsequently, for processing each frame, it uses about 22GiB. Because of this, it cannot run on 24GiB GPU.

Are there any recommended strategies or modifications to reduce the memory usage for initialization?

Here my configs:
Configuration: {'model': './saves/DEVA-propagation.pth', 'output': '/deva_output', 'save_all': True, 'amp': True, 'key_dim': 64, 'value_dim': 512, 'pix_feat_dim': 512, 'disable_long_term': False, 'max_mid_term_frames': 10, 'min_mid_term_frames': 5, 'max_long_term_elements': 10000, 'num_prototypes': 128, 'top_k': 30, 'mem_every': 5, 'chunk_size': 2, 'size': 360, 'GROUNDING_DINO_CONFIG_PATH': './saves/GroundingDINO_SwinT_OGC.py', 'GROUNDING_DINO_CHECKPOINT_PATH': './saves/groundingdino_swint_ogc.pth', 'DINO_THRESHOLD': 0.35, 'DINO_NMS_THRESHOLD': 0.8, 'SAM_ENCODER_VERSION': 'vit_h', 'SAM_CHECKPOINT_PATH': './saves/sam_vit_h_4b8939.pth', 'MOBILE_SAM_CHECKPOINT_PATH': './saves/mobile_sam.pt', 'SAM_NUM_POINTS_PER_SIDE': 64, 'SAM_NUM_POINTS_PER_BATCH': 64, 'SAM_PRED_IOU_THRESHOLD': 0.88, 'SAM_OVERLAP_THRESHOLD': 0.8, 'img_path': 'test.mp4', 'detection_every': 5, 'num_voting_frames': 3, 'temporal_setting': 'online', 'max_missed_detection_count': 5, 'max_num_objects': 50, 'sam_variant': 'mobile', 'suppress_small_objects': True, 'enable_long_term': True, 'enable_long_term_count_usage': True}

Thank you so much.

@hkchengrex
Copy link
Owner

Thank you for letting me know. I will look into this.

@QiruiH
Copy link

QiruiH commented Aug 12, 2024

I'm having the same issue, have you solved this problem?

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

3 participants