Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: sam3cpp_video
name: sam3cpp_video-edgetam-f16
provider: PABannier (sam3.cpp)
display_name: "EdgeTAM Video (sam3.cpp / Metal, f16, 27 MB)"
model_path: https://huggingface.co/PABannier/sam3.cpp/resolve/main/edgetam_f16.ggml
n_threads: 4
use_gpu: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: sam3cpp_video
name: sam3cpp_video-edgetam-q4_0
provider: PABannier (sam3.cpp)
display_name: "EdgeTAM Video (sam3.cpp / Metal, q4_0, 15 MB)"
model_path: https://huggingface.co/PABannier/sam3.cpp/resolve/main/edgetam_q4_0.ggml
n_threads: 4
use_gpu: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: sam3cpp_video
name: sam3cpp_video-sam3-q4_0
provider: PABannier (sam3.cpp)
display_name: "SAM 3 Video (sam3.cpp / Metal, q4_0, 707 MB)"
model_path: https://huggingface.co/PABannier/sam3.cpp/resolve/main/sam3-q4_0.ggml
n_threads: 4
use_gpu: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: sam3cpp_video
name: sam3cpp_video-sam3_visual-f16
provider: PABannier (sam3.cpp)
display_name: "SAM 3 Visual Video (sam3.cpp / Metal, f16, 946 MB)"
model_path: https://huggingface.co/PABannier/sam3.cpp/resolve/main/sam3-visual-f16.ggml
n_threads: 4
use_gpu: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: sam3cpp_video
name: sam3cpp_video-sam3_visual-q4_0
provider: PABannier (sam3.cpp)
display_name: "SAM 3 Visual Video (sam3.cpp / Metal, q4_0, 289 MB)"
model_path: https://huggingface.co/PABannier/sam3.cpp/resolve/main/sam3-visual-q4_0.ggml
n_threads: 4
use_gpu: true
10 changes: 10 additions & 0 deletions anylabeling/configs/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@
config_file: ":/sam2_hiera_tiny_video.yaml"
- model_name: "sam2_hiera_tiny-r20240801"
config_file: ":/sam2_hiera_tiny.yaml"
- model_name: "sam3cpp_video-edgetam-q4_0"
config_file: ":/sam3cpp_video_edgetam_q4_0.yaml"
- model_name: "sam3cpp_video-edgetam-f16"
config_file: ":/sam3cpp_video_edgetam_f16.yaml"
- model_name: "sam3cpp_video-sam3_visual-q4_0"
config_file: ":/sam3cpp_video_sam3_visual_q4_0.yaml"
- model_name: "sam3cpp_video-sam3_visual-f16"
config_file: ":/sam3cpp_video_sam3_visual_f16.yaml"
- model_name: "sam3cpp_video-sam3-q4_0"
config_file: ":/sam3cpp_video_sam3_q4_0.yaml"
- model_name: "segment_anything_vit_b_quant-r20230810"
config_file: ":/segment_anything_vit_b_quant.yaml"
- model_name: "segment_anything_vit_b-r20230810"
Expand Down
9 changes: 9 additions & 0 deletions anylabeling/services/auto_labeling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"segment_anything",
"segment_anything_2",
"segment_anything_2_video",
"sam3cpp_video",
"sam_med2d",
"sam_hq",
"yolov5",
Expand Down Expand Up @@ -89,6 +90,7 @@
# --- set_cache_auto_label ---
_CACHED_AUTO_LABELING_MODELS = [
"segment_anything_2_video",
"sam3cpp_video",
"remote_server",
]

Expand All @@ -99,6 +101,7 @@
"segment_anything",
"segment_anything_2",
"segment_anything_2_video",
"sam3cpp_video",
"sam_med2d",
"sam_hq",
"yolov5_sam",
Expand All @@ -119,6 +122,7 @@
"segment_anything",
"segment_anything_2",
"segment_anything_2_video",
"sam3cpp_video",
"sam_med2d",
"sam_hq",
"yolov5_sam",
Expand All @@ -136,6 +140,7 @@
"segment_anything",
"segment_anything_2",
"segment_anything_2_video",
"sam3cpp_video",
"sam_med2d",
"sam_hq",
"yolov5_sam",
Expand Down Expand Up @@ -175,6 +180,7 @@
"yolov8_seg_track",
"yolov8_pose_track",
"segment_anything_2_video",
"sam3cpp_video",
"yolo11_det_track",
"yolo11_seg_track",
"yolo11_obb_track",
Expand Down Expand Up @@ -336,12 +342,14 @@
"u_rtdetr",
"yoloe",
"segment_anything_2_video",
"sam3cpp_video",
]


# --- set_auto_labeling_prompt ---
_AUTO_LABELING_PROMPT_MODELS = [
"segment_anything_2_video",
"sam3cpp_video",
]


Expand Down Expand Up @@ -395,5 +403,6 @@
# --- batch_processing_video_models ---
_BATCH_PROCESSING_VIDEO_MODELS = [
"segment_anything_2_video",
"sam3cpp_video",
# "remote_server",
]
22 changes: 22 additions & 0 deletions anylabeling/services/auto_labeling/model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,28 @@ def _load_model(self, model_id): # noqa: C901
return
# Request next files for prediction
self.request_next_files_requested.emit()
elif model_config["type"] == "sam3cpp_video":
try:
from .segment_anything_3_video import SegmentAnything3Video

model_config["model"] = SegmentAnything3Video(
model_config, on_message=self.new_model_status.emit
)
self.auto_segmentation_model_selected.emit()
logger.info(
f"✅ Model loaded successfully: {model_config['type']}"
)
except Exception as e: # noqa
logger.error(
f"❌ Error in loading model: {model_config['type']} with error: {str(e)}"
)
template = "Error in loading model: {error_message}"
translated_template = self.tr(template)
error_text = translated_template.format(error_message=str(e))
self.new_model_status.emit(error_text)
return
# Request next files for prediction
self.request_next_files_requested.emit()
elif model_config["type"] == "efficientvit_sam":
from .efficientvit_sam import EfficientViT_SAM

Expand Down
Loading