4KAgent
A multi-agent framework that upscales any image, whatever its degradation or domain, to 4K resolution.
- Source repo
- taco-group/4KAgent
- Stars
- ★ 845
- Last updated
- 1y ago v1.0
- FARS reviewed
- Nov 08, 2026
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 39/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changes
- Cost
- Free software; you pay for model usage
- Setup effort
- High · needs real infrastructure
- You'll need
- Typical use
- Researchers reproducing or benchmarking 4K super-resolution on Set5, Urban100, DRealSR and similar datasets
- Not a fit if
- Users without GPUs or with limited VRAM who want CPU inference
- Teams wanting a one-command install without Conda and model wiring
- Simple upscaling needs where a multi-agent pipeline is overkill
- Website
- 4kagent.github.io ↗ set on GitHub
- Maintenance
- No commits for 6+ monthslast commit 2025-09-23latest release v1.0 (2025-09-24)
- Source review
- 39/100 · Major gaps 2 safety controls not found
What does this agent do, and when should you use it?
4KAgent is a NeurIPS 2025 agentic super-resolution generalist that aims to restore any image to 4K, spanning classical and real-world degradations, extreme low-quality inputs, AI-generated images, and scientific imaging such as remote sensing, microscopy, pathology and medical scans. It pairs a Perception Agent that uses large vision-language models to analyze image content and distortion with a Restoration Agent that runs an execution–reflection–rollback loop over a toolbox of restoration and upscaling methods. A Quality-Driven Mixture-of-Expert (Q-MoE) policy picks the best candidate at each step, and a separate face restoration pipeline handles faces. Tasks are configured through profile files, so the system adapts without additional training, and inference is driven by the infer_4kagent.py CLI, which writes per-image folders of logs and intermediate outputs alongside evaluation scripts in eval/.
4KAgent reads images from an input directory, asks its Perception Agent — backed by a vision-language model such as llama_vision or an externally launched DepictQA service — to diagnose content and distortion, and emits a restoration plan. The Restoration Agent follows a profile (ExpSR_s4_F, ExpSR_s4_P, FastGen4K_P, OldP4K_P, GenMIR_P and others) to invoke deblurring, denoising, brightening, gamma correction and super-resolution tools, iterating through execution–reflection–rollback and selecting the best image via Q-MoE; with FaceRestore enabled it applies codeformer, gfpgan or keeps the original face. Outputs are per-image folders containing logs and stage-wise images; utils/image_export.py extracts final outputs, utils/toolchain_export.py prints the toolchain used per image, and utils/face_restoration_tool_export.py reports face tools. Scripts in eval/ compute PSNR/SSIM/LPIPS plus no-reference metrics such as NIQE, MUSIQ, MANIQA and CLIPIQA.
- Researchers reproducing or benchmarking 4K super-resolution on Set5, Urban100, DRealSR and similar datasets
- Remote-sensing teams upscaling and scoring satellite imagery such as AID, DIOR, DOTA or WorldStrat
- Medical and biological imaging groups enhancing microscopy, pathology, X-ray or ultrasound images
- Old-photo restoration work using the OldP4K_P profile on degraded historical photographs
- AI-art creators pushing generated images to 4K while repairing faces through the face pipeline
- Engineers who want to chain multiple restoration tools and audit which toolchain each image used
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Config files
config.yml
How do you install or deploy this agent?
Setup details live in the repository's Installation Guide (installation/Installation.md); the README does not list the full dependency set. An API key must be filled into config.yml before inference. To use DepictQA as the perception VLM, prepare its environment separately:
cd ./DepictQA
conda activate depictqaTo fetch the DIV4K-50 dataset:
python -m pip install "huggingface_hub[cli]"
huggingface-cli download --repo-type dataset YSZuo/DIV4K-50 --local-dir ./dataset/DIV4K-50
cd ./dataset/DIV4K-50
unzip DIV4K-50.zipHow do you use this agent?
Fill the VLM API key into config.yml first. With llama_vision as the perception VLM, run inference directly:
CUDA_VISIBLE_DEVICES=1 python infer_4kagent.py \
--input_dir ./assets/profile_test_example/classicsr \
--output_dir ./outputs/4KAgent_test/classicsr \
--profile_name ExpSR_s4_F \
--tool_run_gpu_id 2With DepictQA, start its service in one terminal and run inference in another (the FastGen4K_P profile is recommended for speed and perceptual quality):
# terminal A
cd ./DepictQA
conda activate depictqa
CUDA_VISIBLE_DEVICES=0 python src/app_eval.py# terminal B
CUDA_VISIBLE_DEVICES=1 python infer_4kagent.py \
--input_dir ./assets/profile_test_example/4ksr \
--output_dir ./outputs/4KAgent_test/4ksr \
--profile_name FastGen4K_P \
--tool_run_gpu_id 2Other profiles include OldP4K_P for old photos and GenMIR_P for multiple-degradation restoration. Custom profiles can be based on examples in pipeline/profiles, documented in pipeline/profiles/profile_setup.md.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- sensitive-data handling — Use dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
What are this agent's strengths and limitations?
- First agent framework targeting universal any-image-to-4K upscaling, covering classical/real degradations, remote sensing, microscopy, medical imaging and AIGC
- Two-agent perception/restoration design lets a VLM diagnose distortion and propose a restoration plan instead of hand-tuned pipelines
- Q-MoE selection with an execution–reflection–rollback loop chooses the best candidate at every restoration step
- Profile files switch between restoration tasks without additional training
- Ships the DIV4K-50 dataset and task-specific evaluation scripts for reproducible measurement
- Installation is delegated to installation/Installation.md; the README gives no complete dependency list
- Multi-GPU setup is assumed (CUDA_VISIBLE_DEVICES plus a separate tool_run_gpu_id in every example)
- Depends on an external VLM: an API key in config.yml or a separately running DepictQA service
- DepictQA and the restoration tools referenced in Toolbox.md must each be set up, lengthening deployment
- Benchmark result artifacts are hosted on Google Drive rather than bundled in the repo
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| 4KAgent This agent | 39 · Major gaps | CLIFree + model costs | ★ 845 | 1y ago | Python | — |
| Gamma-World: Multi-Agent World Model | 38 · Major gaps | — | ★ 580 | 5mo ago | Python | — |
| veRL Agent Training | 47 · Major gaps | CLIFree + model costs | ★ 2.5k | 5mo ago | Python | — |
| AgileRL | 62 · Some gaps | Library / SDKFreemium | ★ 973 | 3d ago | Python | — |
How does FollowAgents rate this agent?
Why each dimension lost points
The README says an API key must be configured and describes VLMs and multiple image-restoration tools, but the supplied material does not show key protection, permission limits, image transfer paths, or privacy handling, so least privilege, data-flow transparency, and sensitive-data handling score low. No per-action user confirmation is documented. The stated effects are mainly local output images and logs, with limited detail on external effects and rollback. The README names authors, cites a paper, and acknowledges a base project and tools, providing useful but incomplete attribution.
The README gives inference commands for several tasks and points to evaluation scripts, but a supplied configuration uses machine-specific absolute dataset paths. Inference also depends on an API, GPUs, an external VLM service, and multiple model tools, limiting ordinary availability. The material does not describe error handling or user-facing failure messages.
Documentation covers classical, real-world, mixed-degradation, face, remote-sensing, microscopy, pathology, and medical imaging, and says profiles can be customized. Boundaries are mostly broad claims and examples; unsupported cases, precise triggers, and deployment resource limits are not clearly stated. Commands assume CUDA, multiple GPUs, and a specific service setup.
The README organizes installation, inference, profiles, datasets, evaluation, results, and citation, with several command examples. Installation details are delegated to another guide, and sample profile names vary in punctuation, such as ExpSR_s4_F versus ExpSR-s4-F. Limitations are sparse and no change history is supplied; the Apache 2.0 license is explicit. Authors and a contact email are listed, but maintenance responsibility and update path are unclear.
The framework aims to select restoration steps based on image content and degradation, and provides output images plus exportable logs and toolchains, which can serve research and batch workflows. The material lists tasks and evaluation scripts, but performance evidence is linked externally rather than reported here, and API, GPU, and tool requirements raise deployment costs. Claims such as “perfect 4K” exceed what the supplied material can verify.
The README gives traceable descriptions of the architecture, profiles, inference entry point, dataset, and evaluation scripts, and identifies the paper, authors, and base project. The other supplied source files are one test script and two configuration samples, which cannot independently corroborate the overall framework behavior or results. Promotional capability claims are not clearly separated from evidence, so some conclusions remain author-reported.
- Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- Running requires an API key and depends on GPUs, a VLM service, and multiple restoration tools; the supplied material does not say whether images are sent to external services or how keys are protected.
- “Any image” and “perfect 4K” are broad claims; this static packet cannot verify output quality or reproduce the full workflow.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
v1.0 4kagent-v1.0
FAQ
Can it run on a single GPU?
Is DepictQA mandatory?
Does using it cost money?
How do I get just the final images?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.