Weitere ähnliche Inhalte
Ähnlich wie Calorie Estimation in a Real-World Recipe Service (20)
Kürzlich hochgeladen (11)
Calorie Estimation in a Real-World Recipe Service
- 1. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Calorie Estimation in a Real-World
Recipe Service
北海道大学 大学院情報科学研究院
情報理工学部門 複合情報工学分野 調和系工学研究室
細川万維
- 2. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
• タイトル
– Calorie Estimation in a Real-World Recipe Service
• 著者
– Jun Harashima, Makoto Hiramatsu, Satoshi Sanjo
(Cookpad Inc)
• 出典
– IAAI-20 (2020-04-03発行)
• 論文URL
– https://ojs.aaai.org//index.php/AAAI/article/view/7041
論文情報 2
- 3. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
• レシピの情報からカロリーの推定を行う
– 表現の正規化
– 料理の量の推定
• 上記の問題に関して機械学習の手法を使用
• 結論:サービスの中で実際に運用し運用可能な
性能であることを確認した
論文概要 3
- 4. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
• ネット上には膨大な料理のレシピが存在
– Cookpad:550万件、Yummly:200万件
– ほぼユーザーの自作
• レシピのデータを活用した機械学習の増加
– 写真⇒カロリー推定はある
– レシピの情報⇒カロリー推定がない
• ユーザーの自作レシピのカロリー推定を
そのレシピの情報から行いたい
背景 4
- 5. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
• レシピ情報の成分の正規化
– 成分名を正規化し、材料辞書で検索
⇒含んでいる食材からカロリー含有量を求める
– レシピごとに表記がバラバラ
• 新たま
• オレガノ(あれば)
• 料理の量の推定
– レシピがどれだけの量を生み出すか
– レシピごとに表記がバラバラ
• N人分
• N個
– レシピが何人分なのかを推定したい
カロリー推定の2つのサブタスク 5
- 6. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
• レシピから情報を
取得
• c(r):レシピrの一人分の
カロリー
• c(i):成分iの100gあたり
のカロリー
• q(i):レシピのiの分量
• s(r):レシピが何人分か
カロリー推定タスクの定義 6
- 7. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
手順
• 成分の表現の正規化
• 以下の情報をレシピ、および材料辞書から取得
– c(i):成分iの100gあたりのカロリー
– q(i):レシピの成分iの分量
• 以下の情報をレシピから推定
– s(r):レシピが何人分なのか
• 先ほどの式に代入してレシピのカロリーを推定
カロリー推定の流れ 7
- 8. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
表現の正規化タスク 8
表現の正規化タスク
=翻訳問題
Encoder-Decoderモデル
- 9. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
表現の正規化タスク 9
• モデルはできる限りシンプルに
– いろいろ追加できるメカニズムがあるが、
劇的に改善されなかったため適応していない
- 10. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
料理の分量推定タスク 10
• 以下のように分量(serving)を推定
• 栄養士の意見を参考に一種類の分量を推定
- 11. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
料理の分量推定タスク 11
• モデルは2種類
– シングルソース
– マルチソース
• 回帰問題ではなく分類
問題として扱う
– 何人前かの量はレシピの
分量の倍数か除数
– 連続値を扱う回帰モデル
ではなく離散的な分類モ
デルのほうが適切
- 12. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
アーキテクチャの概要 12
- 13. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
アーキテクチャの概要 13
赤い矢印:
モデルのトレーニングセット
サービスからデータを取得
3人の管理栄養士がアノテーション
- 14. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
アーキテクチャの概要 14
緑の矢印:
モデルの学習と
更新
AWSのGPUイン
スタンスと
PyTorchを使用
+GitHub,Jenkins
- 15. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
アーキテクチャの概要 15
青の矢印:
モデルの実行方法
毎日アップロード
されたレシピから
正規化されていな
い食材を選ぶ
正規形を推定
データベースに格
納(推定結果は人が
大まかに確認する)
一人分の分量を推定
- 16. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
アーキテクチャの概要 16
黄色の矢印:カロリーを推測する方法
レシピ、データベースの情報をカロリー算出式に
代入しカロリーを出す(人の手が入っているので正確)
- 17. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
結果:表現の正規化タスク 17
• 18,805の成分を収集
→辞書に従い手動で正規化
• 正規化しても同じ表現のものを削除し残りの
16,719個の食材を実験のデータセットに使用
– トレーニング:13,375 開発:1,672 テスト:1,672
• エンコーダーデコーダーにはLSTMを使用
- 18. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
結果:表現の正規化タスク 18
手法を見直したり、
トレーニングセットを
拡張することでより精度
を上げていきたい
- 19. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
結果:料理の分量推定タスク 19
• 5,279件のレシピを収集
⇒一人のアノテーターが分量を推定
– 1から20人前までのカテゴリーに分類
– アノテーターはレシピのすべての情報をレシピから
推定
– トレーニング:4,223 開発:528 テスト:528
• エンコーダーデコーダーにはLSTMを使用
- 20. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
結果:料理の分量推定タスク 20
• シングルソースの結果のほうが良かった
– 全レシピのうち約半数は数値そのままでよい
→レシピの分量のデータのみで推定可能
– 残りの半数にはタイトルの情報が必要
→学習例が少なすぎてタイトルが必要なレシピの
学習ができなかった
• 例1:タイトル:マフィン 分量1⇒1人前
• 例2:タイトル:ケーキ 分量1⇒8,6,4人前
単純に数字だけ取り
出してきた結果が
正解の例が約半数
- 21. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
結果:料理の分量推定タスク 21
• 人間が量を推定してもばらつきが出る場合も
– タイトルと分量だけでなく、ケーキの小麦粉など
材料の分量にも注目しないと当てられないものもある
- 22. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
結果:カロリー推定タスク 22
アサリの炊き込みご飯の
一人前のカロリー:306
このようにして2019年の時
点では10万以上のレシピの
カロリーを推定している
- 23. Copyright © 2020 調和系工学研究室 - 北海道大学 大学院情報科学研究院 情報理工学部門 複合情報工学分野 – All rights reserved.
Copyright © 2020 Laboratory of Harmonious Systems Engineering Research Group of Synergetic Information Engineering
Division of Computer Science and Information Technology Faculty of Information Science and Technology Hokkaido University – All rights reserved.
まとめ 23
• オンラインレシピのカロリー推定とMLベースの
手法を組み合わせた初めての試み
– 食材の正規化:neural translation model
– 分量の推定:neural classification model
• 実際のサービス内で運用し使用するのに十分な
性能があることを確認
• 上記のシステムで扱えない食材やレシピも確認
⇒今後適応できるようにしていきたい