実写・テキスト・編集

40分⭐⭐⭐⭐☆

このモジュールで学ぶこと

  • 実写人物の生成と制限事項
  • プロフェッショナルなポートレート写真の生成
  • テキストを含む画像の生成と制御
  • 既存画像の背景変更と部分編集

学習目標

このモジュールを終えると、以下のことができるようになります:

  1. 高品質な実写人物ポートレートを生成できる
  2. 正確なテキストを含む画像を生成できる
  3. 既存画像の背景を変更できる
  4. 画像の一部分のみを編集できる

目次


事前準備

必要なもの

このモジュールで使用する参照画像

このモジュールでは編集元となる画像を多数使用します。以下の方法で準備してください。

セクション必要な画像用途入手方法
2-3selfie.jpg写真をプロに変換自分の写真 or Step 1で生成
4-1original_photo.jpg背景をスタジオに変更自分の写真 or Step 1で生成
4-2summer_photo.jpg夏→冬に季節変更屋外の写真 or Step 2で生成
4-3portrait.jpgファンタジー背景に変更ポートレート or Step 1で生成
5-1black_jacket.jpgジャケットの色変更ジャケット着用写真 or Step 3で生成
5-2street_photo.jpg背景のオブジェクト削除街中の写真 or Step 2で生成
5-3portrait_no_glasses.jpgメガネを追加ポートレート or Step 1で生成
5-4neutral_face.jpg表情を笑顔に変更無表情写真 or Step 1で生成
5-5casual_photo.jpg髪色・服装を複合編集カジュアル写真 or Step 3で生成

ヒント: 同じ人物を複数のセクションで使用することで、一貫した学習体験が得られます。Step 1-3で画像を生成し、各ステップ末尾のコピーコマンドで必要なファイル名にコピーしてください。

サンプル画像の生成(自分の写真がない場合)

自分の写真を使わずに演習を進めたい場合は、以下のジェネレータでサンプル人物写真を生成してください。

Step 1: 基本ポートレート

セクション2-3、4-1、4-3、5-3、5-4で使用するポートレート写真を生成します。

意図

要素内容
目的編集元となる基本ポートレート
被写体30歳の日本人女性
構図バストアップ、正面向き
表情穏やかな笑顔
背景屋内の自然な環境

プロンプト

A photorealistic portrait of a 30-year-old Japanese woman.

Subject Details:
- Shoulder-length black hair with natural texture
- Warm brown eyes with a gentle expression
- Natural skin with subtle makeup
- Wearing a light blue casual blouse

Expression: Calm, friendly smile

Setting:
- Indoor environment with soft natural light
- Blurred home background
- Warm, inviting atmosphere

Technical:
- Bust-up shot, facing camera
- 50mm lens, natural perspective
- Soft lighting from window

Style: Natural, candid photo aesthetic.

クリックしてPythonコマンドを生成

確認ポイント

  • 自然な肌の質感で実写らしく見えるか
  • 表情が穏やかで編集素材として使いやすいか
  • 背景がシンプルで編集しやすいか

ファイルコピー:

生成した sample_portrait.png を以下のファイル名でコピーしてください。

コピー先使用セクション
selfie.jpg2-3 写真変換
original_photo.jpg4-1 背景変更
portrait.jpg4-3 ファンタジー背景
portrait_no_glasses.jpg5-3 メガネ追加
neutral_face.jpg5-4 表情変更

PowerShell / コマンドプロンプトの場合:

copy sample_portrait.png selfie.jpg && copy sample_portrait.png original_photo.jpg && copy sample_portrait.png portrait.jpg && copy sample_portrait.png portrait_no_glasses.jpg && copy sample_portrait.png neutral_face.jpg

Git Bashの場合:

cp sample_portrait.png selfie.jpg && cp sample_portrait.png original_photo.jpg && cp sample_portrait.png portrait.jpg && cp sample_portrait.png portrait_no_glasses.jpg && cp sample_portrait.png neutral_face.jpg

Step 2: 屋外写真(夏の公園)

セクション4-2、5-2で使用する屋外写真を生成します。

意図

要素内容
目的季節変更や背景編集の素材
被写体同じ30歳の日本人女性
環境夏の公園、緑豊か
背景人や車などのオブジェクトあり

プロンプト

A photorealistic outdoor photo of a 30-year-old Japanese woman in a summer park.

Subject Details:
- Shoulder-length black hair
- Warm brown eyes
- Wearing a white t-shirt and jeans
- Standing casually

Environment:
- Lush green summer park
- Bright sunny day
- Trees and grass in background
- A parked car visible in the distance
- Other people walking in background

