mcpField
I
image-upscaling

image-upscaling

github.com/awesome-genmediaクリエイティブ・メディア4340 回インストール32 週間前に更新
リポジトリ

image-upscaling について

image-upscalingは、each::senseを使って画像を拡大・補正するスキルです。リクエストに応じたモデル選択を行い、印刷用画像や商品写真、古い写真の修復などに使えます。

主な機能

  1. 01アップスケール用モデルの自動選択
  2. 02解像度の拡大とディテール復元
  3. 03ノイズや圧縮アーティファクトの除去
  4. 041リクエストにつき最大4枚の参照画像
  5. 05ストリーミングと一括応答

活用シーン

  1. 01ウェブ画像の印刷準備
  2. 02EC商品写真の補正
  3. 03スキャンした古い写真の修復
  4. 04AI生成画像の高解像度化

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/awesome-genmedia/skills --skill image-upscaling

インストール後、Claude Code で/image-upscalingを入力して読み込まれたか確認します。

詳細

画像のアップスケーリング

each::sense を使用して、AI によるディテール強化で画像の解像度を上げます。each::sense は、リクエストに最適なモデルを自動的に選択するインテリジェントな AI エージェントです。

クイックスタート

each::labs の API キーが必要です。eachlabs.ai で取得してください。

curl を使用する
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Upscale this image to the highest resolution possible. Preserve sharpness and fine detail. Enhance texture without adding artifacts."},
              {"type": "image_url", "image_url": {"url": "https://example.com/low-res-photo.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
Python を使用する(OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_EACHLABS_API_KEY",
    base_url="https://eachsense-agent.core.eachlabs.run/v1"
)

response = client.chat.completions.create(
    model="eachsense/beta",
    messages=[{"role": "user", "content": "Upscale this image to the highest resolution possible. Preserve sharpness and fine detail. Enhance texture without adding artifacts."}],
    # Images are included in the message content array above
)

print(response.choices[0].message.content)
参照画像を使用する
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Upscale the first image. Use the second image as a quality reference for the level of detail and sharpness I expect in the output."},
              {"type": "image_url", "image_url": {"url": "https://example.com/low-res.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/quality-reference.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

画像は OpenAI のマルチモーダルコンテンツ形式を使用して、メッセージ内に送信されます。1 回のリクエストにつき、画像は最大 4 枚です。

ストリーミング

リアルタイムの SSE レスポンスを受け取るには "stream": true を設定し、単一のレスポンスで結果をすべて受け取るには "stream": false を設定します。ストリーミングは UI で進行状況を表示する場合に便利です。スクリプトや自動化には、非ストリーミングのほうがシンプルです。

利用可能なモデル

モデル強み最適な用途
topaz-upscale-image業界最高水準のアップスケーリング、ディテールの復元、アーティファクトの除去あらゆるアップスケーリング作業、印刷準備、写真の修復

each::sense は、アップスケーリングのリクエストを検出すると、topaz-upscale-image を自動的に選択します。

AI アップスケーリングでできること

機能説明
解像度の向上リアルなディテールを追加しながら、画像を 2 倍、4 倍、またはそれ以上に拡大します
ディテールの復元低解像度の画像からテクスチャ、エッジ、細かな特徴を再構築します
ノイズ除去圧縮アーティファクト、JPEG のブロックノイズ、ノイズを除去します
シャープ化ハローや過度なシャープ化を生じさせずに、エッジを鮮明にします
顔の強調小さい顔やぼやけた顔の領域から、顔のディテールを復元します
テクスチャの合成元の画像にはなかった、もっともらしいテクスチャのディテールを生成します

アップスケーリングのシナリオ

シナリオ入力品質期待できる結果
サムネイルからフルサイズへ100-300px全体の形状は良好です。細部は合成されます
Web 画像から印刷用へ600-1200px非常に良好です。ほとんどのディテールが保持され、強調されます
ソーシャルメディア画像からポスターへ1080-2000px優れた仕上がりで、印刷に適した品質です
古い写真の修復さまざま、多くの場合劣化あり良好に復元できます。ノイズ除去と組み合わせてください
AI 生成画像通常 512-1024px非常に良好です。AI アップスケーリングは AI 画像との相性がとても良いです
スクリーンショットから高解像度へさまざまスクリーンショット内の写真には有効ですが、文字はぼやけることがあります

プロンプトのヒント

基本的なアップスケーリング
"Upscale this image. Maximize resolution while keeping it sharp and natural."
品質の方向性を指定する
"Upscale this image 4x. Prioritize sharpness over smoothness.
Recover fabric texture detail and skin pore detail.
Do not over-smooth or make it look plasticky."
特定の用途向け
"Upscale this product photo for a 24x36 inch print at 300 DPI.
Ensure edges remain crisp and colors stay accurate.
Remove any compression artifacts from the original."
アップスケーリングと強調を組み合わせる
"Upscale this old family photo. Remove noise and grain.
Sharpen facial features. Correct any color fading.
Output at the highest resolution possible."

例

一般的な写真のアップスケーリング
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Upscale this photo to the maximum resolution. Keep it photorealistic, sharp, and detailed. Preserve natural skin texture and fabric detail. Remove any JPEG compression artifacts."},
              {"type": "image_url", "image_url": {"url": "https://example.com/vacation-photo-small.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
E コマース商品の強調
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Upscale this product image for a high-resolution e-commerce listing. The output should be sharp enough for zoom-in product inspection. Enhance material textures — leather grain, stitching detail, metal hardware shine. Remove any noise or compression artifacts."},
              {"type": "image_url", "image_url": {"url": "https://example.com/handbag-thumbnail.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
古い写真の修復
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Upscale and restore this old scanned photograph. Remove film grain and scanning artifacts. Sharpen facial features while keeping the image natural. Correct any color shifts from aging. Output at the highest possible resolution while maintaining a realistic look."},
              {"type": "image_url", "image_url": {"url": "https://example.com/1970s-family-photo.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
AI 生成アートの強調
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Upscale this AI-generated artwork for large-format printing. Enhance the painterly textures and fine brush stroke details. Keep the artistic style intact while increasing resolution. Target print quality at 300 DPI for a 20x30 inch poster."},
              {"type": "image_url", "image_url": {"url": "https://example.com/ai-artwork-1024px.png"}}
            ]
          }
    ],
    "stream": false
  }'
印刷の準備
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Upscale this landscape photograph for large-format printing on canvas. Maximum resolution. Enhance foliage detail, water reflections, and sky gradients. Ensure smooth tonal transitions with no banding. The output will be printed at 40x60 inches, so quality must be exceptional."},
              {"type": "image_url", "image_url": {"url": "https://example.com/landscape-web-size.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

バッチアップスケーリング

# Upscale a batch of product images
IMAGES=(
  "https://example.com/product-a.jpg"
  "https://example.com/product-b.jpg"
  "https://example.com/product-c.jpg"
)

for IMG in "${IMAGES[@]}"; do
  curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
    -H "Content-Type: application/json" \
    -H "X-API-Key: $EACHLABS_API_KEY" \
    -d "{
      \"messages\": [{\"role\": \"user\", \"content\": \"Upscale to maximum resolution. Preserve sharpness and detail. Remove compression artifacts.\"}],
      \"image_urls\": [\"$IMG\"],
      \"stream\": false
    }"
  echo "---"
done

解像度と印刷サイズのガイド

入力解像度拡大率出力解像度最大印刷サイズ(300 DPI)
512 x 5124x2048 x 2048~7 x 7 inches
1024 x 10244x4096 x 4096~14 x 14 inches
1920 x 10804x7680 x 4320~26 x 14 inches
2048 x 15362x4096 x 3072~14 x 10 inches
3000 x 20002x6000 x 4000~20 x 13 inches

よくある落とし穴

  • 極端に低い解像度(100px 未満)では、処理に使えるデータがほとんどありません。どのような場合でも、結果はぼやけます。
  • 過度なアップスケーリング(例:16x)は、次第に効果が薄れます。品質を保つには 2x-4x が最適です。
  • 新しい情報を期待すること:アップスケーリングはディテールを強調・合成しますが、元々撮影されていない情報を復元することはできません。
  • 画像内の文字は、アップスケーリング中にぼやけたり歪んだりすることがあります。文字は自然な画像よりも再構築が困難です。
  • 元画像の強い JPEG 圧縮によって生じたアーティファクトは、アップスケーリングで強調される場合があります。アーティファクトの除去を明示的に指定してください。
  • 過度な平滑化によって、画像が不自然に見えることがあります。顔が滑らかになりすぎる場合は、「テクスチャを保ち、プラスチックのような見た目を避ける」と指定してください。

おすすめのワークフロー

  1. まず、手元にある最適なソース(解像度が最も高く、圧縮が最も少ないもの)から始めます
  2. 先にアップスケールしてから、ほかの編集を適用します
  3. モデルが適切に最適化できるよう、用途(ウェブ、印刷、ソーシャルメディア)を指定します
  4. 編集と組み合わせて、仕上がりを完全に向上させます。アップスケールし、色を補正してから、最終調整を行います

関連スキル

  • 画像編集 — アップスケール後に画像を編集します
  • 背景の削除 — アップスケールした画像の背景を削除します
  • 画像生成 — 高品質な画像をゼロから生成します
  • 顔の入れ替え — アップスケールした高解像度写真の顔を入れ替えます

ドキュメント

コメント