Scraping Social Media Photos Posted in Kenya and Elsewhere to Detect and Analyze Food Types

Monitoring population-level changes in diet could be useful for education and for implementing interventions to improve health. Research has shown that data from social media sources can be used for monitoring dietary behavior.We propose a scrape-by-location methodology to create food image datasets from Instagram posts. We used it to collect 3.56 million images over a period of 20 days in March 2019. We also propose a scrape-by-keywords methodology and used it to scrape -30,000 images and their captions of 38 Kenyan food types.We publish two datasets of 104,000 and 8,174 image/caption pairs, respectively. With the first dataset, Kenya104K, we train a Kenyan Food Classifier, called KenyanFC, to distinguish Kenyan food from non-food images posted in Kenya.We used the second dataset, KenyanFood13, to train a classifier Kenyan-FTR, short for Kenyan Food Type Recognizer, to recognize 13 popular food types in Kenya. The KenyanFTR is a multimodal deep neural network that can identify 13 types of Kenyan foods using both images and their corresponding captions. Experiments show that the average top-1 accuracy of KenyanFC is 99% over 10,400 tested Instagram images and of KenyanFTR is 81% over 8,174 tested data points. Ablation studies show that three of the 13 food types are particularly difficult to categorize based on image content only and that adding analysis of captions to the image analysis yields a classifier that is 9 percent points more accurate than a classifier that relies only on images. Our food trend analysis revealed that cakes and roasted meats were the most popular foods in photographs on Instagram in Kenya in March 2019.

[1]  Alex Krizhevsky,et al.  One weird trick for parallelizing convolutional neural networks , 2014, ArXiv.

[2]  Touradj Ebrahimi,et al.  Food/Non-food Image Classification and Food Categorization using Pre-Trained GoogLeNet Model , 2016, MADiMa @ ACM Multimedia.

[3]  Dumitru Erhan,et al.  Going deeper with convolutions , 2014, 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[4]  Lei Yang,et al.  PFID: Pittsburgh fast-food image dataset , 2009, 2009 16th IEEE International Conference on Image Processing (ICIP).

[5]  Yuzhen Lu,et al.  Food Image Recognition by Using Convolutional Neural Networks (CNNs) , 2016, ArXiv.

[6]  Keiji Yanai,et al.  A food image recognition system with Multiple Kernel Learning , 2009, 2009 16th IEEE International Conference on Image Processing (ICIP).

[7]  Matthieu Guillaumin,et al.  Food-101 - Mining Discriminative Components with Random Forests , 2014, ECCV.

[8]  Pietro Perona,et al.  Microsoft COCO: Common Objects in Context , 2014, ECCV.

[9]  Antonio Torralba,et al.  Is Saki #delicious?: The Food Perception Gap on Instagram and Its Relation to Health , 2017, WWW.

[10]  Carmen E. Lefevre,et al.  Instagram use is linked to increased symptoms of orthorexia nervosa , 2017, Eating and Weight Disorders - Studies on Anorexia, Bulimia and Obesity.

[11]  Ming Ouhyoung,et al.  Automatic Chinese food identification and quantity estimation , 2012, SIGGRAPH Asia Technical Briefs.

[12]  Giovanni Maria Farinella,et al.  A Benchmark Dataset to Study the Representation of Food Images , 2014, ECCV Workshops.

[13]  Giovanni Maria Farinella,et al.  On the Exploitation of One Class Classification to Distinguish Food Vs Non-Food Images , 2015, ICIAP Workshops.

[14]  Ali Farhadi,et al.  YOLOv3: An Incremental Improvement , 2018, ArXiv.

[15]  Rina Swart,et al.  “Big Food,” the Consumer Food Environment, Health, and the Policy Response in South Africa , 2012, PLoS medicine.

[16]  Ming-Wei Chang,et al.  BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding , 2019, NAACL.

[17]  Sergey Ioffe,et al.  Rethinking the Inception Architecture for Computer Vision , 2015, 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[18]  Paolo Napoletano,et al.  Learning CNN-based Features for Retrieval of Food Images , 2017, ICIAP Workshops.

[19]  Keiji Yanai,et al.  Food image recognition with deep convolutional features , 2014, UbiComp Adjunct.

[20]  Tomasz Łukawski Douglas Barnes ponownie odczytany… , 2018, Nauki o Wychowaniu. Studia Interdyscyplinarne.

