Application of Artificial Intelligence SSD MobileNet and Tiny YOLOv2 for Food Recipe Search

Recipes are guides to making something together with notes on ingredients and their amount. To be able to make food, of course, the cook must prepare the ingredients in advance to be processed into ready-to-eat dishes. Often people have a lot of food ingredients but don't know how to process them. Cooking without seriousness, of course, some people fail when making a dish. Back then, people depends on recipe that was passed down from generation to generation. Now, the digital world is growing rapidly. Anything can be done with increasingly modern technology. Everything needed is accessible with today's technology. Everything is so easy, including the matter of food. Even so, in this digital era, people use smartphones but still cannot use them properly. Many of them use search engines so they need to sort out which are real recipes and which are just random recipes. The purpose of this study is to help people find recipes by taking photos of food ingredients and then finding out what can be made from these ingredients. This technique uses Artificial Intelligence (AI) with MobileNet and Tiny YOLOv2 SSD modules. The design uses the Unified Modeling Language (UML). The study used experimental methods to test the accuracy of the AI used. Data collection will be utilizing a literature study. This research uses agile for system development. Test results show that the SSD MobileNet model has a guessing accuracy of 77%, while Tiny YOLOv2 is 81%. The guessing accuracy might get higher if good camera quality is used.


Introduction
A recipe is a set of commands to produce certain items whose results can be reduced or added according to the needs of the maker, and it is also accompanied by notes on ingredients, quantities and food making orders [1]. Food is an individual's basic need where the food ingredients to be consumed are available from a variety of food menus along with different flavor variants [2]. Food recipe information will help the community to make a variety of foods every day [3]. Users can easily get the desired recipe information by using mobile phones, especially those based on Android [4]. Culinary applications regarding food recipes already provide information about various kinds of food recipes quite completely, besides that there are also features that can help individuals to record food ingredients from existing recipes [5]. Syahputra's mobile application design (2020) [6] is intended to be able to help the public get information related to recipes for typical Indonesian dishes along with cooking tips. While Yoga's recipe search application design (2021) [2] is the design of an application system that is almost similar to the purpose of the research to design an android application that later users can search for food menus based on the selection of food ingredients they want to use. Thus the application designed is a combination of the two application designs above, namely in research [6] and [2] but this research will only develop on mobile devices, namely Android. This study uses Artificial Intelligence with MobileNet SSD modules and Tiny YOLOv2 as a photo technique to get recipes from these food ingredients.

Literature Review
Based on several previous studies, similar systems have been running, such as the design of mobile applications in Syahputra's research (2020) where the application he made can provide information on recipes for typical Indonesian dishes along with cooking tips [6]. Then there is also the design of a recipe search application in Yoga's research (2021). Where the application that is made close to what the author wants to make is the design of an application system for determining food menus based on food ingredients by selecting the food ingredients that the user wants to use then the application can determine suitable food ingredients and will display recipes that use these ingredients only. Yoga makes this application based on a website only [2]. Artificial Intelligence (AI) is a program design that will allow computers to do a job like and as well as humans [7]. The application designed by the researcher is a combination of the two application designs above, namely in research [6] and [2] but this research will only develop on mobile devices, namely android. Researchers use AI with MobileNet and Tiny YOLOv2 SSD modules as a photographing technique to get the name of a food ingredient, then the application will search for food recipes that use these ingredients. The MobileNet SSD module uses the VOC2007 data set with an accuracy of 67% according to the MobileNet SSD module website, while the Tiny YOLOv2 module tests the VOC2007 dataset with an accuracy of 76.8. So that the researchers used the two modules to find out the name of the food ingredient then compare the results which are the most accurate and take the results to look for recipes that use these foodstuffs.

Methods
Experimental research method is a research method used to find certain effects where the results are in the form of effectiveness of the research on its effects [8]. For example, in this research the researcher uses 2 AI modules to determine which module results are the most accurate for detecting food ingredients so that from the results of the two a conclusion can be drawn in the form of the name of the food ingredient object to look for recipes using these ingredients. The development methodology that will be used is the agile methodology according to [9] the agile application development method is a short-term application development method because it prioritizes rapid adaptation and must be ready to re-develop in order to face changes in any form. The main cycle in this method is planning, solution design, coding, testing, then software release where this cycle does not only end in release because this agile method will receive direct feedback from users and developers will re-develop applications that means the cycle will return to the planning stage. In designing a food recipe search application, this study uses library research data search techniques to search for data related to food recipe research from various sources such as research journals, guidebooks for making android applications, and journals about food recipes. Unified Modeling Language (UML) is a language used to determine the need for analyzing and designing systems, to describe cases in human language programming [10]. One of the UML diagrams is the Use Case and Class Diagram which will be used for this research.

