Infobat: Mobile Drug Information Search System based on Google Cloud Vision and OCR

29/06/2020 Views : 495

I Ketut Gede Darma Putra

Introduction
The the pharmaceutical world is currently experiencing very rapid development, marked by the discovery of many new drugs and the development of drugs that previously existed. This development is needed to compensate for the many diseases that have begun to mutate into other diseases[1]. However, information about drugs such as indications, contents, and functions of these drugs is still a lot of people do not know it so that when experiencing minor illnesses people are confused about finding the right medicine. This is because media information about the world of drugs is difficult to obtain. One of the ways now to be able to get information about drugs quickly is through surfing in cyberspace. Google as a company that provides the largest web search service products in the world[2], is a fast and appropriate solution to overcome the problems mentioned above. Google has billions of web pages, so users can find the information they want, through the use of keywords and operators. Google has also used Web Search technology in other search services, including, Image Search, Google News, the price comparison site Google Product Search, the interactive Usenet archive Google Groups, Google Maps, and others[3]. Google's newest product that was developed in the last 5 years as a form of following the development of machine learning is Google Cloud Vision. Google Cloud Vision is an image analysis technology that functions to retrieve information from images, especially digital images. Google Cloud Vision can help users to understand the content contained in an image such as facial expressions, written form, and categories of objects in the picture. Google provides the Google Vision API service through the Google Cloud Platform, a platform that can be used by application makers to request the service of various API functions provided by Google [4]–[7].
Google Cloud Vision technology as the basis in this research to create a mobile application that can provide convenience for users to obtain information and recognize drugs through image recognition technology that allows us to remotely process the content of an image and to retrieve its main features[8], This application is named Infobat. Infobat has features including reading text on drug images so that they can recognize the name of the drug which is then searched for information through Google Search, a technology that has the function of getting strings of text photo images such as prints, handwriting and detecting difficult writing such as italics or colored writing. called OCR (Optical Character Recognition)[9][10]. OCR in Google Vision is divided into 2 types. OCR types are Text Detection and Document Text Detection. Infobat uses all of these functions to facilitate the user in the process of recognizing drugs through image media and obtaining various drug information from websites in the Google database.

Overview System
Infobat is an application that is used to provide drug information through writing descriptions on drugs and looking for web pages that have information about the drug being sought. Infobat application uses Google technology that can read the writing of a drug image and search engine technology to display information related to the drug being sought. The results of the search for information obtained in the form of links or web pages that have information about the drug being sought. The Infobat application requires an internet connection to run the functions that are there. A general description of the application of drugs can be seen in Figure 1.




Figure 1 Overview System

In Infobat application, there are 2 functions, namely OCR function and google search function. The OCR function is used to detect writing through drug images which will later be used as input for searching drug information data both through the Google Search function and from the drug database owned by the system. The system has a drug database that contains drug names and descriptions. Users can take drug images via the camera media or gallery function from android as input for the OCR function on the Infobat application. OCR results in the form of writing about drug information from the image that will be used as input values for information search from Google Search functions or drug databases owned by the application. The Google Search function is used to search for links or web pages that have information about drugs that are inputted by users.

Results and Discussion
The results of the design of the Infobat application design resulted in an android application that runs the google functions previously discussed and a database containing drug information in the form of a drug's name and description. Drug database is used to provide drug information in accordance with the name of the drug obtained through the OCR function in the application.
The Infobat application uses the Android Studio engine in the process of creating program code. Making program code using java language for android on Android Studio. Infobat application uses two java activities in making program code, which is MainActivity.java which contains program functions such as Google OCR and DBHelper.java to run the drug database process in the application.

