init project
Browse files- modules/pe3r/models.py +4 -2
modules/pe3r/models.py
CHANGED
@@ -12,6 +12,7 @@ from modules.mobilesamv2 import sam_model_registry
|
|
12 |
from sam2.sam2_video_predictor import SAM2VideoPredictor
|
13 |
import spaces
|
14 |
import torch
|
|
|
15 |
|
16 |
class Models:
|
17 |
@spaces.GPU
|
@@ -47,8 +48,9 @@ class Models:
|
|
47 |
self.mobilesamv2.eval()
|
48 |
|
49 |
# -- yolov8 --
|
50 |
-
YOLO8_CKP='./checkpoints/ObjectAwareModel.pt'
|
51 |
-
self.yolov8 = ObjectAwareModel(YOLO8_CKP)
|
|
|
52 |
|
53 |
# -- siglip --
|
54 |
self.siglip = AutoModel.from_pretrained("google/siglip-large-patch16-256", device_map=device)
|
|
|
12 |
from sam2.sam2_video_predictor import SAM2VideoPredictor
|
13 |
import spaces
|
14 |
import torch
|
15 |
+
from ultralytics import YOLOvv8
|
16 |
|
17 |
class Models:
|
18 |
@spaces.GPU
|
|
|
48 |
self.mobilesamv2.eval()
|
49 |
|
50 |
# -- yolov8 --
|
51 |
+
# YOLO8_CKP='./checkpoints/ObjectAwareModel.pt'
|
52 |
+
# self.yolov8 = ObjectAwareModel(YOLO8_CKP)
|
53 |
+
self.yolov8 = YOLOvv8.from_pretrained("Ultralytics/YOLOv8")
|
54 |
|
55 |
# -- siglip --
|
56 |
self.siglip = AutoModel.from_pretrained("google/siglip-large-patch16-256", device_map=device)
|