[21]  Kiyoharu Aizawa,et al.  Highly Accurate Food/Non-Food Image Classification Based on a Deep Convolutional Neural Network , 2015, ICIAP Workshops.

[22]  Keiji Yanai,et al.  Food image recognition using deep convolutional network with pre-training and fine-tuning , 2015, 2015 IEEE International Conference on Multimedia & Expo Workshops (ICMEW).

[23]  Sofiane Abbar,et al.  Fetishizing Food in Digital Age: #foodporn Around the World , 2016, ICWSM.

[24]  Alexei A. Efros,et al.  Unbiased look at dataset bias , 2011, CVPR 2011.

[25]  Qiang Chen,et al.  Network In Network , 2013, ICLR.

[26]  Jian Sun,et al.  Deep Residual Learning for Image Recognition , 2015, 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[27]  Giovanni Maria Farinella,et al.  Food vs Non-Food Classification , 2016, MADiMa @ ACM Multimedia.

[28]  John R. Smith,et al.  Snap, Eat, RepEat: A Food Recognition Engine for Dietary Logging , 2016, MADiMa @ ACM Multimedia.

[29]  Makoto Ogawa,et al.  Food Detection and Recognition Using Convolutional Neural Network , 2014, ACM Multimedia.

[30]  Daniel Fried,et al.  Analyzing the language of food on social media , 2014, 2014 IEEE International Conference on Big Data (Big Data).

[31]  Munmun De Choudhury,et al.  Characterizing Dietary Choices, Nutrition, and Language in Food Deserts via Social Media , 2016, CSCW.

[32]  Keiji Yanai,et al.  Recognition of Multiple-Food Images by Detecting Candidate Regions , 2012, 2012 IEEE International Conference on Multimedia and Expo.

[33]  Chong-Wah Ngo,et al.  Deep-based Ingredient Recognition for Cooking Recipe Retrieval , 2016, ACM Multimedia.

[34]  Daniel Gatica-Perez,et al.  Healthy #fondue #dinner: analysis and inference of food and drink consumption patterns on instagram , 2017, MUM.

[35]  Kilian Q. Weinberger,et al.  Densely Connected Convolutional Networks , 2016, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[36]  Matthieu Cord,et al.  Recipe recognition with large multimodal food dataset , 2015, 2015 IEEE International Conference on Multimedia & Expo Workshops (ICMEW).

[37]  Sergey Ioffe,et al.  Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning , 2016, AAAI.

[38]  Gian Luca Foresti,et al.  Wide-Slice Residual Networks for Food Recognition , 2016, 2018 IEEE Winter Conference on Applications of Computer Vision (WACV).

[39]  Zhuowen Tu,et al.  Aggregated Residual Transformations for Deep Neural Networks , 2016, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[40]  Yong Rui,et al.  You Are What You Eat: Exploring Rich Recipe Information for Cross-Region Food Analysis , 2018, IEEE Transactions on Multimedia.

[41]  Munmun De Choudhury,et al.  Measuring and Characterizing Nutritional Information of Food and Ingestion Content in Instagram , 2015, WWW.

[42]  Agneta Yngve,et al.  Food insecurity – not just about rural communities in Africa and Asia , 2009, Public Health Nutrition.

[43]  Giovanni Maria Farinella,et al.  Retrieval and classification of food images , 2016, Comput. Biol. Medicine.

[44]  Hamed Haddadi,et al.  Towards Bottom-Up Analysis of Social Food , 2016, Digital Health.

[45]  Alison Perelman Remaking the North American Food System: Strategies for Sustainability edited by C. Clare Hinrichs and Thomas A. Lyson , 2010 .

[46]  Timnit Gebru,et al.  Gender Shades: Intersectional Accuracy Disparities in Commercial Gender Classification , 2018, FAT.

[47]  Hamed Haddadi,et al.  #FoodPorn: Obesity Patterns in Culinary Interactions , 2015, Digital Health.

[48]  Li Fei-Fei,et al.  ImageNet: A large-scale hierarchical image database , 2009, CVPR.

[49]  Kiyoharu Aizawa,et al.  FoodLog: capture, analysis and retrieval of personal food images via web , 2009, CEA '09.

[50]  Debbie A Lawlor,et al.  Prevalence of obesity, hypertension, and diabetes, and cascade of care in sub-Saharan Africa: a cross-sectional, population-based study in rural and urban Malawi , 2018, The lancet. Diabetes & endocrinology.