<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/GenerateAttentionBasedSaliencyImageRequest",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision42GenerateAttentionBasedSaliencyImageRequestV"
  },
  "title" : "GenerateAttentionBasedSaliencyImageRequest"
}
-->

# GenerateAttentionBasedSaliencyImageRequest

An object that produces a heat map that identifies the parts of an image most likely to draw attention.

```
struct GenerateAttentionBasedSaliencyImageRequest
```

## Overview

The request returns the resulting heat map and object data in an instance of [`SaliencyImageObservation`](/documentation/Vision/SaliencyImageObservation).

## Topics

### Creating a request

[`init(GenerateAttentionBasedSaliencyImageRequest.Revision?)`](/documentation/Vision/GenerateAttentionBasedSaliencyImageRequest/init(_:))

Creates an attention saliency image request.

### Performing a request

[`func perform(on: URL, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-80bya)

Performs the request on an image URL and produces observations.

[`func perform(on: Data, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3f3f1)

Performs the request on image data and produces observations.

[`func perform(on: CGImage, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-qxxx)

Performs the request on a Core Graphics image and produces observations.

[`func perform(on: CVPixelBuffer, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-xspx)

Performs the request on a pixel buffer and produces observations.

[`func perform(on: CMSampleBuffer, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3hddl)

Performs the request on a Core Media buffer and produces observations.

[`func perform(on: CIImage, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-85ex1)

Performs the request on a Core Image image and produces observations.

### Understanding the result

[`struct SaliencyImageObservation`](/documentation/Vision/SaliencyImageObservation)

An observation that contains a grayscale heat map of important areas across an image.

### Getting the revision

[`let revision: GenerateAttentionBasedSaliencyImageRequest.Revision`](/documentation/Vision/GenerateAttentionBasedSaliencyImageRequest/revision-swift.property)

The algorithm or implementation the request uses.

[`static let supportedRevisions: [GenerateAttentionBasedSaliencyImageRequest.Revision]`](/documentation/Vision/GenerateAttentionBasedSaliencyImageRequest/supportedRevisions)

The collection of revisions the request supports.

[`enum Revision`](/documentation/Vision/GenerateAttentionBasedSaliencyImageRequest/Revision-swift.enum)

A type that describes the algorithm or implementation that the request performs.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`ImageProcessingRequest`](/documentation/Vision/ImageProcessingRequest)

[`VisionRequest`](/documentation/Vision/VisionRequest)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)