見出し画像

ImageFX(Imagen3)の実用-自社サイト用のイメージ写真を生成する

自社のウェブサイトや求人記事に、ストックフォトではなく自社の社員やロケーションを使って、自社らしさをビジュアルでアピールしたいというフェーズがありますよね。
せっかくよい写真が撮れたのに、その社員が退職することになって、あちこちに掲載した写真を取り下げなきゃいけない、みたいなこと、あると思います。

GoogleのImagen3のフォトリアル画像性能がよいというので、これを使って自社の画像をリファレンスに「生成画像なんだけどちょっと自社っぽい」画像を作ってみることにしました。


2ステップで「生成画像なんだけどちょっと自社っぽい」画像を生成する

ステップ1:自社画像からプロンプトを作る

手順は簡単で、自社の画像をimage2textでプロンプト化して、Imagen3(ImageFX)で画像を生成するだけです。

リファレンスの画像をChatGPTに添付して、下記のプロンプトを入力します。

画像を網羅的に分析し、視覚から情報を得ることが難しい人のために、英字のプロンプトリストの形式で英語で詳細に説明してください

### 注意事項

画像中にテキストが含まれないようにしてください
見出しを使わず、平文で表示してください
プロンプトリストの形式は、英語の平文で、下記の順番で情報が並ぶように編集してください。

### 順番

主題、人物の外見上の特徴と様子、背景、全体の雰囲気とトーン、特記事項

(ChatGPTに画像を入力することに抵抗のある場合は、OpenAI APIやAnthropic APIなどを活用してください)

ChatGPTでimage2text(リファレンス画像は伏せています)

ChatGPTが出力したプロンプトは下記。

The image depicts a professional interaction where a woman is shaking hands with a man across a table, suggesting the conclusion of a successful meeting or agreement. The woman has long brown hair, is smiling warmly, and is dressed in a dark business suit with a striped shirt underneath, exuding confidence and professionalism. The man she is shaking hands with is seen from behind, wearing a dark suit, and his posture suggests engagement in the interaction.
The background shows a modern office setting with glass partitions and wooden accents, contributing to an open and contemporary atmosphere. The overall mood of the image is positive and professional, reflecting a successful and cooperative business environment.
There is a folder and possibly a laptop on the table, which hints at the business context of the interaction. The image effectively captures a moment of mutual respect and agreement, characteristic of a professional deal or partnership.

ChatGPT

ImageFXで人物を出力しようとするとき、特に指定しなければ欧米風の人物画像が出力されることが多いです。なので明示的に日本人を指定します。
また、写真素材として使う場合には、ある程度余白があった方がトリミング耐性が増えるので、余白を付与する意図のプロンプトも追加します。

具体的には下記のプロンプトを先頭に追記します。

Wide shot, with margins, Japanese, 


ステップ2:ImageFXで画像を生成する

GoogleのImageFX - AI test kitchenにアクセスします。


ImageFX - AI test kitchenでは、デフォルトでImagen3を利用するようになっています。

ImageFXの設定欄

image2imageもできるようになっていますが、今回は用いませんでした。
(訂正)
2024年8月30日時点で、image2image機能は提供されていません。表記誤りがあり申し訳ありませんでした。
ご指摘くださいありがとうございます。

ImageFXの入力欄


先ほどのプロンプトを入力して画像を生成してみます。

ImgaeFXの画像生成画面

リファレンス画像の状況、人物の動作と表情、服装や外見上の特徴、構図、雰囲気がよく再減されています。
特に、背景のオフィスの内装や什器の雰囲気が再現されていて、自社で撮影したイメージに近付いています。


Wide shot, with margins, Japanese, The image depicts a professional interaction where a woman is shaking hands with a man across a table, suggesting the conclusion of a successful meeting or agreement. The woman has long brown hair, is smiling warmly, and is dressed in a dark business suit with a striped shirt underneath, exuding confidence and professionalism. The man she is shaking hands with is seen from behind, wearing a dark suit, and his posture suggests engagement in the interaction.
The background shows a modern office setting with glass partitions and wooden accents, contributing to an open and contemporary atmosphere. The overall mood of the image is positive and professional, reflecting a successful and cooperative business environment.
There is a folder and possibly a laptop on the table, which hints at the business context of the interaction. The image effectively captures a moment of mutual respect and agreement, characteristic of a professional deal or partnership.

