mcpField
O
object-removal

object-removal

github.com/eachlabsクリエイティブ・メディア44417 回インストール今日更新
リポジトリ

object-removal について

object-removalはeach::senseを利用して、写真から不要な要素を除去し、周囲に合わせて領域を補う画像編集スキルです。写真を整えたい人向けで、複数ターンの調整にも対応します。

主な機能

  1. 01人物や物体の除去
  2. 02文字・透かし・ロゴの消去
  3. 03傷、影、電線の修正
  4. 04背景に合わせた領域の補完
  5. 05複数ターンでの編集調整

活用シーン

  1. 01風景写真から通行人や不要物を除去
  2. 02商品写真のタグや映り込みを整理
  3. 03写真の透かしを除去して背景を補修

インストール

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

$npx skills add https://github.com/eachlabs/skills --skill object-removal

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

同梱ファイルreferences/SSE-EVENTS.md

詳細

オブジェクトの除去とインペインティング

each::sense を使用して、写真から不要な要素を除去します。このスキルでは、オブジェクト、人、テキスト、透かし、欠陥をインテリジェントに除去し、除去した領域を周囲の状況に適した内容でシームレスに補完します。

機能

  • オブジェクトの除去:写真から不要なアイテムを除去します
  • 人物の除去:背景から人物をきれいに除去します
  • テキスト/透かしの除去:不要なテキストが重なった画像をきれいにします
  • 肌の欠点の除去:肌の欠点や写真のノイズを除去します
  • 電線/ラインの除去:送電線、ケーブル、ワイヤーをきれいに除去します
  • ロゴの除去:画像からブランド表示やロゴを除去します
  • 影の除去:不要な影を除去します
  • 背景の整理:背景の邪魔な要素を除去します

クイックスタート

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 person standing on the left side of this photo"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/beach-photo.jpg"],
    "mode": "max"
  }'

使用例

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": "Remove the person in the red shirt from this beach photo. Fill the area naturally with the ocean and sand background."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/beach-group.jpg"],
    "mode": "max"
  }'
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": "Remove the trash can and bench from the right side of this park landscape photo. Make it look like a clean natural scene."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/park-landscape.jpg"],
    "mode": "max"
  }'
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 watermark from the bottom right corner of this image. Restore the original background seamlessly."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/watermarked-image.jpg"],
    "mode": "max"
  }'
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": "Remove the skin blemishes and acne marks from this portrait photo. Keep the skin looking natural and maintain the original skin texture."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/portrait.jpg"],
    "mode": "max"
  }'
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": "Remove all the power lines and electrical wires from this sunset cityscape photo. Make the sky look clean and unobstructed."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/cityscape-wires.jpg"],
    "mode": "max"
  }'
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": "Remove all the tourists and people from this Eiffel Tower photo. I want it to look like an empty plaza with just the monument."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/eiffel-tower-crowded.jpg"],
    "mode": "max"
  }'
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": "Remove the person on the right side of this vacation photo. Fill in with the background scenery naturally so it looks like a solo travel photo."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/vacation-couple.jpg"],
    "mode": "max"
  }'
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": "Remove the brand logo from the t-shirt in this photo. Replace it with plain fabric that matches the shirt color and texture."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/branded-shirt.jpg"],
    "mode": "max"
  }'
9. 商品写真を整える

邪魔な要素を除去して、EC 商品の写真をきれいにします。

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": "Clean up this product photo by removing the price tag, dust spots, and the reflection of the photographer in the surface. Make it look professional and ready for e-commerce."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/product-raw.jpg"],
    "mode": "max"
  }'
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 harsh shadow cast by the photographer on the ground in this outdoor portrait. Make the lighting look natural and even."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/portrait-shadow.jpg"],
    "mode": "max"
  }'

複数ターンでのオブジェクト除去

session_id を使用すると、繰り返し除去や調整ができます。

# First removal
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 car parked on the left side of this street photo"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/street-scene.jpg"],
    "session_id": "cleanup-project-001"
  }'

# Second removal (same session)
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 also remove the garbage bins near the building entrance"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "cleanup-project-001"
  }'

# Refinement (same session)
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": "The area where the car was removed looks a bit blurry. Can you improve the texture to match the surrounding pavement better?"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "cleanup-project-001"
  }'

オブジェクト除去のプロンプトのコツ

オブジェクトの除去を依頼する際は、プロンプトに次の詳細を含めてください。

  1. 除去するもの:除去するオブジェクトを具体的に指定します
  2. 場所:画像内のオブジェクトの位置(左、右、中央、背景)を説明します
  3. 補完の指示:除去した領域を何で置き換えるかを説明します
  4. コンテキストの維持:そのまま残すべき要素があれば伝えます
プロンプトの構成例
"Remove [object description] from [location in image].
Fill the area with [expected background/content].
Keep [elements to preserve] intact."
良いプロンプトの例
  • 「左側の噴水の近くに立っている青いジャケットの人物を除去してください」
  • 「画像からすべてのテキストと透かしを除去し、元の背景を復元してください」
  • 「車を除去し、周囲に合った草と小道で埋めてください」
避けるべきプロンプト
  • 「この写真をきれいにして」(曖昧すぎます)
  • 「いろいろ除去して」(具体的ではありません)
  • 「もっと良くして」(目的が不明確です)

モードの選択

モード最適な用途速度品質
max最終成果物、複雑な除去、プロフェッショナルな作業遅い最高
ecoクイックプレビュー、簡単な除去、一括処理速い良好

推奨:複雑な除去(人物、大きなオブジェクト)には max モードを、簡単な修正(小さな肌の欠点、ほこりの斑点)には eco モードを使用してください。

ベストプラクティス

最良の結果を得るには
  • 高解像度の元画像:利用可能な中で最も高品質の元画像を使用します
  • 明確な説明:除去する対象とその場所を具体的に指定します
  • シンプルな背景:単純で繰り返しのパターンがある背景の前にあるオブジェクトは、きれいに除去しやすくなります
  • 複数回の処理:複雑なシーンでは、複数ターンで一度に一つずつ要素を除去します
難しいケース
  • 複雑な背景:詳細で独特な背景の前にあるオブジェクトは、手動での調整が必要になる場合があります
  • 大きなオブジェクト:非常に大きなオブジェクト(画像の30%を超えるもの)を除去すると、結果が不自然になる場合があります
  • 反射:反射を伴うオブジェクトでは、オブジェクト本体と反射を別々に除去するよう依頼する必要がある場合があります
  • 影:オブジェクトに目に見える影がある場合は、影の除去も忘れずに依頼してください

エラー処理

エラー原因解決策
Failed to create prediction: HTTP 422残高不足eachlabs.ai でチャージします
コンテンツポリシー違反禁止されているコンテンツコンテンツガイドラインを確認します
タイムアウト複雑な生成処理クライアントのタイムアウトを最低 10 分に設定します
除去品質が低い曖昧なプロンプト対象の場所と塗りつぶし内容をより具体的に指定します

クライアントのタイムアウト設定

オブジェクトの除去処理には時間がかかることがあります。特に複雑なシーンでは時間を要します。早期に切断されないよう、HTTP クライアントのタイムアウトを最低 10 分 に設定してください。

# Example with extended timeout
curl --max-time 600 -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 all people from this crowded plaza photo"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/crowded-plaza.jpg"],
    "mode": "max"
  }'

関連スキル

  • each-sense - コア API ドキュメント
  • image-edit - 一般的な画像編集機能
  • background-removal - 背景の除去と置換

コメント