11. 画像キャプション生成例 [Ushiku+, ICCV 2015]
1K SBU images
Is a train station in the lake in the small.
10K SBU images
All the lake in the water is a shot.
100K SBU images
View of the lake in the water in a boat.
1M SBU images
It is a picture of the boat in the water.
1K SBU images
Stained glass window in Aanbouw Cofferdam for a field.
10K SBU images
Window in the ossuary glass windows in St. Louis Missouri.
100K SBU images
Stained glass in the tower of the church in St..
1M SBU images
Stained glass window in the church in St. Vitus Cathedral.
12. ユーザー生成コンテンツの爆発的増加
• Web、特に画像投稿・共有サービスでは…
– Flickr 画像100億枚 2015年5月時点
– Instagram 画像400億枚 2015年9月時点
– Facebook 画像2500億枚 2013年9月時点
Pōhutukawa blooms this
time of the year in New
Zealand. As the flowers
fall, the ground
underneath the trees look
spectacular.
大量に収集可能:
画像と関連する文章の対
25. I2T [Yao+, Proc. of the IEEE 2010]
種々の外部データベース
インタラクティブな画像の分解
道路の監視カメラなど
ごく限られたドメインのみへの適用
26. 画像+記事→キャプション [Feng+Lapata, ACL 2010]
• 学習データ:記事+画像+キャプションのセット
• 入力=記事+画像 出力=キャプション
• 既存文の再利用
• 新規文の生成
× 3361
King Toupu IV died at the age
of 88 last week.
入力が異なるものの
その後の2大アプローチを実践
27. 画像+記事→キャプション [Feng+Lapata, ACL 2010]
• 学習データ:記事+画像+キャプションのセット
• 入力=記事+画像 出力=キャプション
• 既存文の再利用
• 新規文の生成
× 3361
King Toupu IV died at the age
of 88 last week.
入力が異なるものの
その後の2大アプローチを実践
28. 再利用?新規生成?
• 再利用
• 新規生成
– テンプレート
主語+動詞の文を生成しよう
– 非テンプレート
A small gray dog
on a leash.
A black dog
standing in
grassy area.
A small white dog
wearing a flannel
warmer.
入力 データセット
29. 再利用?新規生成?
• 再利用
– A small gray dog on a leash.
• 新規生成
– テンプレート
主語+動詞の文を生成しよう
– 非テンプレート
A small gray dog
on a leash.
A black dog
standing in
grassy area.
A small white dog
wearing a flannel
warmer.
入力 データセット
30. 再利用?新規生成?
• 再利用
– A small gray dog on a leash.
• 新規生成
– テンプレート
dog+stand ⇒ A dog stands.
– 非テンプレート
A small gray dog
on a leash.
A black dog
standing in
grassy area.
A small white dog
wearing a flannel
warmer.
入力 データセット
31. 再利用?新規生成?
• 再利用
– A small gray dog on a leash.
• 新規生成
– テンプレート
dog+stand ⇒ A dog stands.
– 非テンプレート
A small white dog standing on a leash.
A small gray dog
on a leash.
A black dog
standing in
grassy area.
A small white dog
wearing a flannel
warmer.
入力 データセット
32. 再利用?新規生成?
• 再利用
– A small gray dog on a leash.
• 新規生成
– テンプレート
dog+stand ⇒ A dog stands.
– 非テンプレート
A small white dog standing on a leash.
A small gray dog
on a leash.
A black dog
standing in
grassy area.
A small white dog
wearing a flannel
warmer.
入力 データセット
実は…
キャプショニング
||
キャプション候補に正確なスコアを与える問題
44. 閑話休題
キャプションがレシートで出てくる!
Looks like a cupboard which is ugly and old having name plates
on it with a study lamp attached to it.
当時の牛久
(博士2年)
画像キャプションの自動生成が
・こんなに正確に
・こんなに詳細に
できるなんて!!!
自分のD論詰んだ!!!
51. マルチスタックビームサーチ
1. 𝑡単語分だけ文を生成して評価
2. 上位𝑘個の候補文のみ残す
3. 𝑡 → 𝑡 + 1として1.へ
• 探索手法の一つ
• 現在流行しているRNNによる文生成でも利用
1 word 2 words 3 words
stack
The
Cat
Mat
On
Is
The cat
The mat
On cat
Mat is
On the
The cat is
The cat on
On the mat
Mat is on
On cat is
The cat is on
The cat on the
Is on the mat
The mat is on
Mat on cat is
4 words
54. Training Dataset
A woman posing
on a red scooter.
White and gray
kitten lying on
its side.
A white van
parked in an
empty lot.
A white cat rests
head on a stone.
Silver car parked
on side of road.
A small gray dog
on a leash.
A black dog
standing in a
grassy area.
A small white dog
wearing a flannel
warmer.
Input Image
A small white dog wearing a flannel warmer.
A small gray dog on a leash.
A black dog standing in a grassy area.
Nearest Captions
A small white dog wearing a flannel warmer.
A small gray dog on a leash.
A black dog standing in a grassy area.
A small white dog standing on a leash.
55. Collective Generation of Natural Image Descriptions
1. 入力画像に物体検出、シーン認識などを適用
2. データセットの類似画像からフレーズを収集
– 名詞句(例:the brown cow)
– 動詞句(例:boy running)
– 前置詞句(例:in the sky や at the market)
3. 他のフレーズと繋いでキャプションを生成
– 名詞句ひとつにつき1文
– フレーズの組み合わせは整数計画問題
[Feng+, ACL 2012]
データセットのとある画像とキャプション
入力
Hard rock casino
exotic car show in
June
名詞句候補
58. Midge [Mitchel+, EACL 2012]
• 各種認識結果から木構造を生成
– 物体検出およびAttribute認識結果
– 動作やポーズの認識結果
– 物体間の位置関係
• 木構造を組み合わせてキャプションの形へ
物体の名詞に関する局所的な木構造
統合
最終的な文を生成する木構造
出力:
People with a bottle at the table
59. ここまでのまとめ
• 既存キャプションの再利用
• テンプレートを利用した新規キャプション生成
× 表現能力に問題あり
• テンプレートに依らない新規キャプション生成
✔ 新規にキャプションを生成可能
A small gray dog
on a leash.
A black dog
standing in
grassy area.
A small white dog
wearing a flannel
warmer.
入力
データセット
62. どれがどれくらい良いキャプションなのか?
CoSMoS [Ushiku et al., ICCV 2015]
Group of people sitting at a table with a dinner.
Corpus-Guided [Yang et al., EMNLP 2011]
Three people are showing the bottle on the street
Midge [Mitchel et al., EACL 2012]
people with a bottle at the table
アンケートによる比較:相対的な良さの評価
• 毎回ほかの手法と比較してもらわなければならない
• 絶対的なキャプションの良さの評価がほしい
63. 定量評価指標
機械翻訳では…
• テスト文に複数の参照訳が付随(通常5文)
• これらの参照訳と近い訳文が「良い」
One jet lands at an airport while another takes off next to it.
Two airplanes parked in an airport.
Two jets taxi past each other.
Two parked jet airplanes facing opposite directions.
two passenger planes on a grassy plain
キャプション生成の評価でも同様の流れ
PASCAL Sentenceの画像と参照キャプションの例
100. キャプションを入力して画像を生成
• Attention モデルの利用[Mansimov+, ICLR 2016]
• DCGAN [Radford+, 2016] の利用[Reed+, ICML 2016]
1単語だけ変えた場合 ありえないシチュエーション
This small bird
has a pink breast
and crown, and
black primaries
and secondaries.
A man in a
set suit riding
a surfboard
on a wave.
CUB(鳥200種類のみの
データセット)で学習
MS COCOで学習
The training dataset is pairs of an image and a caption.
At first, the similarity of images and the similarity of captions are combined and concept space is generated.
When an image is input, its coordinate in the space is estimated and neighbor pairs are retrieved.
Then captions of retrieved pairs are scored according to the distance to the input image.
And each phrase of each caption is scored according to how discriminative.
Finally, highly socred phrases are combined and a caption for the input image is generated.
Existing works to generate sentences from images can be divided into 2 groups.
Some works use similar images sentence while the others generate new sentences.
What they have in common is that we must prepare the dataset with (叩け)