Drug Information Search
Drug Information Lookup is a function to search for drug information based on the detection results of posts from the previous Google OCR function. Drug Information Search has 2 methods, namely through the function of Google Search and Retrieval of Data from the drug database.
This function uses writing data from the results of the Google OCR function to be used as a search value for drug information. The function is run when the user presses the button to search for drug information and the application displays a dialog for the selection of a drug information search method. The first method of searching for drug information that a user can choose is through the Google Search function.
The Google Search function will run when the user chooses a method of searching for drug information using the Google Search function. The first process in the Google Search function is validation in the first TextView. If the TextView does not have a string value to look for then a validation text will appear in the second TextView that there is no writing from the Google OCR results. When it has passed validation, the application will send an API Key, CSE Key that has been provided by Google Custom Search to be able to access the API functions from Google Custom Search. API Key and CSE Key declarations have previously been done in variable declaration functions. After gaining access to the Google custom search function, the function is continued by sending Google Google OCR detection results beforehand to be used as keywords for information search through the media search engine provided by the Google Custom Search API. The results of the Google Search function are data with JSON file types. After getting the results, the application will parse JSON to retrieve the required data from JSON, namely the web page link. The results of the JSON parsing will be displayed on the second TextView in the form of a number of web page links and web descriptions that have information related to the data sought, which is the result of the Google OCR function.

Figure 2 A process of selecting a search method consisting of Google Search and a drug database; b. the process of receiving a picture of a drug and then being given a website link about the information of the drug; c. a website that provides drug information
Figure 2 is the page display when running Google Search functions. This function runs the Google Custom Search function which is a function as a search engine provided by Google. This function is used to search for OCR results from drug images into the search engine functions contained in the application. The results of the Google Search function are web pages that have information about the writing of the drug being searched. Users can directly browse the web page by pressing the link that is displayed as a result of the Google Search function.

Conclusion
Infobat application is an application that is used to find information about a drug. The use of the application is done by inputting a picture of a drug and the application will provide results in the form of drug information data and a link or web page that has information about the image of the drug concerned. The Infobat application uses 2 Google technologies in its application, the Google Cloud Vision API (OCR) and the Google Custom Search API. The Google Cloud Vision API (OCR) technology is used to retrieve writing data from drug images, while the Google Custom Search API technology is used to search for links or web pages that have information related to writing from drug images that have been processed by the OCR system in the application. In addition to using Google Search technology, application users can also search for drug information through the drug database contained in the application.

References
[1]    A. Sharma, A. Jacob, M. Tandon, and D. Kumar, “Orphan drug: Development trends and strategies,” J. Pharm. Bioallied Sci., 2010.
[2]    Google, “Google,” Wikipedia, 2019. [Online]. Available: https://id.wikipedia.org/wiki/Google.
[3]    E. Schonfeld, “Google Processing 20,000 Terabytes A Day, And Growing,” TechCrunch, 2008. [Online]. Available: http://techcrunch.com/2008/01/09/google-processing-20000-terabytes-a-day-and-growing/. [Accessed: 16-Feb-2010].
[4]    G. Developer, “Cloud Vision API Features [Online],” Developer, Google, 2019. [Online]. Available: https://cloud.google.com/vision/docs/other-features.
[5]    G. Developer, “Google Custom Search [Online],” Google Developer, 2019. [Online]. Available: https://developers.google.com/custom-search/. [Accessed: 22-May-2019].
[6]    G. Developer, “Google APIs Explorer [Online],” Google Developer, 2019. [Online]. Available: https://developers.google.com/apis-explorer/#p/. [Accessed: 25-May-2019].
[7]    Google, “Cloud Vision,” Google Cloud, 2018. .
[8]    D. Mulfari, A. Celesti, M. Fazio, M. Villari, and A. Puliafito, “Using Google Cloud Vision in assistive technology scenarios,” in Proceedings - IEEE Symposium on Computers and Communications, 2016, vol. 2016-August, pp. 214–219.
[9]    A. Bissacco, M. Cummins, Y. Netzer, and H. Neven, “PhotoOCR: Reading text in uncontrolled conditions,” in Proceedings of the IEEE International Conference on Computer Vision, 2013, pp. 785–792.
[10]    M. Cutter and R. Manduchi, “Improving the accessibility of mobile OCR apps via interactive modalities,” ACM Trans. Access. Comput., vol. 10, no. 4, 2017.