MAXIM

MAXIM

Removes blur and noise from photos: motion blur from camera shake (two models, synthetic and real) and real camera noise, one task per request.

Image Editingimage-restorationdeblurringdenoisingmlpapache-2.0Fine-tunable
MAXIM: Image Editing model on Kainguru

About MAXIM

Capabilities

  • Three repairs — motion_deblurring, real_deblurring and real_denoising, chosen per request
  • Same size out — the result has the photo's own width and height
  • Fine-tunable — train any of the three tasks on your own pairs of damaged and clean pictures

Good to know

  • Pictures are PNG, JPEG or WebP, at most 50 MB and 16.8 megapixels, at least 16 pixels a side; large ones are processed in overlapping tiles of 512 pixels.
  • motion_deblurring was trained on synthetic blur made by averaging video frames; real_deblurring on blur from real handheld shots, a better fit for phone and camera photos. real_denoising was trained on smartphone camera noise.
  • Fine-tuning takes one ZIP (at most 4 GB, no password) with 4 to 1000 pairs of a damaged picture and the same picture clean, both the same size and at least 128 pixels a side, and a manifest.jsonl holding one {"input": "...", "target": "..."} line per pair, paths relative to the manifest.
  • A fine-tune trains one task, the one named in its parameters; the fine-tuned model runs that task.
  • Training stops after the steps you ask for or after 9 hours, whichever comes first, and keeps what it has learned.

Attribution

MAXIM by Google Research (github.com/google-research/maxim), Copyright 2022 Google LLC, Apache License 2.0. The weights are its official MAXIM-3S checkpoints: GoPro for motion_deblurring, RealBlur-J for real_deblurring and SIDD for real_denoising. The network is the PyTorch re-implementation by Zhengzhong Tu et al. (vztu/maxim-pytorch), Apache License 2.0. The Hugging Face page linked above is the Keras port of the GoPro model, listed for its card and licence; the weights served here are the three official checkpoints.

MAXIM inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The picture to restore: PNG, JPEG or WebP, at most 50 MB and 16.8 megapixels, at least 16 pixels a side.
1–2048 characters · image/png, jpeg, webp
tasktextNomotion_deblurringWhat to repair: motion_deblurring (camera shake, made by averaging video frames), real_deblurring (real camera shake) or real_denoising (camera noise). Each model lists its own.
Allowed: motion_deblurring, real_deblurring, real_denoising

Output. Returns PNG image: The restored picture as a PNG of the same size.

Run MAXIM with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=MAXIM" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png",
    "task": "motion_deblurring"
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "MAXIM",
        {
          "image": "https://example.com/input.png",
          "task": "motion_deblurring"
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune MAXIM

You can fine-tune MAXIM on your own data and run the tuned model through the same API. Dataset: One ZIP (at most 4 GB, no password) with 4 to 1000 pairs of a degraded picture and the same picture clean, the same size, and manifest.jsonl with one {"input", "target"} line per pair. More: Good to know, in the README.

The steps are in the docs.

MAXIM pricing

Price per image: 0.0874 credits ($0.000874). The price is shown again before every run; all prices are on the pricing page.

Licence and source

InstructIR: Image Editing model on Kainguru
Image Editing

InstructIR

Restores a photo by following a sentence in plain English, such as remove the noise, take the rain out, fix the blur…

Fine-tunable
SCUNet: Image Editing model on Kainguru
Image Editing

SCUNet

Removes real-world noise from photos, such as the grain of low light, high ISO and phone cameras, and keeps their fine…

Fine-tunable
Swin2SR: Image Editing model on Kainguru
Image Editing

Swin2SR

Enlarges a JPEG-compressed photo 4 times in width and height and removes its blocky compression artefacts as it does.

Fine-tunable
SwinIR: Image Editing model on Kainguru
Image Editing

SwinIR

Enlarges real-world photos 2 or 4 times in width and height and cleans up the blur, noise and compression they carry.

Fine-tunable
Kandinsky 2 2 Img2img: Image Editing model on Kainguru
Image Editing

Kandinsky 2 2 Img2img

Kandinsky 2.2 restyles a photo from a text prompt and keeps its layout; the strength sets how far the result moves…

Qwen-Image-Edit-2509: Image Editing model on Kainguru
Image Editing

Qwen-Image-Edit-2509

Edit a picture from a written instruction, changing objects, people, text or style while keeping the rest consistent.

Fine-tunable