ImgaeFXでは現在1x1の正方形画像しか生成できないため、左右方向の余白が少なく窮屈な印象になってしまいますが、将来3:2や16:9のアスペクト比が指定できるようになると解決すると思います。

前述した余白を確保するためのプロンプト(Wide shot, with margins,)は、効いているように感じることもあるし、そうでもないときもあり、おまじないレベルかもしれません。


画像出力の事例

同じ手法で他のパターンも生成したので、参考に列挙します。

例1:

ChatGPT

Wide shot, with margins, Japanese, The image shows two men engaged in a collaborative work session, both focused on a laptop screen in front of them. The man on the left is young, with short curly hair, and is wearing a light blue button-up shirt. He is smiling and gesturing towards the laptop screen, indicating he is explaining something or making a point. The man on the right is bald, slightly older, and dressed in a dark shirt. He is also smiling, suggesting that the discussion is positive and productive.
The background features a modern office environment with large windows and industrial-style lighting fixtures, contributing to an open and contemporary workspace. The overall atmosphere is professional yet relaxed, emphasizing collaboration and teamwork.
There are coffee cups and a notebook on the table, suggesting that the meeting may be informal, possibly a brainstorming session or a casual discussion between colleagues. The image conveys a sense of cooperation and a shared focus on the task at hand.

ChatGPT
ImageFXの画像生成画面
Wide shot, with margins, Japanese, The image shows two men engaged in a collaborative work session, both focused on a laptop screen in front of them. The man on the left is young, with short curly hair, and is wearing a light blue button-up shirt. He is smiling and gesturing towards the laptop screen, indicating he is explaining something or making a point. The man on the right is bald, slightly older, and dressed in a dark shirt. He is also smiling, suggesting that the discussion is positive and productive.
The background features a modern office environment with large windows and industrial-style lighting fixtures, contributing to an open and contemporary workspace. The overall atmosphere is professional yet relaxed, emphasizing collaboration and teamwork.
There are coffee cups and a notebook on the table, suggesting that the meeting may be informal, possibly a brainstorming session or a casual discussion between colleagues. The image conveys a sense of cooperation and a shared focus on the task at hand.


例2:

ChatGPT

Wide shot, with margins, Japanese, The image features a confident woman standing with her arms crossed, smiling as she looks off into the distance. She has long, wavy brown hair and is wearing a sleeveless dark dress, projecting professionalism and self-assurance.
The background shows a modern, well-lit office environment with large windows that provide a view of a cityscape, adding a sense of openness and sophistication to the scene. There are also some furniture pieces, such as chairs and lamps, which contribute to the cozy yet professional atmosphere.
The overall mood of the image is positive and empowering, emphasizing the woman's confidence and the modern, upscale setting. The image captures a moment of calm and assurance, portraying a professional who is both poised and ready to take on challenges. There are no specific distractions in the scene, allowing the focus to remain on the woman and her confident demeanor.

ChatGPT
ImageFX
Wide shot, with margins, Japanese, The image features a confident woman standing with her arms crossed, smiling as she looks off into the distance. She has long, wavy brown hair and is wearing a sleeveless dark dress, projecting professionalism and self-assurance.
The background shows a modern, well-lit office environment with large windows that provide a view of a cityscape, adding a sense of openness and sophistication to the scene. There are also some furniture pieces, such as chairs and lamps, which contribute to the cozy yet professional atmosphere.
The overall mood of the image is positive and empowering, emphasizing the woman's confidence and the modern, upscale setting. The image captures a moment of calm and assurance, portraying a professional who is both poised and ready to take on challenges. There are no specific distractions in the scene, allowing the focus to remain on the woman and her confident demeanor.


例3:

ChatGPT