Technical:
- Full body shot
- 35mm lens, environmental portrait
- Natural daylight, slight shadows

Style: Casual summer snapshot aesthetic.

クリックしてPythonコマンドを生成

確認ポイント

  • 夏らしい緑豊かな環境になっているか
  • 背景に編集で削除できそうなオブジェクト(車など)があるか
  • 人物と背景の区別がはっきりしているか

ファイルコピー:

生成した sample_outdoor.png を以下のファイル名でコピーしてください。

コピー先使用セクション
summer_photo.jpg4-2 季節変更
street_photo.jpg5-2 オブジェクト削除

PowerShell / コマンドプロンプトの場合:

copy sample_outdoor.png summer_photo.jpg && copy sample_outdoor.png street_photo.jpg

Git Bashの場合:

cp sample_outdoor.png summer_photo.jpg && cp sample_outdoor.png street_photo.jpg

Step 3: フォーマル写真(ジャケット着用)

セクション5-1、5-5で使用するジャケット着用写真を生成します。

意図

要素内容
目的服の色変更や複合編集の素材
被写体同じ30歳の日本人女性
服装黒いジャケット
髪色茶色(複合編集で変更予定)

プロンプト

A photorealistic portrait of a 30-year-old Japanese woman in business casual attire.

Subject Details:
- Shoulder-length brown hair (for later editing to blonde)
- Warm brown eyes
- Neutral expression
- Wearing a black blazer jacket over a gray t-shirt

Setting:
- Simple indoor background
- Neutral office-like environment
- Soft, even lighting

Technical:
- Upper body shot
- 50mm lens
- Professional but casual

Style: Business casual portrait, natural lighting.

クリックしてPythonコマンドを生成

確認ポイント

  • 黒いジャケットがはっきり見えるか
  • 髪色が茶色(後で変更するため)になっているか
  • シンプルな背景で編集しやすいか

ファイルコピー:

生成した sample_formal.png を以下のファイル名でコピーしてください。

コピー先使用セクション
black_jacket.jpg5-1 ジャケット色変更
casual_photo.jpg5-5 複合編集

PowerShell / コマンドプロンプトの場合:

copy sample_formal.png black_jacket.jpg && copy sample_formal.png casual_photo.jpg

Git Bashの場合:

cp sample_formal.png black_jacket.jpg && cp sample_formal.png casual_photo.jpg

生成した画像の確認

事前準備が完了したら、以下のファイルが揃っていることを確認してください。

ファイル名用途生成元
selfie.jpg2-3 写真変換Step 1
original_photo.jpg4-1 背景変更Step 1
summer_photo.jpg4-2 季節変更Step 2
portrait.jpg4-3 ファンタジー背景Step 1
black_jacket.jpg5-1 色変更Step 3
street_photo.jpg5-2 オブジェクト削除Step 2
portrait_no_glasses.jpg5-3 メガネ追加Step 1
neutral_face.jpg5-4 表情変更Step 1
casual_photo.jpg5-5 複合編集Step 3

チェックポイント

  • Step 1-3でサンプル画像を生成した(または自分の写真を用意した)
  • 各セクションで使用するファイル名にコピー/リネームした
  • C:\nanobanana\ フォルダに画像が揃っている

セクション1: 実写人物生成

1-1. できることと制限事項

できること:

機能説明
大人の人物生成デフォルトで許可
全年齢の人物生成設定で許可可能
360度ビュー生成同一人物を異なる角度で
スタイル変換ポートレートを別スタイルに
複数人物合成最大5-6枚の参照画像で
顔の編集髪型、メイク、背景の変更

制限事項:

制限詳細
セレブリティ生成不可(すべての設定で禁止)
未成年コンテンツ厳しいフィルター
NSFW/暴力/ヘイト禁止
ディープフェイク禁止
同意のない画像禁止
SynthIDウォーターマークすべての生成画像に必ず付与

1-2. リアリティ向上のキーワード

カテゴリキーワード例
リアリズムphotorealistic, ultra-realistic, hyper-realistic
肌の質感natural skin texture, visible pores, subtle wrinkles
レンズ効果85mm portrait lens, shallow depth of field, bokeh
照明soft natural daylight, studio lighting, golden hour
詳細fine facial details, individual hair strands, natural imperfections

1-3. 避けるべき表現

  • 特定の有名人の名前
  • 未成年を示唆する表現
  • 暴力的・性的な表現
  • 実在の人物を模倣する意図

チェックポイント

  • 実写人物生成の制限を理解した
  • リアリティ向上のキーワードを把握した

