> For the complete documentation index, see [llms.txt](https://docs.viesus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viesus.com/features/features/ai-artifact-removal.md).

# AI Artifact Removal

AI-based removal of JPEG compression artifacts, blocking, and ringing. Automatic detection mode applies removal only when artifact severity is above the activation threshold.

{% hint style="warning" %}
**Requires:** NVIDIA GPU for production throughput. CPU mode is available but significantly slower.
{% endhint %}

## Example

{% columns %}
{% column %}
**Before**

<figure><img src="https://919968377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FG3eQlcnlDKtn9yl3mxsx%2Fuploads%2Fgit-blob-2aac38d3a6989f640b75c2aeecf11934ec13a3c3%2Fplaceholder.svg?alt=media" alt="Before — AI Artifact Removal"><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}
**After**

<figure><img src="https://919968377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FG3eQlcnlDKtn9yl3mxsx%2Fuploads%2Fgit-blob-2aac38d3a6989f640b75c2aeecf11934ec13a3c3%2Fplaceholder.svg?alt=media" alt="After — AI Artifact Removal"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

## Parameters

<table><thead><tr><th width="116">Parameter</th><th width="97.5999755859375">Section</th><th width="87">Value</th><th width="95.0001220703125">Default</th><th>Description</th></tr></thead><tbody><tr><td><code>ARmode</code></td><td><code>Config</code></td><td>0 – 8</td><td>2</td><td>Mode selection (see below)</td></tr><tr><td><code>arstrength</code></td><td><code>Gpars</code></td><td>0.0 – 1.0</td><td>0.5</td><td>Activation threshold — higher value only triggers on more severely degraded images</td></tr></tbody></table>

## Modes

<table><thead><tr><th width="239.5999755859375">Value</th><th>Description</th></tr></thead><tbody><tr><td><strong>0</strong> — Off</td><td>No artifact removal</td></tr><tr><td><strong>1</strong> — Auto, CPU</td><td>CPU-only DCT smoothing when artifacts detected</td></tr><tr><td><strong>2</strong> — Auto with AI (default)</td><td>Detects artifact severity, selects appropriate AI model</td></tr><tr><td><strong>3</strong> — Auto with AI, fast</td><td>Faster variant of Auto with AI</td></tr><tr><td><strong>4</strong> — Always CPU</td><td>Unconditional CPU-based DCT smoothing</td></tr><tr><td><strong>5</strong> — Always AI</td><td>Unconditional full-quality AI removal</td></tr><tr><td><strong>6</strong> — Always AI, fast</td><td>Unconditional fast AI removal</td></tr><tr><td><strong>7</strong> — Always CPU + AI</td><td>Combined CPU and AI passes</td></tr><tr><td><strong>8</strong> — Always CPU + AI, fast</td><td>Faster combined CPU and AI</td></tr></tbody></table>

{% hint style="success" %}
**Recommended:** Mode 2 (Auto with AI) for general production. Use modes 5 – 8 only when you know every input has heavy compression artifacts.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.viesus.com/features/features/ai-artifact-removal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
