imageSegmenterCapabilitiesForPlatform function

TaskCapabilities imageSegmenterCapabilitiesForPlatform(
  1. TaskPlatform platform
)

Image Segmenter, declared as imageClassifierCapabilitiesForPlatform, except on Android, where only the CPU is offered (_androidSegmenterGpuGap).

Implementation

TaskCapabilities imageSegmenterCapabilitiesForPlatform(TaskPlatform platform) =>
    _visionTaskCapabilities(
      platform,
      'ImageSegmenter',
      webAdapter: imageSegmenterBackendFactory != null,
      linuxGpu: true,
      macosGpu: true,
      androidGpuGap: _androidSegmenterGpuGap,
    );