You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above is my segmentation of a single image and the selection of some parameters. The running time is about 10 seconds or more, and it is not as efficient as SAM. May I ask why?
The text was updated successfully, but these errors were encountered:
image_path = ("/home/dongjun/zdj/code/CAST-simple/data/cityscapes/leftImg8bit/train/aachen"
"/aachen_000000_000019_leftImg8bit.png")
加载图像
raw_image = np.array(Image.open(image_path).convert("RGB"))
st = time.time()
构建模型
efficientvit_sam = create_sam_model(
name="xl1", weight_url="/home/dongjun/zdj/model/Efficientvit_sam/xl1.pt",
)
efficientvit_sam = efficientvit_sam.cuda().eval()
efficientvit_mask_generator = EfficientViTSamAutomaticMaskGenerator(efficientvit_sam)
masks, feat = efficientvit_mask_generator.generate(raw_image)
class EfficientViTSamAutomaticMaskGenerator(SamAutomaticMaskGenerator):
def init(
self,
model: EfficientViTSam,
points_per_side: int or None = 64,
points_per_batch: int = 128,
pred_iou_thresh: float = 0.86,
stability_score_thresh: float = 0.92,
stability_score_offset: float = 0.7,
box_nms_thresh: float = 0.7,
crop_n_layers: int = 0,
crop_nms_thresh: float = 0.7,
crop_overlap_ratio: float = 512 / 1500,
crop_n_points_downscale_factor: int = 1,
point_grids: list[np.ndarray] or None = None,
min_mask_region_area: int = 25,
output_mode: str = "binary_mask",
The above is my segmentation of a single image and the selection of some parameters. The running time is about 10 seconds or more, and it is not as efficient as SAM. May I ask why?
The text was updated successfully, but these errors were encountered: