init project
Browse files- modules/pe3r/models.py +2 -2
modules/pe3r/models.py
CHANGED
|
@@ -5,7 +5,7 @@ sys.path.append(os.path.abspath('./modules/ultralytics'))
|
|
| 5 |
from transformers import AutoTokenizer, AutoModel, AutoProcessor
|
| 6 |
from modules.mast3r.model import AsymmetricMASt3R
|
| 7 |
|
| 8 |
-
from modules.sam2.build_sam import build_sam2_video_predictor
|
| 9 |
from modules.mobilesamv2.promt_mobilesamv2 import ObjectAwareModel
|
| 10 |
from modules.mobilesamv2 import sam_model_registry
|
| 11 |
|
|
@@ -24,7 +24,7 @@ class Models:
|
|
| 24 |
# SAM2_CONFIG = "./configs/sam2.1/sam2.1_hiera_l.yaml"
|
| 25 |
# self.sam2 = build_sam2_video_predictor(SAM2_CONFIG, SAM2_CKP, device=device, apply_postprocessing=False)
|
| 26 |
# self.sam2.eval()
|
| 27 |
-
self.sam2 = SAM2VideoPredictor.from_pretrained('facebook/sam2.1-hiera-large')
|
| 28 |
|
| 29 |
# -- mobilesamv2 & sam1 --
|
| 30 |
# SAM1_ENCODER_CKP = './checkpoints/sam_vit_h.pt'
|
|
|
|
| 5 |
from transformers import AutoTokenizer, AutoModel, AutoProcessor
|
| 6 |
from modules.mast3r.model import AsymmetricMASt3R
|
| 7 |
|
| 8 |
+
# from modules.sam2.build_sam import build_sam2_video_predictor
|
| 9 |
from modules.mobilesamv2.promt_mobilesamv2 import ObjectAwareModel
|
| 10 |
from modules.mobilesamv2 import sam_model_registry
|
| 11 |
|
|
|
|
| 24 |
# SAM2_CONFIG = "./configs/sam2.1/sam2.1_hiera_l.yaml"
|
| 25 |
# self.sam2 = build_sam2_video_predictor(SAM2_CONFIG, SAM2_CKP, device=device, apply_postprocessing=False)
|
| 26 |
# self.sam2.eval()
|
| 27 |
+
self.sam2 = SAM2VideoPredictor.from_pretrained('facebook/sam2.1-hiera-large', device=device)
|
| 28 |
|
| 29 |
# -- mobilesamv2 & sam1 --
|
| 30 |
# SAM1_ENCODER_CKP = './checkpoints/sam_vit_h.pt'
|