セクション2: プロフェッショナルポートレート

2-1. LinkedInプロフェッショナルヘッドショット

ビジネス用の高品質なヘッドショットを生成します。

プロンプトの意図:

カテゴリ記述意図
被写体confident 35-year-old Japanese businessman具体的な人物像を設定
外見Clean-shaven, neat short black hair清潔感のあるビジネスパーソン
表情subtle confident smile自信のある控えめな笑顔
服装Tailored charcoal gray suit, white dress shirtプロフェッショナルな服装
レンズ85mm portrait lens, f/2.8ポートレート向けの焦点距離と被写界深度
照明Soft diffused front lighting, rim lightスタジオ品質の照明設定
背景Neutral gray studio gradientプロフェッショナルな無地背景
A photorealistic professional headshot of a confident 35-year-old
Japanese businessman.

Subject Details:
- Clean-shaven with neat short black hair
- Warm brown eyes with a subtle confident smile
- Natural skin texture with visible pores

Attire:
- Tailored charcoal gray suit with subtle pinstripe
- Crisp white dress shirt
- Burgundy silk tie with small pattern

Technical Specifications:
- 85mm portrait lens, f/2.8 aperture
- Soft diffused front lighting eliminating harsh shadows
- Slight rim light separating subject from background
- Sharp focus on eyes, smooth background bokeh

Background:
- Neutral gray studio gradient
- Professional, clean aesthetic

Style: Ultra-realistic, hyper-detailed, LinkedIn-appropriate.

クリックしてPythonコマンドを生成

生成例

LinkedInヘッドショット

確認ポイント:

  • 35歳くらいの日本人ビジネスマンに見えるか
  • 自然な肌の質感(毛穴が見える程度)が表現されているか
  • 柔らかい照明で目にシャープなフォーカスがあるか
  • 背景が滑らかにぼけているか(ボケ効果)
  • LinkedInに使えるプロフェッショナルな雰囲気か

2-2. シネマティックポートレート

フィルム・ノワール風のドラマチックなポートレートを生成します。

プロンプトの意図:

カテゴリ記述意図
被写体40-year-old man with weathered features and stubble風格のある男性像
表情Intense gaze, slight furrow in brow緊張感のある表情
雰囲気wet, rainy city street at 3 AM深夜の雨に濡れた都会
コントラストMoody shadows with high contrastノワール特有の明暗
照明Low-key lighting, single streetlamp単一光源の劇的な照明
質感Heavy film grain for vintage feelヴィンテージフィルムの粒子感
色調Desaturated colors, almost monochromeほぼモノクロームの彩度低下
A hyper-realistic cinematic portrait with dramatic Film Noir aesthetic.

Subject:
- A 40-year-old man with weathered features and stubble
- Intense gaze, slight furrow in brow
- Wearing a dark overcoat with collar turned up

Atmosphere:
- Standing on a wet, rainy city street at 3 AM
- Moody shadows with high contrast
- Heavy film grain for vintage feel

Lighting:
- Low-key lighting with a single streetlamp
- Strong rim light creating silhouette effect
- Reflections in puddles on the street

Technical:
- Shot on 50mm lens
- Desaturated colors, almost monochrome
- Cinematic 16:9 aspect ratio

Style: Noir film still, dramatic, atmospheric.

クリックしてPythonコマンドを生成

生成例

ノワールポートレート

確認ポイント:

  • フィルム・ノワール特有の高コントラストな明暗が表現されているか
  • 単一の街灯からの低照度照明になっているか
  • 雨に濡れた路面と水たまりの反射が描かれているか
  • フィルムグレイン(粒子感)がヴィンテージ感を出しているか
  • ほぼモノクロームの彩度低下した色調になっているか

2-3. 既存写真の変換(参照画像使用)

自分の写真をプロフェッショナルなヘッドショットに変換します。

Step 1: 変換したい写真を準備(selfie.jpg)

Step 2: プロンプトを作成

プロンプトの意図:

要素記述意図
アイデンティティMaintain exact facial features and identity顔の特徴を維持
背景Softly blurred office with large windowsぼかしたオフィス背景
照明Soft daylight from the front柔らかい自然光
服装Adjust to professional attire if needed必要に応じてビジネス服装に調整
スタイルsubtle retouching, no heavy filters自然なレタッチ、フィルターなし
Transform this photo into a professional LinkedIn headshot.

Requirements:
- Maintain exact facial features and identity from the input image
- Background: Softly blurred office with large windows
- Lighting: Soft daylight from the front
- Style: Clean, realistic, subtle retouching, no heavy filters
- Adjust to professional attire if needed (navy blazer, white shirt)

