Chefai - In: Generating Indian Recipes With Ai Algorithm
Chefai - In: Generating Indian Recipes With Ai Algorithm
CHRIST (Deemed to be University), Pune Lavasa Campus, India. Oct 14-15, 2022
Abstract— The purpose of the study is to explore the research of various papers, it was found that various recipe
applications of AI / ML in the field of culinary, especially new generators did exist, but none for Indian recipes. The
recipe generation from the existing ones. The paper presents a authors did not come across anything significant focused on
thorough background study in the AI/ML field of culinary and the cuisine of India. Indian cuisine is one of the most
the existing applications in the recipe generation domain. complex cuisines with its staggering selection of herbs,
Authors came across various recipe recommendations, cocktail spices, and native ingredients. Every state, every city, and
generators, and cuisine-specific recommendations. However, every religion has its kind of recipes that together, with the
none focused on Indian Recipe Generation, which could be a various twists added to them, comprise a massively broad
new field to explore. Therefore, the authors attempt to employ
spectrum of food dishes unique to the country.
a working model that generates unique, non-existing cuisine-
centric recipes for users to eat with a specific focus on Indian The following paper is organized into sections—section II
Cuisine. Using the Autochef algorithm [1], authors generated a discusses background work. Section III elaborates on
series of generations of recipes supported by mutation and experimental work. Finally, section IV concludes the work
similarity. The process included dataset cleaning, and offers future scope.
preprocessing, and developing a generalized structure for
recipes that can be fitted to a model. Finally, the authors train II. BACKGROUND
the model to generate Indian Recipes with the dynamics of
artificial intelligence and the acceptance of AI-generated new In recent years, technology has been developing in the
recipes found among the Indian Diaspora. culinary domain. The project aims to incorporate technology
into the Indian cuisine ecosystem. The authors collected 80
Index Terms: Artificial Intelligence, Evolutionary Algorithm, unique papers on the application of AI technologies in the
Recipe Generator, Indian Cuisine culinary domain. Out of 80 papers, 50 papers were
shortlisted on AI-enabled recipe generation for further
I. INTRODUCTION reading. Finally, the authors reviewed 20 papers specific to
The concept of robots replacing chefs is flabbergasting the domain and focused on the direction of the use of AI to
in itself. However, slowly and steadily, artificial intelligence generate Indian recipes. The authors reviewed 18
and machine learning are spreading their roots firmly in this applications present in the same domain. After extensive
domain by supporting manufacturing, packaging, and research on similar literary works and applications based on
delivery with technology and improving production and Indian cooking, it was found that most of them are
labor costs. However, the art of cuisine is not as explored as recommendation engines. After more thorough research,
the many flourishing fields, and the rate at which findings showed that none of the work discussed Indian
introducing new varieties of taste combinations is slowly Recipe Generators. Understanding that the future of
declining. With the fast-paced changes in customer and artificial intelligence in an Indian Kitchen with such
market demands, it is essential to retain the essence of multitudinous combinations of spices, tastes, and
cooking and explore new recipes. preferences, is an uncharted domain expresses the novelty of
the proposed work. Further, the authors discussed the model
Cooking is an integral part of the Indian diaspora. Indian approach, dataset preprocessing, and results. Following are
recipes vary in taste and variety within kilometers. the papers reviewed.
Traditionally, people prefer home-cooked Indian food. In
recent years, AI-enabled technologies have been developing Researchers discussed a computational model to generate
in the culinary domain. Initially, the proposed work aimed cocktails and evaluation metrics based on quality and novelty
to incorporate AI technologies for Indian cuisine to check the creative potential of the outputs [3]. The model
preparation. The authors researched a few available mobile was grammar based. The paper highlighted cocktails'
applications and similar literary works and models to creation by following rules in The Fine Art of Mixing Drinks
comprehend work carried out till now. A Recipe (Embury 1953) and DIY Cocktails (Simmons 2011). The
Recommendation System was a common feature in AI- generator architecture is based on grammar. Researchers had
enabled culinary technologies. Through more thorough a cocktail grammar, an expansion engine, a text renderer, and
2
Authorized licensed use limited to: Somaiya University. Downloaded on May 24,2024 at 06:02:01 UTC from IEEE Xplore. Restrictions apply.
do not specifically pertain to the idea of an Indian traditional ● Cleaned-Ingredients - List of ingredients without
recipe generator that makes new non-existing recipes with quantity: string
chosen ingredients.BBC Good Food, Tasty, Yummly, and ● Image-URL - Image link of recipe: URL
Cookpad are some popular recipe apps that focus on ● Ingredient count - Total number of ingredients of
providing thousands of recipes. Recipes can be searched the recipe: integer
according to cuisine preference or chosen according to
recommendations with supplementary videos explaining the 2. Data Cleaning and Preprocessing: After the dataset
instructions and process, many of which are available in was obtained, the authors performed normal cleaning
various languages. Hebbar's Kitchen, Archana's Kitchen, operations like dropping duplicates and missing value
Tarla Dalal Recipes, and Tadka are some applications that records. Some fields were in the Hindi language, so both the
highlight traditional Indian cuisines rather than a more long detect module and Google Translation API (google
general global platter. Again, these provide recipe translate module) were used to translate the remaining
instructions to follow to cook a particular dish of one's records. The stubborn untranslated records were detected and
choice. deleted.
Unlike other apps, SuperCook is an application that
provides a recipe recommendation based on the ingredients.
The app facilitates adding the ingredients one has in the
refrigerator through the pantry on the app and automatically
gives a recipe that matches them. Paprika and Sortizy are
versatile recipe management apps that help keep track of
groceries and meals via meal planners, saving recipes to
cookbooks and grocery list options, a unique take on the
recipe application domain. Times Food Recipes and Better
Butter are one of a kind in that they provide a chance for
local home chefs to be represented globally. Anyone
passionate about cooking can become a food blogger or chef
on these platforms by creating a profile and uploading their
recipes. Fig. 1. Process of Data cleaning and Data preprocessing
The authors conclude from the above papers and To convert it to the format required by the model, authors
applications that there are no specific recipe generators for had to convert it into the form of a dictionary(Mentioned
the Indian Diaspora, an unexplored area. Therefore, as per below) for the same purpose; authors created a function
the authors' knowledge, the proposed work is the first called "formatting". The Ingredients tab had various
attempt to implement an autonomous recipe generator using ingredients under comma-separated values to split them up
AutoChef for Indian Cuisine. and add the key "text" to create a new dictionary. The values
were split at the "\n" for the instructions to create a new
III. EXPERIMENTAL SETUP dictionary. The Recipe Name was added as the title, and the
A. Algorithm / Methodology: URL remained the same. The authors also added the partition
list and randomly allotted the values of "train" and "test".
A genetic algorithm is a search heuristic inspired by Each Row from the above dataset was passed in the function,
Charles Darwin's theory of natural evolution. This algorithm and the return value was appended to the list. The list was
reflects the process of natural selection, where the fittest further converted to a JSON value and written in a file.
individuals are selected for reproduction to produce offspring
for the next generation. Authors have used the above
methodology to produce recipes for selecting the ingredients
and creating instructions. Further explanation is provided in
the implementation below.
B. Implementation:
1. Data Description: Dataset of around 6000 Traditional
Indian Recipes that have already been extracted from
'Archana's Kitchen' website available online at
https://data.mendeley.com/datasets/xsphgmmh7b used for
input after data preprocessing. The final dataset size is (5983
x 9); Attribute information below :
● RecipeName - Name of recipe: string type Fig. 2. Data format conversion
● Ingredients - Ingredients of a recipe with quantity: Figure 2 shows the file further used to input it into the
string algorithm. This data was then inputted into the AutoChef
● TotalTimeInMins - Total time taken in minutes to model to generate new recipes. Finally, the entire application
make the recipe: integer was made accessible via a web application; figure 3 depicts
● Cuisine - Geographical region the recipe belongs to the UI of the web app. First, the user had to select base
in India: string ingredients and other ingredients; then, the application gave a
● Instructions - Instructions to follow to make the new recipe as the output.
recipe: string
● URL - Website data scraped from URL
3
Authorized licensed use limited to: Somaiya University. Downloaded on May 24,2024 at 06:02:01 UTC from IEEE Xplore. Restrictions apply.
As Recipe generation is a subjective topic, individuals of
the Indian Diaspora must be verified. The results are
interesting as authors try to understand if the individual finds
the recipe tasty, edible or exciting.
1. Were the instructions understandable? - 76.5 %
said Yes, and 19.6% said Maybe.
2. Was the combination of ingredients good? - 41.2%
said Yes, and 47.1% said Maybe.
3. Whether or not the actions were suitable for the
ingredients? - 70.6 % said Yes, and 23.5% said
Maybe.
4. If they would cook the recipe? - 49% said Yes, and
37.3% said Maybe
5. On a scale of 0 to 3:
C. Results:
Apart from the scoring criteria, the authors conducted an
extensive Survey of the recipes generated. The authors Fig. 4 Reviewed recipes count
generated about 20 recipes and compiled them in a document
format for ease of Survey. A google form was created with
questions covering different parameters of Recipes, tabulated
as follows:
4
Authorized licensed use limited to: Somaiya University. Downloaded on May 24,2024 at 06:02:01 UTC from IEEE Xplore. Restrictions apply.
Fig. 12. Vote distribution on would a user prepares the dish
Fig. 7. Edibility Score From the above results, the authors can conclude that our
model is relatively successful in creating recipes that are
understandable to the users. Indian cuisine is a complex
domain that needs to be further developed. If an application
of AI arises in the future, this project could be a good base
for creating automated Recipe generators while
understanding relationships between ingredients and
mapping them. The instructions can be clarified better by
adding more features such as timings and temperature. After
researching various models, recommenders, a comprehensive
study of ingredients, their relations with actions, and
feedback for our model authors have managed to create a
semi-automated recipe generated based on the Evolutionary
Algorithm
Fig. 8. Taste Score
II. IV CONCLUSION AND FUTURE SCOPE
In the proposed work to determine the most effective
recipe generation method, a comprehensive study of AI/ML
models was undertaken that focuses on models of NLP,
LSTM, Tensorflow, N-grams, Word embedding, and
Vectorisation. The evolutionary algorithms (genetic
programming) were implemented based on effectiveness and
overall success and served as the foundation for further
development to fit the research better. In addition, the
authors improved the accuracy and efficiency of the outputs
of Indian cuisine over the standard model by adding various
Fig. 9. Vote distribution on ingredient combination extra features. The proposed work experimented with
different modules and permutations of different methods to
provide the most accurate results. An interactive web app
was subsequently created for ease of access and interactivity.
Further, an exhaustive survey was conducted over a set of
expected properties of the recipes generated by the
evolutionary model. The feedback received supported the
acceptance of newly generated unique Indian cuisine-centric
recipes; more than 86% agreed that they might prepare/cook
the recipe generated by the model.
The future scope of this project can be a comparative
study of various models. This model can be refined and
made better regarding Indian food name recognition for
Fig. 10. Vote distribution on instruction understandability
Hinglish (Hindi-English) words and better recipe instruction
detail. While performing the literature review, the authors
came across many models. The field of Indian Recipe
generation is unexplored; it could be an interesting topic to
study. The proposed work will also open doors for
integrating AI-enabled technologies in the Indian kitchen.
REFERENCES
[1] Jabeen, H., Weinz, J., & Lehmann, J. (2020, July). AutoChef:
Automated Generation of Cooking Recipes. In 2020 IEEE Congress
on Evolutionary Computation (CEC) (pp. 1-7). IEEE.
[2] J. Marin, A. Biswas, F. Ofli, N. Hynes, A. Salvador, Y. Aytar, I.
Weber, and A. Torralba, "Recipe1m+: A Dataset for Learning Cross-
Fig. 11. Vote distribution on instruction understandability Modal Embeddings for Cooking Recipes and Food Images,"
arXiv:1810.06553 [cs], Oct. 2018
5
Authorized licensed use limited to: Somaiya University. Downloaded on May 24,2024 at 06:02:01 UTC from IEEE Xplore. Restrictions apply.
[3] Pagnutti, J., & Whitehead, J. (2015, June). Generative Mixology: An IEEE 37th International Conference on Data Engineering Workshops
Engine for Creating Cocktails. In ICCC (pp. 212-219). (ICDEW).
[4] Jada, F. B., Oyefolahan, I. O., Zubairu, H. A., Etuk, S. O., & [12] Salvador, A., Drozdzal, M., Giró-i-Nieto, X., & Romero, A. (2019).
Suleiman, F. (2018). Design and Implementation of an Android Inverse cooking: Recipe generation from food images. In Proceedings
Nigerian Recipe Generating System. i-manager's Journal on Mobile of the IEEE/CVF Conference on Computer Vision and Pattern
Applications and Technologies, 5(2), 19. Recognition (pp. 10453-10462).
[5] Bień, Michał & Gilski, Michał & Maciejewska, Martyna & Taisner, [13] Papadopoulos, D. P., Tamaazousti, Y., Ofli, F., Weber, I., & Torralba,
Wojciech. (2020). Cooking recipes generator utilizing a deep A. (2019). How to make a pizza: Learning a compositional layer-
learning-based language model. 10.13140/RG.2.2.23904.51200. based gan model. In Proceedings of the IEEE/CVF Conference on
[6] B. Gite, P. B., Nagarkar, A., & Rangam, C. (2020). Recommendation Computer Vision and Pattern Recognition (pp. 8002-8011).
of Indian Cuisine Recipes Based on Ingredients. BULLETIN [14] Ohene, M. (2017). A Proposed General Formula to Create and
MONUMENTAL. Analyze Baking Recipes. In ICCBR (Workshops) (pp. 245-252).
[7] Morales-Garzon, A., Gomez-Romero, J., & Martin-Bautista, M. J. [15] Reusch, A., Weber, A., Thiele, M., & Lehner, W. (2021, April).
(2021). A Word Embedding-Based Method for Unsupervised RecipeGM: A Hierarchical Recipe Generation Model. In 2021 IEEE
Adaptation of Cooking Recipes. IEEE Access, 9, 27389–27404. 37th International Conference on Data Engineering Workshops
https://doi.org/10.1109/access.2021.3058559 (ICDEW) (pp. 24-29). IEEE.
[8] MORALES-GARZÓN, A. N. D. R. E. A., GÓMEZ- ROMERO, J. U. [16] Zhang, M., Tian, G., Zhang, Y., & Duan, P. (2021). Reinforcement
A. N., & MARTIN-BAUTISTA, M. A. R. I. A. J. (2021). learning for logic recipe generation: Bridging gaps from images to
Alternative-Ingredient Recommendation Based on Correlation plans. IEEE Transactions on Multimedia.
Weight for Thai Recipes. The 6th International Conference on Digital [17] Jabeen, H., Tahara, N., & Lehmann, J. (2019, April). EvoChef: show
Arts, Media and Technology (DAMT) and 4th ECTI Northern me what to cook! Artificial evolution of culinary arts. In International
Section Conference on Electrical, Electronics, Computer and Conference on Computational Intelligence in Music, Sound, Art and
Telecommunications Engineering (NCON). Design (Part of EvoStar) (pp. 156-172). Springer, Cham.
[9] Ozaki, T., Gao, X., & Mizutani, M. (2018). Extraction of [18] Jayaraman, S., Choudhury, T., & Kumar, P. (2017, August). Analysis
characteristic sets of ingredients and cooking actions on cuisine type. of classification models based on cuisine prediction using machine
[10] Pan, Y., Xu, Q., & Li, Y. (2020). Food Recipe Alternation and learning. In 2017 international conference on smart technologies for
Generation with Natural Language Processing Techniques. the smart nation (SmartTechCon) (pp. 1485-1490). IEEE.
[11] Fujita, J., Sato, M., & Nobuhara, H. (Eds.). (2021). Model for [19] Pagnutti, J., & Whitehead, J. Playing with Recipes: Encouraging
Cooking Recipe Generation using Reinforcement Learning. 2021 Exploration of a Model of Taste.
6
Authorized licensed use limited to: Somaiya University. Downloaded on May 24,2024 at 06:02:01 UTC from IEEE Xplore. Restrictions apply.