init project
Browse files
checkpoints/ObjectAwareModel.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d99244a9c7a4d7330af28d1801ebee362fa469ac564b57c8eab48b43e4e64a1
|
3 |
+
size 140395126
|
checkpoints/Prompt_guided_Mask_Decoder.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8771b38a57ad67750dbe18fff95e66c8d1789436096738cace37d58bfc06151e
|
3 |
+
size 16310784
|
modules/pe3r/models.py
CHANGED
@@ -12,17 +12,20 @@ from modules.mobilesamv2 import sam_model_registry
|
|
12 |
class Models:
|
13 |
def __init__(self, device):
|
14 |
# -- mast3r --
|
15 |
-
MAST3R_CKP = './checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth'
|
|
|
16 |
self.mast3r = AsymmetricMASt3R.from_pretrained(MAST3R_CKP).to(device)
|
17 |
|
18 |
# -- sam2 --
|
19 |
-
SAM2_CKP = "./checkpoints/sam2.1_hiera_large.pt"
|
|
|
20 |
SAM2_CONFIG = "./configs/sam2.1/sam2.1_hiera_l.yaml"
|
21 |
self.sam2 = build_sam2_video_predictor(SAM2_CONFIG, SAM2_CKP, device=device, apply_postprocessing=False)
|
22 |
self.sam2.eval()
|
23 |
|
24 |
# -- mobilesamv2 & sam1 --
|
25 |
-
SAM1_ENCODER_CKP = './checkpoints/sam_vit_h.pt'
|
|
|
26 |
SAM1_DECODER_CKP = './checkpoints/Prompt_guided_Mask_Decoder.pt'
|
27 |
self.mobilesamv2 = sam_model_registry['sam_vit_h'](None)
|
28 |
image_encoder=sam_model_registry['sam_vit_h_encoder'](SAM1_ENCODER_CKP)
|
|
|
12 |
class Models:
|
13 |
def __init__(self, device):
|
14 |
# -- mast3r --
|
15 |
+
# MAST3R_CKP = './checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth'
|
16 |
+
MAST3R_CKP = 'naver/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric'
|
17 |
self.mast3r = AsymmetricMASt3R.from_pretrained(MAST3R_CKP).to(device)
|
18 |
|
19 |
# -- sam2 --
|
20 |
+
# SAM2_CKP = "./checkpoints/sam2.1_hiera_large.pt"
|
21 |
+
SAM2_CKP = 'facebook/sam2.1-hiera-large'
|
22 |
SAM2_CONFIG = "./configs/sam2.1/sam2.1_hiera_l.yaml"
|
23 |
self.sam2 = build_sam2_video_predictor(SAM2_CONFIG, SAM2_CKP, device=device, apply_postprocessing=False)
|
24 |
self.sam2.eval()
|
25 |
|
26 |
# -- mobilesamv2 & sam1 --
|
27 |
+
# SAM1_ENCODER_CKP = './checkpoints/sam_vit_h.pt'
|
28 |
+
SAM1_ENCODER_CKP = 'facebook/sam-vit-huge'
|
29 |
SAM1_DECODER_CKP = './checkpoints/Prompt_guided_Mask_Decoder.pt'
|
30 |
self.mobilesamv2 = sam_model_registry['sam_vit_h'](None)
|
31 |
image_encoder=sam_model_registry['sam_vit_h_encoder'](SAM1_ENCODER_CKP)
|