Keep the person's natural appearance while enhancing professionalism.
The result should look like a photo taken by a professional photographer.

クリックしてPythonコマンドを生成

生成例

プロフェッショナル変換

確認ポイント:

  • 顔の特徴とアイデンティティが元の写真と一致しているか
  • 背景が柔らかくぼけたオフィス(大きな窓)になっているか
  • 柔らかい正面からの自然光になっているか
  • フィルターではなく自然なレタッチに見えるか
  • 服装がビジネス向け(紺ブレザー、白シャツ)に調整されているか

2-4. 詳細なポートレートプロンプト構造

ポートレート生成時に使用できるテンプレート構造です。

テンプレート:

[Subject Identity]:
A photorealistic [age]-year-old [ethnicity] [gender]
with [hair description], [eye color], and [expression].

[Physical Details]:
[Skin details: freckles, pores, subtle wrinkles].
[Any distinguishing features].

[Attire]:
Wearing [detailed clothing description].

[Lighting Setup]:
[Lighting type] from [direction].
[Secondary lights if any].

[Technical Specifications]:
Shot with [lens], [aperture].
[Depth of field description].

[Background]:
[Background description].

[Style Modifiers]:
[Style keywords].

テンプレート変数の説明:

変数説明記入例
[age]年齢25, 40, 60
[ethnicity]人種・民族Japanese, European, African
[gender]性別male, female, person
[hair description]髪の描写short black hair, long wavy auburn hair
[eye color]目の色warm brown eyes, piercing blue eyes
[expression]表情a confident smile, a thoughtful gaze
[Skin details]肌の詳細natural skin texture, visible pores
[Attire]服装a navy suit with white shirt
[Lighting type]照明の種類soft diffused, dramatic side
[direction]光の方向the left, above, front
[lens]レンズ85mm portrait lens, 50mm
[aperture]絞り値f/2.8, f/1.4
[Background]背景neutral gray gradient, blurred office
[Style keywords]スタイルultra-realistic, hyper-detailed

チェックポイント

  • プロフェッショナルヘッドショットを生成した
  • シネマティックポートレートを試した

セクション3: テキスト制御

3-1. テキストレンダリングの特徴

Nanobananaは他のAI画像生成モデルと比較して、テキストレンダリングに優れています。

できること:

  • 高忠実度テキストレンダリング(複数言語対応)
  • ロゴ、ダイアグラム、ポスター向けのテキスト配置
  • フォントスタイル、色、配置の指定

制限事項:

  • 小さいフォントや凝縮スタイルは問題が起きやすい
  • 長文テキストは不安定
  • カーニング(字間)が一貫しないことがある
  • 複雑なタイポグラフィは反復が必要

3-2. Quote-Lock プロトコル

100%のスペル精度のためのルール: レンダリングするテキストは必ず 二重引用符 " " で囲む。

❌ Bad: Make a sign that says open for business.
✅ Good: Create a neon sign with the exact text "OPEN FOR BUSINESS".

3-3. タイポグラフィ指定

テキストを含むバナーを生成します。

プロンプトの意図:

