Restorations

Restore lost details and decompress images

Image restorations are one of the most important operations to perform with Claid API. You can choose from a wide range of AI-powered neural networks to decompress and upscale images for different processing workflows.

Upscale

The upscale operation allows you to improve the overall quality of an image by rendering out new pixels. The upscale operation works along with Resizing through numeric or percentage values for upscaling.

Upscaling is turned off by default. It can be defined by setting the upscale object to one of the following upscaling methods below.

The lower the image resolution is the less information it has, making the upscaling more difficult. We recommend you to try different upscaling methods to increase the chances of finding consistent, quality results.

Properties

NameTypeDescription

smart_enhance

string

Used on small low quality product, real estate and food images.

smart_resize

string

Used on high-quality images and photos with barely readable text.

digital_art

string

Used on drawings, illustrations, paintings, cartoons, anime, etc.

faces

string

Used on images containing people

photo

string

Used on photos of people, nature, architecture, etc. taken with phones or digital cameras.

Request example for Upscale:

This code sample combines the use of restorations and resizing operations. For more details, see Resizing.

"operations": {
    "restorations": {
        "upscale": "smart_enhance"
    },
    "resizing": {
        "width": "200%",
        "height": "200%"
    }
}

Tip: Click on the image to inspect it closer.

Decompress

The decompress operation allows you to remove distortion and artifacts caused by image compression. It can be used in conjunction with the upscale operation to prepare an image for upscaling.

Decompress is turned off by default. It can be configured by setting the decompress object to either moderate or strong, depending on how heavily compressed images are. If you are not sure whether to apply a decompression – you can choose auto-select mode by setting the decompress object to auto.

Possible values:

ValueTypeDescription

moderate

string

Removes JPEG artifacts from the image.

strong

string

Removes JPEG artifacts more aggressively than moderate.

auto

string

Automatically detects and removes JPEG artifacts if needed.

"operations": {
  "restorations": {
    "decompress": "moderate"
  }
}

Last updated