Wide shot, with margins, Japanese, The image shows a young woman outdoors, holding a smartphone in one hand and a tablet or laptop in the other, indicating she might be on her way to or from work or engaged in a task that requires both devices. She has shoulder-length black hair and is dressed in a sleeveless, light-colored top, which suggests a modern and professional style.
The background is an urban setting with glass buildings and greenery, reflecting a sophisticated and modern environment. The blurred lights and reflective surfaces contribute to a vibrant, yet serene atmosphere, blending the urban landscape with elements of nature.
The overall tone of the image is one of focused determination and calm professionalism, capturing the essence of a modern professional who is both connected and on-the-go. The image suggests mobility and readiness, as the woman appears to be in motion, possibly navigating through her busy day in a metropolitan setting. There are no specific distractions, allowing the focus to remain on the woman's composed demeanor and the dynamic environment around h

ChatGPT
ImageFXの画像生成
Wide shot, with margins, Japanese, The image shows a young woman outdoors, holding a smartphone in one hand and a tablet or laptop in the other, indicating she might be on her way to or from work or engaged in a task that requires both devices. She has shoulder-length black hair and is dressed in a sleeveless, light-colored top, which suggests a modern and professional style.
The background is an urban setting with glass buildings and greenery, reflecting a sophisticated and modern environment. The blurred lights and reflective surfaces contribute to a vibrant, yet serene atmosphere, blending the urban landscape with elements of nature.
The overall tone of the image is one of focused determination and calm professionalism, capturing the essence of a modern professional who is both connected and on-the-go. The image suggests mobility and readiness, as the woman appears to be in motion, possibly navigating through her busy day in a metropolitan setting. There are no specific distractions, allowing the focus to remain on the woman's composed demeanor and the dynamic environment around her.


例4:

ChatGPT

Wide shot, with margins, Japanese, The image shows a young woman standing confidently with her arms crossed, smiling directly at the camera, exuding a sense of leadership and approachability. She has short black hair and is dressed in a light blue, long-sleeved blouse, giving her a professional yet casual appearance.
In the background, a team of colleagues is engaged in a brainstorming session around a table. One person is standing and pointing to a whiteboard covered with colorful sticky notes, indicating an active and creative working environment. The setting is likely an office or a collaborative workspace, characterized by its open, modern design.
The overall atmosphere is dynamic and positive, reflecting teamwork and creativity in a relaxed yet productive environment. The woman’s central position in the image and her confident demeanor suggest she may be a leader or key figure in the team. The vibrant background with the sticky notes and engaged team members adds energy to the scene, highlighting a collaborative and innovative workplace.

ChatGPT
ImageFXの画像生成
Wide shot, with margins, Japanese, The image shows a young woman standing confidently with her arms crossed, smiling directly at the camera, exuding a sense of leadership and approachability. She has short black hair and is dressed in a light blue, long-sleeved blouse, giving her a professional yet casual appearance.
In the background, a team of colleagues is engaged in a brainstorming session around a table. One person is standing and pointing to a whiteboard covered with colorful sticky notes, indicating an active and creative working environment. The setting is likely an office or a collaborative workspace, characterized by its open, modern design.
The overall atmosphere is dynamic and positive, reflecting teamwork and creativity in a relaxed yet productive environment. The woman’s central position in the image and her confident demeanor suggest she may be a leader or key figure in the team. The vibrant background with the sticky notes and engaged team members adds energy to the scene, highlighting a collaborative and innovative workplace.


ふりかえり

今回は、

  • リファレンスにできる、すでに使用している自社画像がある

  • できるだけ簡単なステップでリファレンスに近いAI画像を生成できる

を重視したフローを作りました。

image2imageを使うことも検討できますが、出力が期待したものと違った場合に、プロンプトが悪いのか、入力画像が悪いのか、あるいはその両方か、を考慮して修正する手間が発生するので、省いています。

個人的には、image2textで作ったプロンプトだけで、困りごとを解決するには十分満足できるクオリティの画像が出力できました。


この記事が役に立った、シェフを呼んでくれたまえ!という方は、いいね、記事のシェア、サポートなどで応援よろしくお願いいたします🙏
2024年8月30日


関連記事

この記事が気に入ったらサポートをしてみませんか?