MCPcopy
hub / github.com/IPADS-SAI/MobiAgent / detect_icons_simple

Function detect_icons_simple

utils/icon_detection.py:567–587  ·  view source on GitHub ↗

简化的图标检测接口 Args: image: 目标图像 icon_names: 图标名称列表 app_id: 应用ID threshold: 相似度阈值 match_mode: 匹配模式 ('any' 或 'all') Returns: 检测是否成功

(image: Union[np.ndarray, str],
                       icon_names: List[str],
                       app_id: Optional[str] = None,
                       threshold: Optional[float] = None,
                       match_mode: str = 'any')

Source from the content-addressed store, hash-verified

565
566
567def detect_icons_simple(image: Union[np.ndarray, str],
568 icon_names: List[str],
569 app_id: Optional[str] = None,
570 threshold: Optional[float] = None,
571 match_mode: str = 'any') -> bool:
572 """
573 简化的图标检测接口
574
575 Args:
576 image: 目标图像
577 icon_names: 图标名称列表
578 app_id: 应用ID
579 threshold: 相似度阈值
580 match_mode: 匹配模式 ('any''all')
581
582 Returns:
583 检测是否成功
584 """
585 service = get_icon_detection_service()
586 result = service.detect_icons(image, icon_names, app_id, threshold, match_mode)
587 return result['success']
588
589
590def detect_single_icon(image: Union[np.ndarray, str],

Callers 1

detect_single_iconFunction · 0.85

Calls 2

detect_iconsMethod · 0.80

Tested by

no test coverage detected