CommunityImagemgithub.com

image-4k-enhancement

Enhances reference images to ultra-high-resolution 4K while preserving original facial identity, anatomy, composition, colors, lighting, and natural textures. Use for photorealistic image restoration, detail reconstruction, noise removal, and image upscaling.

O que é image-4k-enhancement?

image-4k-enhancement is a Claude Code agent skill that enhances reference images to ultra-high-resolution 4K while preserving original facial identity, anatomy, composition, colors, lighting, and natural textures. Use for photorealistic image restoration, detail reconstruction, noise removal, and image upscaling.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/gary-ms/Image-Enhancement/tree/HEAD

Installed? Explore more Imagem skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Image 4K Enhancement

1. Core Objective

Perform ultra-high-resolution 4K image enhancement based strictly on the provided reference image.

The original image is the absolute source of truth.

The objective is to produce a true-to-life, photorealistic upscale that matches the reference exactly, only clearer, sharper, cleaner, and higher in resolution.

This is an image enhancement task, not an image redesign or artistic reinterpretation.

2. Identity and Composition Preservation

Maintain absolute fidelity to the original image.

Preserve without deviation:

  • Original facial anatomy, proportions, and identity.
  • Facial features and structural characteristics.
  • Original expression and gaze direction.
  • Body proportions and pose.
  • Camera angle and perspective.
  • Original framing and composition.
  • Clothing, hairstyle, and accessories.
  • Background elements and their placement.

All visual elements must remain unchanged in structure, placement, and design.

No reshaping, repositioning, or unintended modifications.

3. Fine-Grain Detail Reconstruction

Recover fine-grain details with natural realism.

Enhance the following elements:

  • Natural skin pores and fine lines.
  • Individual hair strands.
  • Eyelashes and eyebrows.
  • Fabric weave and clothing textures.
  • Seams and material edges.
  • Fine surface details.
  • Natural object boundaries.

Apply controlled sharpening and high-frequency detail reconstruction.

Improve clarity without introducing artificial textures or exaggerated details.

4. Noise and Artifact Removal

Remove unwanted image degradation while retaining authentic texture.

Perform:

  • Digital noise reduction.
  • Grain removal.
  • Compression artifact removal.
  • JPEG artifact reduction.
  • Pixelation reduction.
  • Controlled clarity enhancement.

Avoid excessive denoising that removes natural skin texture or original material characteristics.

5. Color Science and Tonal Preservation

Maintain the original color science exactly as captured.

Preserve:

  • Original white balance.
  • Natural skin tones.
  • Original color relationships.
  • Saturation and tonal balance.
  • Highlight and shadow relationships.
  • Original contrast characteristics.

Do not introduce artificial color grading, recoloring, or unwanted tonal changes.

6. Lighting Preservation

Lighting must match the original reference image precisely.

Preserve:

  • Lighting direction.
  • Light intensity.
  • Original exposure characteristics.
  • Contrast.
  • Shadow direction and behavior.
  • Highlight placement.
  • Natural light distribution.

Only improve image clarity and recover existing dynamic range.

Strictly prohibit:

  • Artificial relighting.
  • New light sources.
  • Modified shadow directions.
  • Artificial HDR effects.
  • Unnatural highlights.

7. Skin and Texture Authenticity

Maintain realistic and authentic skin texture.

Strictly avoid:

  • Artificial skin smoothing.
  • Plastic-looking skin.
  • Excessive beauty enhancement.
  • Artificial gloss.
  • Overprocessed facial textures.
  • Loss of natural imperfections.

Skin must retain its original character, texture, and realistic appearance.

8. Negative Constraints

The following modifications are strictly prohibited:

  • Facial identity changes.
  • Facial drift.
  • Anatomical distortions.
  • Warping or stretching.
  • Added or missing anatomy.
  • Altered hands or fingers.
  • Changes in body proportions.
  • Perspective shifts.
  • Composition changes.
  • Unwanted text or graphics.
  • Hallucinated details.
  • Stylized rendering.
  • Cartoon or CGI appearance.
  • Artificial textures.
  • Excessive sharpening.
  • Unnatural skin reconstruction.

Never sacrifice original fidelity for artificial visual quality.

9. Final Output Requirements

The final image must satisfy all of the following:

  • Ultra-high-resolution 4K quality.
  • True-to-life photorealistic appearance.
  • Natural fine-grain details.
  • Clean and stable edges.
  • Reduced noise and compression artifacts.
  • Original facial identity preserved.
  • Original composition preserved.
  • Original colors and lighting preserved.
  • No unwanted modifications.

The result must look like the exact same photograph captured with a significantly better imaging system.

10. How to Execute in the Sandbox

The sandbox has no generative super-resolution model and no network access, so the rules above are applied with classical processing:

  1. Work on a copy of the uploaded image; never overwrite the original.
  2. Scale with Lanczos so the long side is 3840 px (portrait: 2160 x 3840), keeping the aspect ratio. No stretching and no cropping unless the user asks. If the image is already 4K or larger, do not enlarge it.
  3. Denoise only if the image is noisy or has JPEG artifacts, with low strength (for example cv2.fastNlMeansDenoisingColored(img, None, 3, 3, 7, 21)), so skin and material texture survive.
  4. Sharpen once after upscaling with a mild Unsharp Mask (radius=1.2, percent=80-100, threshold=3). Reduce it if halos appear.
  5. Do not change color, contrast, or lighting. Skip CLAHE and any grading unless the user asks.
  6. Save PNG for graphics or transparency, JPEG (quality=95, subsampling=0) for photos, named <original-name>_4k.<ext>.
  7. Verify the output dimensions in code and inspect a 100% crop of faces, text, and edges for halos, plastic texture, or color shift.
  8. Send the file to the user, then reply in 2-3 sentences: before and after size, what was applied, and an honest note that classical upscaling does not add true new detail. If the user wants AI-generated detail, say it needs a model such as Real-ESRGAN run on their own computer.

11. Final Instruction

ENHANCE, NEVER REDESIGN.

Prioritize reference fidelity above all other enhancement operations.

If a reconstruction risks changing the original identity, anatomy, composition, lighting, or visual structure, preserve the original information instead.

The final result must be the same image, only clearer, sharper, cleaner, and higher in resolution.

Habilidades Relacionadas