Analyzing the System
User requirements are the user's necessities for the features needed so that the system can run smoothly. The researcher divides user requirements into 2 parts, namely functional requirements and non-functional requirements where functional requirements are requirements that have an important role in the system if these requirements do not exist then the system will not be able to run while non-functional requirements are additional requirements that will provide additional features on the system where if this requirement does not exist then only part of the system cannot run.
Functional Requirement 1. Users can search for food recipes based on food ingredients by using the photo feature. 2. Users can save food recipes to favorites. 3. Users can search for food recipes manually. 4. Users can modify the recipe in a custom way, for example, the user has added a recipe to favorites then he can make changes to the recipe such as the ingredients needed as desired. 5. Searched food recipes can be sorted and filtered. 6. Applications can search for food recipes from various websites.
Non-Functional Requirement 1. Users can log in to save the configuration of the application and the user's favorite recipes so that they can be used on other devices. 2. Users' favorite recipes can be shared on social media. 3. Apps can reduce RAM usage when running in the background.

Scope and Limitations
The scope and limitations of implementation on the Food Recipe Application are as follows: 1. Recipe search can only run with an internet connection. 2. Only logged in users can sync favorite recipes. 3. The user must first login to run all application access.

System Design
Use Case is a diagram that describes the functionality of a system by focusing on "what" the system will do rather than "how" [11]. Use case diagrams describe users who use the application and user behavior towards the application used [12].  Figure 1 is a use case design based on the results of the analysis of functional requirements and non-functional requirements. It can be seen that the user of this system is only one user, where this user can be anyone and each user has the same access rights but each user has their own data so that one user will not be able to interfere with other users' data. Therefore use case consists of: a. Loginuser can login for system needs that require specific data storage for each user such as synchronizing recipe lists which is an extension of the login case. b. Synchronizing the list of favorite recipesis what the user will do to synchronize the recipe list, if the user logs in with Google then the data will be stored in the Google account used. c. Search for recipesis an action that will be used by the user when he wants to find a recipe which in this recipe search will be expanded into several other actions. d. Typing food recipesis an action taken by the user to search for food recipes by typing the name of the food recipe that he is looking for such as "fruit soup recipe". e. Photographing food ingredientsis an expansion action of the use case 'typing food recipes' which is used by the user to search for food recipes by the user taking photos of the food ingredients then the system will determine the name of the object being photographed and find a recipe that uses those food ingredients. f. Save to favoritesis an action that will be performed when the user wants to save the recipes found to the recipe favorites list. g. Manage favorite recipesan action taken by the user to manage a list of favorite recipes, the user can add recipes to the list, can change the recipe details according to their own wishes, for example changing the number of ingredients used, and also the user can delete recipes from the list. h. Deploy to social mediathis is a user action when he wants to share a recipe on social media later in the format in the form of a link that leads to the recipe.
Class diagram is one of the diagrams in UML modeling where this diagram describes the structure between classes, packages and objects as well as relationships between classes such as associations, and inheritance [10].  Figure 2 is a class diagram design based on the needs analysis in the previous chapter. Therefore, the class diagram design made by the researcher has the following explanation: a. Login Class will take care of all things related to authentication such as login, logout, forgot password and so on. b. User Class will take care of the user's identity such as name, email, password, photo and related functions such as profile editing. c. Cari Resep Class (Search Recipe Class) is a class that will take care of all recipe searches, either manually with text or by taking photos of food ingredients. d. Resep Class (Recipe Class) will take care of the displayed recipes and functions such as favorite recipes, edit ingredients, or add personal notes for each favorite recipe. e. Finally, there is the Favorit Class (Favorite Class) where this class will take care of the user's favorite recipes, such as editing ingredients, editing personal notes, deleting recipes from favorites.

User Interface
The user interface is a factor that determines the increase in traffic on a website. Because users can interact with programming logic through the user interface, and user interface design becomes very important because users will feel more comfortable on the website [13]. In Figure 3 the main display of the application (home / dashboard) there are several navigation menus and also the trending food you are looking for, where the camera menu is the main menu for scanning food ingredients directly. In Figure 4 the scanned view shows several categories of food, namely appetizers, main course, dessert, breakfast, dinner, and drinks. In Figure 5 the description of the recipe you are looking for contains recipe information on how to process the food, there are also ingredients for making food. In Figure 6, a test of the MobilNet SSD module, it can be seen that this AI module was tested on the original device and managed to detect apples with an accuracy of 77%. In Figure 7, a test of the Tiny YOLOv2 module, it can be seen that this AI module was tested on a mobile device, and it was successful in detecting apples with an accuracy of 81%.

Conclusion
With the creation of a recipe search application by taking photos of these food ingredients, it is hoped that the problem can be overcome, namely the lack of searching for recipe information based on the ingredients of the food you have, and the difficulty of finding recipes that match your wishes because of many recipes that are spread on the internet, then in addition to overcoming the problems above this application also is expected to provide convenience in finding recipes in a unique way, namely by taking photos of the food ingredients you want to use, the application will display a number of recipes that use these ingredients. After testing the AI module on several foodstuff objects such as the Apple, SSD MobileNet and Tiny YOLOv2 modules, it was found that when the application was tested using an Android cellphone, accurate results were obtained, besides that the two modules detected objects in general, not only foodstuffs, therefore the system still can't determine the object type and if it's not a food item the system can't find the food recipe. For further research, the author suggests using other AI modules or making your own which is intended to detect objects in the form of foodstuffs, besides that it is also recommended to use cameras that have good catches like a cellphone camera.