photo-restoration について
photo-restorationはeach::senseを利用する古写真修復スキルで、家族写真や歴史的画像、損傷したスキャン画像の修復に向いています。物理的な損傷や退色を補修し、白黒写真のカラー化や段階的な処理も行えます。
主な機能
- 01傷、破れ、折れ目の修復
- 02白黒写真のカラー化
- 03退色した写真の色とコントラストを回復
- 04水濡れの修復と顔の補正
- 05フィルム粒子やノイズの低減
- 06複数ターンおよび一括処理
活用シーン
- 01損傷した古い家族写真の修復
- 02歴史的な白黒写真のカラー化
- 03退色や水濡れがある画像のディテール回復
- 04粒子やぼやけた顔があるスキャン画像の補正
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ eachlabs/ skills --skill photo-restorationインストール後、Claude Code で/photo-restorationを入力して読み込まれたか確認します。
同梱ファイルreferences/SSE-EVENTS.md
詳細
写真の修復
each::sense を使用して、古くなった写真、破損した写真、劣化した写真を修復し、画質を高めます。このスキルでは、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" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore this old damaged family photo - fix the scratches and improve the overall quality"}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/old-family-photo.jpg"]
}'
ユースケースの例
1. 古く破損した写真の修復
傷、汚れ、劣化など、複数の損傷がある写真を修復します。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore this old damaged photo from the 1950s. It has scratches, some staining, and general degradation. Please repair the damage while preserving the authentic vintage feel."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/damaged-1950s-photo.jpg"]
}'
2. 白黒写真のカラー化
白黒写真にリアルな色を加えます。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Colorize this black and white photo from the 1940s. It shows a family portrait - add natural, realistic colors to skin tones, clothing, and the background."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/bw-family-portrait.jpg"]
}'
3. 傷のある写真の修復
写真の傷や表面の損傷を取り除きます。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Remove the scratches from this photo. There are multiple deep scratches across the surface and some light surface marks. Keep the image sharp and clear after repair."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/scratched-photo.jpg"]
}'
4. 色あせた写真の補正
色あせた写真の色とコントラストを取り戻します。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Enhance this faded photo - the colors have washed out over time and the image looks dull. Restore the vibrancy and contrast while keeping it looking natural, not over-processed."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/faded-vintage-photo.jpg"]
}'
5. 水濡れした写真の復元
水や湿気で損傷した写真を修復します。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore this water damaged photo. It has staining, warping effects, and some areas where the image has deteriorated due to moisture. Recover as much detail as possible."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/water-damaged-photo.jpg"]
}'
6. 古い写真の顔の修復
古い写真のぼやけたり劣化したりした顔を補正し、復元します。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore the faces in this old family photo. The faces are blurry and lack detail. Enhance facial features to make them clear and recognizable while maintaining the authentic look of the era."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/old-blurry-faces.jpg"]
}'
7. 歴史的写真の修復
プロ品質の補正でアーカイブ写真を修復します。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore this historical photograph from the early 1900s. It is a street scene that has significant age-related degradation. Improve clarity, fix damage, and optionally colorize it while preserving historical accuracy."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/historical-1900s-street.jpg"]
}'
8. 家族写真の修復
包括的な修復で、大切な家族の思い出をよみがえらせます。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore this precious family photo from my grandparents wedding in 1960. It has yellowing, some creases, and the edges are damaged. Make it look fresh while preserving the nostalgic quality."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/grandparents-wedding.jpg"]
}'
9. 破れた写真の修復
物理的に破れた写真をデジタルで再構成します。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Repair this torn photo - there is a visible tear line running through the middle of the image. Reconstruct the damaged areas seamlessly and restore the photo to its original state."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/torn-photo.jpg"]
}'
10. フィルム粒子の除去
古いフィルム写真の過剰な粒子やノイズを除去します。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Remove the heavy film grain from this old photograph. The grain is very visible and distracting. Clean it up while preserving the sharpness and detail of the image. Keep some subtle texture so it does not look overly processed."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/grainy-film-photo.jpg"]
}'
複数ターンの修復セッション
session_id を使用して、修復を繰り返し調整します。
# Initial restoration
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore this old damaged black and white photo - fix the scratches and damage first"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "family-photo-restoration",
"image_urls": ["https://example.com/old-bw-damaged.jpg"]
}'
# Follow up with colorization
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Now colorize the restored photo with natural colors appropriate for the 1930s era"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "family-photo-restoration"
}'
# Further refinement
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Enhance the faces to make them clearer and more detailed"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "family-photo-restoration"
}'
一括修復
一貫した設定で複数の写真を処理します。
# Photo 1
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore and colorize this old family photo"}],
"model": "eachsense/beta",
"stream": true,
"mode": "eco",
"image_urls": ["https://example.com/family-photo-1.jpg"]
}'
# Photo 2
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore and colorize this old family photo"}],
"model": "eachsense/beta",
"stream": true,
"mode": "eco",
"image_urls": ["https://example.com/family-photo-2.jpg"]
}'
# Photo 3
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Restore and colorize this old family photo"}],
"model": "eachsense/beta",
"stream": true,
"mode": "eco",
"image_urls": ["https://example.com/family-photo-3.jpg"]
}'
モードの選択
処理を始める前にユーザーに確認します。
「速さと手頃な価格を重視しますか、それとも最高品質を重視しますか?」
| モード | おすすめの用途 | 速度 | 品質 |
|---|---|---|---|
max | 最終的な修復、大切な家族写真、プロ向けのアーカイブ作業 | 遅め | 最高 |
eco | クイックプレビュー、一括処理、初期評価 | 速め | 良好 |
ベストプラクティス
最適な結果を得るために
- 背景を伝える:撮影された時代、損傷の種類、特に残したい要素を伝えます
- 損傷の修復から始める:カラー化の前に、傷や裂け目を補修します
- 複数ターンのセッションを使う:複雑なプロジェクトでは、段階的に修復を進めます
- 顔について指定する:顔が重要な場合は、顔の修復を明示的に指定します
- 本来の雰囲気を保つ:希望する場合は、ビンテージらしさを残すよう依頼します
プロンプトのヒント
- 損傷を説明する:傷、裂け目、色あせ、水染み、黄ばみ
- 時代を伝える:適切なカラー化に役立ちます
- 優先事項を伝える:顔、全体の鮮明さ、色の正確さのうち、最も重視するもの
- 仕上がりの希望を伝える:自然な見た目にするか、最大限に補正するか
プロンプトの例
"Restore this [era] photo. The damage includes [list damage types].
Focus on [priority areas]. [Additional preferences like colorization,
authenticity preservation, etc.]"
エラー処理
| エラー | 原因 | 解決策 |
|---|---|---|
Failed to create prediction: HTTP 422 | 残高不足 | eachlabs.ai でチャージしてください |
| コンテンツポリシー違反 | 禁止されているコンテンツ | 写真がコンテンツポリシーに準拠していることを確認してください |
| タイムアウト | 複雑な修復 | クライアントのタイムアウトを最低 10 分に設定してください |
| 低品質な結果 | 入力解像度が不十分 | 入手可能な中で最も高解像度のスキャン画像または写真を使用してください |
関連スキル
each-sense- コア API ドキュメントimage-enhancement- 画像全般の画質改善face-restoration- 顔に特化した補正image-upscaling- 画像の解像度を高めます
コメント
Markdown 対応