<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSCNNUpsampling",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSCNNUpsampling"
  },
  "title" : "MPSCNNUpsampling"
}
-->

# MPSCNNUpsampling

A filter that resamples an existing MPS image.

```
class MPSCNNUpsampling
```

## Overview

This filter can be used to resample an existing [`MPSImage`](/documentation/MetalPerformanceShaders/MPSImage) using a different sampling frequency for the `x` and `y` dimensions with the purpose of enlarging the size of an image.

The number of output feature channels remains the same as the number of input feature channels.

The `scaleFactor` must be an integer value `>= 1`. The default value is `1`.

Nearest and bilinear variants are supported.

## Topics

### Instance Properties

[`scaleFactorX`](/documentation/MetalPerformanceShaders/MPSCNNUpsampling/scaleFactorX)

[`scaleFactorY`](/documentation/MetalPerformanceShaders/MPSCNNUpsampling/scaleFactorY)

[`alignCorners`](/documentation/MetalPerformanceShaders/MPSCNNUpsampling/alignCorners)

## Relationships

### Inherited By

[`MPSCNNUpsamplingBilinear`](/documentation/MetalPerformanceShaders/MPSCNNUpsamplingBilinear)

[`MPSCNNUpsamplingNearest`](/documentation/MetalPerformanceShaders/MPSCNNUpsamplingNearest)

### Conforms To

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

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

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

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

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

[`NSCoding`](/documentation/Foundation/NSCoding)

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

### Inherits From

[`MPSCNNKernel`](/documentation/MetalPerformanceShaders/MPSCNNKernel)

---

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)