要素記述意図
ヘッドライン"SUMMER SALE" in Bold Sans-SerifQuote-Lockで囲んだメインテキスト
フォントresembling Helvetica or Futuraサンセリフ体の具体的参照
色指定Pure White (#FFFFFF)正確なカラーコード
位置centered in upper third上部1/3に中央配置
サブテキスト"Up to 50% Off"控えめなサイズのサポートテキスト
CTAボタン"Shop Now" on orange rectangleアクションを促すボタン
背景Gradient from coral pink to warm orangeグラデーション背景
Create a promotional banner with the following text:

Typography Specifications:
- Main Headline: "SUMMER SALE"
  - Font Style: Bold Sans-Serif (resembling Helvetica or Futura)
  - Color: Pure White (#FFFFFF)
  - Size: Largest element, centered in upper third
  - Effect: Slight outer glow for visibility

- Subtext: "Up to 50% Off"
  - Font Style: Light weight sans-serif
  - Color: White with slight transparency
  - Position: Directly below headline
  - Size: 50% of headline size

- CTA Button: "Shop Now"
  - Font: Bold sans-serif
  - Color: White text on orange (#FF6B35) rectangle
  - Position: Bottom right corner
  - Effect: Subtle drop shadow

Visual Elements:
- Background: Gradient from coral pink to warm orange
- Subtle tropical leaf silhouettes on edges
- Clean, modern aesthetic with plenty of white space

Aspect ratio: 16:9 for website banner.
Priority: Text clarity and readability.

クリックしてPythonコマンドを生成

生成例

サマーセールバナー

確認ポイント:

  • 「SUMMER SALE」が正確にスペルされているか
  • テキストが上部1/3中央に配置されているか
  • 「Up to 50% Off」がヘッドラインの50%サイズで下に配置されているか
  • 「Shop Now」ボタンが右下にオレンジ背景で表示されているか
  • コーラルピンクからオレンジのグラデーション背景になっているか

3-4. 日本語テキストの扱い

日本語(漢字)を含むロゴを生成します。

プロンプトの意図:

要素記述意図
メインテキスト"麺道場"日本語漢字3文字
フォントスタイルJapanese brush calligraphy style (Shodo)書道風の筆文字
精度要求All three kanji characters must be accurately rendered漢字の正確性を強調
サブテキスト"MENDOJO"ローマ字での補足
デザインCircular badge/stamp design (hanko style)印鑑風の円形バッジ
Deep red, black, and cream日本風の色合い
品質保証No gibberish or malformed characters文字化け防止の明示
Create a logo design for a Japanese ramen shop called "麺道場".

Text Requirements:
- Main text: "麺道場" in bold, traditional Japanese brush calligraphy style (Shodo)
- All three kanji characters must be accurately rendered
- Subtext: "MENDOJO" in small, clean sans-serif below

Visual Design:
- Circular badge/stamp design (hanko style)
- Steam rising motif incorporated subtly
- Color palette: Deep red, black, and cream
- Vintage Japanese aesthetic with modern clarity

The kanji must be perfectly legible and correctly formed.
No gibberish or malformed characters.

クリックしてPythonコマンドを生成

生成例

ラーメン店ロゴ

確認ポイント:

  • 「麺道場」の3文字が正確に描かれているか(文字化けがないか)
  • 書道風の力強い筆遣いになっているか
  • 「MENDOJO」が下に小さく配置されているか
  • 円形の印鑑風デザインになっているか
  • 深い赤、黒、クリームの色パレットになっているか

注意: 日本語テキスト(特に複雑な漢字)はAI生成の精度が低下することがあります。重要なテキストは画像編集ソフトで後から追加することを検討してください。

3-5. テキストトラブルシューティング

文字化けが起きた場合:

  1. テキスト密度を減らす: 1つの視覚要素につき3-5語に制限
  2. 解像度を上げる: より大きなサイズを指定
  3. 単語全体を再指定: 1文字だけ間違っている場合でも、単語全体を再生成
# 文字化け対策プロンプト
prompt = """
Create an image with the text "CAFÉ" prominently displayed.

Text Specifications:
- The word "CAFÉ" in large, clear sans-serif font
- Include the accent on the 'E' (é with acute accent)
- Position: Top-left corner of image
- Size: Large, at least 1/4 of image width
- Color: Dark brown on light background

IMPORTANT: Render the text accurately with no misspellings.
The accent mark on the E is required.
No other text should appear in the image.
"""

チェックポイント

  • Quote-Lockプロトコルを理解した
  • 日本語テキストを含む画像を生成した

セクション4: 背景変更・置換

4-1. シンプルな背景変更

既存画像の背景をスタジオ背景に変更します。

Step 1: 変更したい画像を準備(original_photo.jpg)

Step 2: プロンプトを作成

プロンプトの意図:

要素記述意図
新背景Softly lit neutral gray gradient柔らかく照らされた灰色グラデーション
被写体保持Keep the subject completely unchanged被写体を一切変更しない
プロポーションMaintain original proportions and lighting direction元の比率と光の方向を維持
エッジ処理Natural edge blending, no visible cutout artifacts自然なブレンド、切り抜き痕なし
Replace the background of this image with a professional studio setting.

Requirements:
- New background: Softly lit neutral gray gradient
- Keep the subject (person/object) completely unchanged
- Maintain original proportions and lighting direction on subject
- Natural edge blending, no visible cutout artifacts
- Professional studio photography aesthetic

クリックしてPythonコマンドを生成

生成例

スタジオ背景変更

確認ポイント:

  • 被写体(人物/オブジェクト)が元画像と完全に同じか
  • 背景が柔らかく照らされた中性的なグレーのグラデーションになっているか
  • エッジが自然にブレンドされ、切り抜き痕がないか
  • 被写体の照明方向と比率が維持されているか

4-2. 環境変更(季節)

夏の写真を冬の風景に変換します。

プロンプトの意図:

カテゴリ記述意図
風景変更Convert the green landscape to snow-covered scenery緑を雪景色に変換
エフェクトAdd falling snowflakes in the foreground前景に雪の降る効果
照明調整cool, overcast winter tones冬の曇り空の色調
質感追加Add frost or snow on surfaces霜や雪を追加
被写体保持The main subject exactly as they are人物は変更しない
オプションvisible breath mist白い息を追加
Transform this image into a winter setting.

Changes:
- Convert the green landscape to snow-covered scenery
- Add falling snowflakes in the foreground (subtle, not overwhelming)
- Adjust the lighting to cool, overcast winter tones
- Add frost or snow on surfaces visible in the image

Keep Unchanged:
- The main subject (person) exactly as they are
- Facial features, expression, pose
- Clothing (unless it would look unnatural in winter)

Optional Enhancements:
- Add visible breath mist if appropriate
- Apply cool color grading to the overall image

クリックしてPythonコマンドを生成

生成例

冬景色変換

確認ポイント:

  • 緑の風景が雪に覆われた景色に変換されているか
  • 前景に控えめな雪の粒が降っているか
  • 人物(顔の特徴、表情、ポーズ)が変わっていないか
  • 照明が冬の曇り空の色調(寒色系)になっているか
  • 白い息のような効果が追加されているか(オプション)

4-3. ファンタジー背景

ポートレートの背景を幻想的な風景に変更します。

プロンプトの意図:

カテゴリ記述意図
環境Floating islands with cascading waterfalls滝のある浮遊島
Purple and pink twilight sky with two moons紫とピンクの黄昏空、月2つ
エフェクトMagical particle effects (sparkles, floating lights)魔法の粒子効果
照明統合Apply dramatic rim lighting matching the new scene新シーンに合わせたリムライト
エッジ効果subtle magical glow around the subject's edges被写体の輪郭に魔法の輝き
統合Seamless integration with fantasy lightingファンタジー照明との統合
Replace the background with a magical fantasy setting.

New Environment:
- Floating islands with cascading waterfalls
- Purple and pink twilight sky with two moons
- Magical particle effects (sparkles, floating lights)
- Ethereal mist in the distance

Integration:
- Apply dramatic rim lighting on the subject matching the new scene
- Add subtle magical glow around the subject's edges
- Maintain the subject's original pose and expression
- Seamless integration with fantasy lighting

The subject should look like they truly belong in this magical world.

クリックしてPythonコマンドを生成

生成例

ファンタジー背景

確認ポイント:

  • 滝のある浮遊島が描かれているか
  • 紫とピンクの黄昏空に月が2つ見えるか
  • 魔法の粒子効果(きらめき、浮遊する光)があるか
  • 被写体にドラマチックなリムライトが適用されているか
  • 被写体の輪郭に魔法的な輝きがあるか
  • 元のポーズと表情が維持されているか

4-4. 背景のみを指定して新規生成

背景を詳細に指定して、新規に画像を生成します(参照画像なし)。

プロンプトの意図:

カテゴリ記述意図
被写体young Japanese businessman若いビジネスマン
環境Floor-to-ceiling windows overlooking Tokyo skyline東京のスカイラインが見える窓
家具Modern minimalist office furnitureモダンミニマルな家具
照明Afternoon sunlight streaming through windows窓から差し込む午後の光
ランドマークTokyo Tower visible in the distant background遠景に東京タワー
ショットタイプWide shot showing the environment環境を見せるワイドショット
A young Japanese businessman in a modern Tokyo office.

Environment Details:
- Floor-to-ceiling windows overlooking Tokyo skyline
- Modern minimalist office furniture
- Afternoon sunlight streaming through windows
- Tokyo Tower visible in the distant background

The person:
- Standing near the window, looking at the view
- Professional navy suit
- Contemplative expression

Technical:
- Wide shot showing the environment
- Natural office lighting with window light
- 16:9 cinematic aspect ratio

クリックしてPythonコマンドを生成

生成例

東京オフィスシーン

確認ポイント:

  • 床から天井までの窓と東京のスカイラインが見えるか
  • モダンでミニマルなオフィス家具が配置されているか
  • 窓から差し込む午後の光が表現されているか
  • 遠景に東京タワーが見えるか
  • 紺のスーツを着た若いビジネスマンが窓の近くに立っているか
  • ワイドショットで環境が見せられているか

チェックポイント

  • 既存画像の背景を変更した
  • 季節変更を試した

セクション5: 部分編集(Inpainting)

5-1. 自然言語ベースの編集

Nanobananaでは、マスクなしで自然言語で編集指示を出せます。

服の色変更の例:

プロンプトの意図:

要素記述意図
変更対象change only the jacket colorジャケットの色のみ変更
色の変更from black to burgundy red黒からバーガンディレッドへ
質感保持Same fabric texture and material appearance素材の質感を維持
照明保持Same lighting and shadows on the jacket光と影を維持
背景保持Same background, no changes背景は変更しない
人物保持Same person's face, hair, and expression人物は変更しない
Using this image, change only the jacket color from black to burgundy red.

Keep everything else exactly the same:
- Same fabric texture and material appearance
- Same lighting and shadows on the jacket
- Same background, no changes
- Same person's face, hair, and expression
- Same fit and style of the jacket

Only the color should change from black to deep burgundy red.

クリックしてPythonコマンドを生成

生成例

ジャケット色変更

確認ポイント:

  • ジャケットの色が黒からバーガンディレッドに変わっているか
  • 素材の質感とフィット感が維持されているか
  • ジャケットの光と影が元画像と一致しているか
  • 背景、人物の顔、髪、表情が変わっていないか
  • ジャケットのスタイル(形、ボタン)が維持されているか

5-2. オブジェクト削除

背景に写っている不要なオブジェクトを削除します。

プロンプトの意図:

要素記述意図
削除対象Remove the car visible in the background背景の車を削除
補完方法Fill the area naturally with surrounding environment周囲の環境で自然に埋める
質感維持Maintain consistent lighting and texture照明とテクスチャを維持
被写体保持Keep the main subject completely unchanged前景の人物は変更しない
品質Seamless blend with no visible editing artifacts編集の痕跡なし
Remove the car visible in the background of this image.

Requirements:
- Fill the area naturally with the surrounding environment
- Extend the street/sidewalk/landscape where the car was
- Maintain consistent lighting and texture
- Keep the main subject (person in foreground) completely unchanged
- Seamless blend with no visible editing artifacts

The result should look like the car was never there.

クリックしてPythonコマンドを生成

生成例

車を削除

確認ポイント:

  • 車があった場所が周囲の環境で自然に埋められているか
  • 道路/歩道/風景のテクスチャと照明が一貫しているか
  • 前景の人物が完全に変わっていないか
  • シームレスにブレンドされ、編集の痕跡がないか
  • 車が元からなかったかのように見えるか

5-3. オブジェクト追加

顔にメガネを追加します。

プロンプトの意図:

要素記述意図
フレームModern rectangular frames, thin black plasticモダンな細い黒縁メガネ
配置Position naturally on the nose bridge鼻筋に自然に配置
反射Add appropriate reflections matching the lighting照明に合わせた反射
Add subtle shadows under the framesフレームの下に自然な影
保持Keep all other facial features exactly the same他の顔の特徴は維持
Add stylish black-framed glasses to this person's face.

Requirements:
- Modern rectangular frames, thin black plastic
- Position naturally on the nose bridge
- Add appropriate reflections matching the lighting in the image
- Add subtle shadows under the frames
- Match the lighting direction of the original image
- Keep all other facial features exactly the same

The glasses should look natural, as if they were worn when the photo was taken.

クリックしてPythonコマンドを生成

生成例

メガネを追加

確認ポイント:

  • メガネが鼻筋に自然に配置されているか
  • フレームに照明に合った反射があるか
  • フレームの下に自然な影があるか
  • 顔の他の部分(目、眉、肌)が変わっていないか

5-4. 表情変更

無表情を自然な笑顔に変更します。

プロンプトの意図:

要素記述意図
笑顔Natural, warm smile (not exaggerated)自然で暖かい(大げさでない)笑顔
真正性Slight crow's feet at the corners of the eyes本物の笑顔の証拠である目尻のシワ
表情Relaxed, happy expressionリラックスした幸せな表情
保持Maintain exact facial structure and identity顔の構造とアイデンティティを維持
Change the person's expression from neutral to a warm, genuine smile.

Requirements:
- Natural, warm smile (not exaggerated)
- Slight crow's feet at the corners of the eyes (genuine smile indicator)
- Relaxed, happy expression
- Maintain exact facial structure and identity
- Keep lighting, background, and clothing unchanged

The smile should look natural and not artificial or forced.

クリックしてPythonコマンドを生成

生成例

笑顔に変更

確認ポイント:

  • 自然で暖かい笑顔になっているか(大げさでないか)
  • 目尻に自然なシワ(本物の笑顔の証拠)があるか
  • 顔の構造とアイデンティティが維持されているか
  • 照明、背景、服装が変わっていないか

5-5. 複合編集

髪色、メイク、服装を同時に変更します。

プロンプトの意図:

要素記述意図
髪色Change hair color from brown to platinum blonde茶色からプラチナブロンドへ
メイクAdd subtle professional makeup (natural look)控えめでプロフェッショナルなナチュラルメイク
服装Replace casual t-shirt with white silk blouseカジュアルTシャツを白いシルクブラウスに
保持Keep unchanged: Facial features, Background, Lighting顔、背景、照明は維持
Make the following changes to this image:

1. Change the person's hair color from brown to platinum blonde
2. Add subtle professional makeup (natural look)
3. Replace the casual t-shirt with a white silk blouse

Keep unchanged:
- Facial features and structure
- Background
- Lighting direction
- Overall composition

Each change should look natural and professionally done.

クリックしてPythonコマンドを生成

生成例

複合編集

確認ポイント:

  • 髪色がプラチナブロンドに変わっているか
  • 控えめなプロフェッショナルなメイクが追加されているか
  • 服装が白いシルクブラウスになっているか
  • 顔の特徴と構造が維持されているか
  • 背景、照明、構図が変わっていないか

5-6. 編集のベストプラクティス

1. 一度に1つの変更 複数の変更を同時に行うと、結果が不安定になります。

# Good: 1つずつ変更
Step 1: 髪の色を変更
Step 2: 服を変更
Step 3: 背景を変更

2. 保持する要素を明示 変更しない部分を明確に記述することで、意図しない変更を防ぎます。

Keep unchanged:
- Facial features
- Lighting
- Background

3. 具体的な指示 曖昧な指示は予期しない結果を招きます。

❌ Bad: Make it look better
✅ Good: Increase the contrast slightly and add a subtle warm tone

セクション5のチェックポイント

  • 服の色を変更した
  • オブジェクトを削除した
  • オブジェクト(メガネなど)を追加した
  • 表情を変更した
  • 複合編集を試した

トラブルシューティング

人物生成がブロックされる

原因: セーフティフィルターが作動

解決策:

  • 有名人の名前を使用していないか確認
  • 未成年を示唆する表現を避ける
  • プロンプトをより中立的な表現に変更

テキストが正しく表示されない

原因: テキストが小さい、または複雑すぎる

解決策:

  1. テキストサイズを大きく指定
  2. Quote-Lockプロトコルを使用
  3. シンプルなフォントを指定
  4. 1つの画像に含めるテキスト量を減らす

背景変更で被写体が変わってしまう

原因: 保持すべき要素の指定が不十分

解決策:

IMPORTANT: The person/subject must remain EXACTLY the same.
Do not change: face, expression, pose, clothing, body position.
Only change the background.

部分編集で周囲も変わる

原因: 編集範囲が曖昧

解決策:

  • 編集する部分を具体的に限定
  • 「only」「just」を強調
  • 周囲を「keep unchanged」で明示

まとめ

このモジュールで学んだこと

  1. 実写人物生成: リアリズム向上のキーワードと制限事項
  2. プロフェッショナルポートレート: LinkedIn/シネマティック/参照画像変換
  3. テキスト制御: Quote-Lockプロトコルとタイポグラフィ指定
  4. 背景変更: スタジオ/季節/ファンタジー背景への変換
  5. 部分編集: 色変更、削除、追加、表情変更

編集チェックリスト

  • Quote-Lockでテキストを囲んでいる
  • 保持する要素を明示している
  • 一度に1つの変更にしている
  • 具体的な指示を出している

次のステップ

Module 08では、ビジネスコンテンツ(バナー、サムネイル、ロゴ、広告)の生成について学びます。


よくある質問

Q: 生成された人物画像にはウォーターマークが付きますか? A: はい。すべてのNanobanana生成画像には不可視のSynthIDウォーターマークが付与されます。これは削除できず、AI生成であることを検出可能にします。

Q: 自分の写真を元に編集した場合もウォーターマークが付きますか? A: はい。既存画像を編集した場合も、出力画像にはSynthIDが付与されます。

Q: テキストの日本語は英語より精度が低いですか? A: はい。英語のテキストレンダリングが最も精度が高く、日本語(特に複雑な漢字)は精度が下がることがあります。重要な日本語テキストは、画像編集ソフトで後から追加することを検討してください。

Q: 背景変更で人物の照明も自動調整されますか? A: 部分的に調整されますが、完璧ではありません。新しい背景の照明方向を明示し、「match the lighting to the new environment」と指示することで改善できます。

Q: 部分編集で失敗した場合、元画像に戻せますか? A: API経由での編集では元画像は変更されません。失敗した場合は、元画像から再度編集を試みてください。

運営: ゆめスタ