Fruit Recognition System for Calorie Management

Download Full-Text PDF Cite this Publication

Text Only Version

Fruit Recognition System for Calorie Management

Vishnu H S

Electronics and Communication Engineering

RNS Institute of Technology, VTU Bangalore, Karnataka

Sindhushree B

Electronics and Communication Engineering

RNS Institute of Technology, VTU Bangalore, Karnataka

Punith A

Electronics and Communication Engineering

RNS Institute of Technology, VTU Bangalore, Karnataka

Aishwarya K

Electronics and Communication Engineering RNS Institute of Technology, VTU Bangalore, Karnataka

Mr. Praveen G

Assistant Professor

Electronics and Communication Engineering RNS Institute of Technology, VTU Bangalore, Karnataka

AbstractFruits contain important vitamins, minerals and fiber. A diet comprising mainly of fruits and vegetables can help prevent cancer, diabetes and heart diseases. In this paper we execute in an effective type of recognize, fruit recognition is carried out using CNN algorithm. A set of fruit image is trained in a CNN model for recognition a standard nutrition table is referred to measure calorie since using an image to measure calorie is an arduous task. the image is captured by the raspberry pi through the webcam.

KeywordsConvolution Neural Network, Python, Machine Learning, TensorFlow and Keras, image recognition

  1. INTRODUCTION

    In the recent years, due to a rise in health consciousness, many mobile applications for recording everyday meals have been released. Some of them employ fruit image recognition , which estimates not only fruit names but also fruit calories. However, these applications often require the user to enter information such as fruit categories and size or volume, which render it cumbersome owing to subjective evaluation. To overcome these inconveniences, automatic recognition of the fruit photo is employed on mobile devices. However, in most of the cases, the estimated calories are just associated with the estimated fruit categories or the relative size compared to the standard size of each fruit category which is usually indicated manually by the user. Currently, no applications exist that can estimate fruit calories automatically. Although CNN based image recognition methods have considerably solved most of the image recognition tasks including fruit recognition. fully-automatic fruit calorie estimation from a photo still remains an enigma. This paper proposes a new portfolio of pictures include popular fruits. A portfolio named as fruits. As a second object . a deep intimated neural signal is trained to facilitate identification of fruit image this part can find more larger array of picture It is here that the fruits dataset is described as to how it is created and what its contents are, the aim of the project is developing a application for estimating a fruit calorie and improve peoples consumption conducts for health care.

  2. LITERATURE SURVEY

    Title : fruit recognition and its calorie measurement : an image processing approach

    Using image processing technique the agriculture field and food science field is increasing day by day. The image features are shape, color and texture which is used to classification and calorie estimation of fruits. This paper proposes an algorithm for fruit recognition and its calorie estimation based on the shape, color and texture along with the histogram of gradients and GLCM with the local binary pattern algorithms for texture segmentation scheme recognizing the fruits and area , major axis, minor axis, minor axis is calculated by using the shape feature to get more accurate calorie value. With the help of nutritional look up table these features are fed to multi SVM classifier for accurate classification [15][16]. real time database and pretend plastic fruit databases of MATLAB used for evaluation. Results obtained are very close to real calories of the fruit.

    Drawback: the drawback of this paper is it cannot determine raw, ripen and rotten fruit category.

    Title: A novel svm based food recognition method for calorie measurement applications

    Emerging food classification methods play an important role in food recognition applications. For this purpose, a new recognition algorithm for food is presented, considering its shape, color, size, and texture characteristics. Using various combinations of these features, a better classification will be achieved more importantly. At the classification step the support vector machine method is engaged which leads to better results. Support vector learning is based on simple ideas which originated in statistical learning theory. Supported by our simulation results, the proposed algorithm recognizes food categories with an average approval recognition rate of 92.6%

    Drawback:

  3. EXPERIMENTAL TOOLS

    1. Hardware requirements

      Raspberry Pi

      Fig: 2.1 Raspberry Pi-3B

      The raspberry pi could be a bargain basement priced, credit-card sized computer which might be easily plugged into a computer monitor or TV. Its capable of doing everything we might expect a desktop IP system to perform, surfing from the online and playing high- definition videos, to creating database data processing, and live games. Raspberry pi has the aptitude to intercommunicate with the outside world, and has been utilized in a spacious array in digital projects, from music equipment and sensors to weather stations and chirping birdhouse with infrared cameras.

      Frontech webcam

      Fig 2.2 Frontech Webcam

      This 20 megapixels webcam comes with an adjustable focus, the frame rate of MOS sensor up to 30fps. To great quality and image. The connectivity of usb 2.o connection allows to simply connect with electronic devices of user, its an mounted microphone. It provides great sound quality.

    2. Software requirements

    Python in machine learning: Python has the library that permits developers to use optimized algorithms. It implements popular machine learning techniques like recommendations, classification, and clustering.

    Libraries and packages:

    To understand machine learning, you would like to possess basic knowledge of python programming. In addition, there are a number of libraries and packages generally used in performing various machine learning tasks as listed below: numpy: Is used for its N-dimensional array objects. pandas: Is a data analysis library that includes dataframes. matplotlib: Is 2D plotting library for creating graphs and plots.

    scikit-learn: The algorithms used for data analysis and data mining tasks.

    seaborn: A data visualization library based on matplotlib.

    Dataset pre-processing

    First to download train and test data sets of fruits. Step 1: setup and install

    Step 2: organize your train folder

    Step 3: Train your model using our processed dataset Step 4: test your model

  4. METHODOLOGY

    1. CNN architecture

      Fig: 3.1 CNN architecture

      It is encouraged by biological procedures of neurons that resemble the connectivity outline amongst the neurons of the animal visual cortex. The specic cortical neurons reply to incentives only the rare area of the pictorial eld . The pictorial arena of dissimilar neurons moderately overlays such that they cover the pictoria.CNN is a scheme much like a multilayer perception that has been intended for abridged processing requirements. As associated to the other image classication algorithms, it has less pre- processing.

      Layers of Convolutional Neural Network

      1. Input: This layer holds the raw pixel values of image.

      2. Convolutional Layer: This layer gets te results of the neuron layer that is connected to the input regions. We define the number of filters to be used in this layer. Each filter may be a 5×5 window that slider over the input data and gets the pixel with the maximum intensity as the output.

      3. Rectified Linear Unit [ReLU] Layer: This layer applies an element wise activation function on the image data.

      4. Pooling Layer: This layer perform a down- sampling operation along the spatial dimensions (width, height), resulting in volume.

      5. Fully Connected Layer: This layer is used to compute the score classes i.e. which class has the maximum score corresponding to the input image

        fruit

        fruit

        webcam

        webcam

        Raspberry pi

        Raspberry pi

        display

        display

    2. System block diagram

      Fig: 3.2 system block diagram

      raspberry pi may be raspberry pi defined as single board system its have capability of finding and searching capability it contains video core multimedia GPU, 64bit RISC machine and CPU core The package of the Raspberry Pi Is Raspbian. OpenCV The program is dumped into the Raspberry PI board. Raspbian OS is that the OS involved. The proposed system starts the method by capturing the fruit image. Captured image using raspberry pi through the webcam. Then, the image is transmitted to the processing level in open CV where the fruit features like color shape of fruit samples are extracted. During this project open cv method is employed to detect shape, color of fruit and with the mixture of features the results obtained are very promising. Results shown within the system display. Then come to open CV is an bundle of computer algorithms its contain several sources.

    3. Design Flow Diagram

      Loading dataset

      Pre processing

      Loading dataset

      Pre processing

      webcam

      webcam

      Fruit detection and fruit recognition

      Fruit detection and fruit recognition

      classification

      classification

      Calorie estimation

      prediction

      Calorie estimation

      prediction

      Fig: 3.3 design flow diagram

      Dataset collection: for collecting fruit pictures in data set we elaborate single fruits into different collection. For an different fruit angles and dimension. So, we used to spread subsequent components like camera lighting capture angle, white plate, thumb fruit. Data set have captured image into different angles into different cameras. Large style fruit or large sized dimension fruit fives more comfortable data set and it helps to increase an accuracy of calories which we have done in fruit reorganization of calories measurement. And details of fruit name, number are already stored in dataset. In the process of data set picture divided into many several parts for capturing all angles in all dimensional to get exact perfect calories measurement.

      Pre-processing: image cropping note that the pictures from pfid are taken within the laboratory with an enormous white background. it is generally considered good to appear the feature in questions for better ccn results. Thus, we use the function crop from python image library to

      process these images. Data augmentation we rotate each time by 45 degree to 315 degree. We gain 18323 images totally. We split the info set into training set, validate set and test set. Hog feature (histogram of gradient) may be a local feature descriptor applied in image processing. The image is split into small regions called cell and intensify gradients are calculated over the within the cells.

      Fruit recognition: first, so as to set the accurate answer in our segmentation. An easy exchanges performed on the images captured by us. We can change the image size into desired format to get on accurate efficiency each image compared with size of the picture. If the image is not suitable for a process and its not united with a category. We used a another some technique to compatible with scale of images such are cropping and padding technique. If we apply these technique to these captured image we get

      i.e 720×1080 for simplicity. the heavy large image are cropped to the scale before we proceeding to process. Every picture elaborated to various segments of the fruit which been recognized. In this part mainly focused on segmentation to exact images are proposed frequently. And perhaps we used color segmentation , k-mean clustering, texturing tools. And more than our fruit recognition we selected the parts of the process that are cloud svm and deep neural network methodologies. And these are help to get a perfect accuracy of system and last finally we get the calories of the fruit.

      Calories Estimation: finally, we want to execute our experimental answers of our part or task of project. Calorie identification of fruits item, as of in the before learning task we explained about our data set into sets. And the answer of 23 task after executing the lesser reduction we are put to type classifier. This is identified output fruit type for a picture or image. Then the expected fruit comes with an extra image. Hence, reduced or lesser were proceed to our learnt size indicator which answer is output approximately size of fruit item.

    4. Data Flow Diagram

    Loading dataset

    Train image

    Model created

    Fit model

    Loading dataset

    Train image

    Model created

    Fit model

    Fig: 3.4 Level 1

    webca m

    Input fruit

    Fruit detected & fruit recognition

    Calorie esti mated

    webca m

    Input fruit

    Fruit detected & fruit recognition

    Calorie esti mated

    Fig: 3.5 Level 2

    Often they're a preliminary step accustomed create an summary of the system which may later be elaborated. Data flow diagrams may be used for the visualization of knowledge processing (structured design). the info flow sheet is additionally called as bubble chart. it's simple graphical formalism that may be accustomed represent a system a system in terms of the input file to the system,

    various processing meted out on these data, and therefore the output data is generated by the system.

  5. EXPERIMENTAL CONDITIONS

    Fig: 4.1 CNN result for fruit detection for Apple

    Fig 4.1 following fruit are detected with their name and nutrition value of that object is shown after calculation which is done by Convolutional Neural Network (CNN)

    Fig: 4.2 CNN result for fruit detection for Banana

    Fig 4.2 following fruit are detected with their name and nutrition value of that object is shown after calculation which is done by Convolutional Neural Network (CNN).

    Fig: 4.3 CNN result for fruit detection for Mango

    Fig 4.3 following fruit are detected with their name and nutrition value of that object is shown after calculation which is done by Convolutional Neural Network (CNN).

    Fig: 4.4 CNN result for fruit detection for Jackfruit

    Fig: 4.4 following fruit are detected with their name and nutrition value of that object is shown after calculation which is done by Convolution Neural Network (CNN).

    Fig: 4.5 CNN result for unknown object

    No

    Fruit name

    Measure

    Weight

    Calorie

    1

    apple

    1

    182g

    95cal

    2

    banana

    1

    125g

    111cal

    3

    mango

    1

    336g

    202cal

    4

    jackfruit

    1(cup)

    151g

    143cal

    Fig: 4.6 Standard Nutrition Table

  6. CONCLUSION AND FUTURE WORK

The presentation of program is high and that taken into point of user view from the number of user usage. However the CNNs need an excellent computing system to experiment the large scale of data sets The CNN is able to keep highly nonlinear data. It takes more executable time to coach the signal. And in this performance and speedy matters a lot. Once the program or project well trained, process can be reducing less leads to lower time. The photocopies are properly prepared and every image forms are absolutely checked with CNN. And mostly CNNs are more classified and well suitable for photocopies. When the quality and quantity matter. From our side or mindset

one of the main objects is used for future work for improve an accuracy and perfection in our project. In in future we could add a load cell to calculate the weight of the fruit and also implement freshness detection on the fruit. Another classified objective thing is to elaborate or extend dataset that contain more fruits this will take time to code the process. And we did not taken or included from other paper related to this project.

REFERENCES

  1. F. Siddique, S. Sakib, and M. A. B. Siddique, Handwritten Digit Recognition using Convolutional Neural Network in Python with Tensorow and Observe the Variation of Accuracies for Various Hidden Layers, 2019

  2. H. Cheng, L. Damerow, Y. Sun, and M. Blanke, Early yield prediction using image analysis of apple fruit and tree canopy features with neural networks, Journal of Imaging, vol. 3, p. 6, 2017

  3. I. Sa, Z. Ge, F. Dayoub, B. Upcroft, T. Perez, and C. McCool, Deepfruits: A fruit detection system using deep neural networks,

    Sensors, vol. 16, p. 1222, 2016

  4. S. Anushadevi, Calorie Measurement of Food from Food Image, International Journal on Applications in Information and Communication Engineering, 2015

  5. H. Cheng, L. Damerow, Y. Sun, and M. Blanke, Early yield prediction using image analysis of apple fruit and tree canopy features with neural networks, Journal of Imaging, vol. 3, p. 6, 2017.

  6. Y. K. Keiji Yanai, Food image recognition using deep convolutional network with pre-training and ne-tuning, 2015 IEEE International Conference on Multimedia,2105

  7. Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, Li Fei-Fei, Large-scale Video Classication with Convolutional Neural Networks. CVPR 2014.

  8. Sunjie, Discussion on health monitoring and damage detection of a largespan bridge, IEEE International Conference on Communication, vol 11, 2011.

  9. Edward Sazonov, Haodong Li, Darrell Curry, , and Pragasen Pillay, SelfPowered Sensors for Monitoring of Highway Bridges Sensors Journal, IEEE, vol. 9, 2009.

  10. Yu-Chieh Chen, A Low-power Design of a Bridge Scour Monitoring System, IEEE International Conference on Communication, vol. 24, no. 1, 2014. K. Elissa,

  11. P. Pouladzadeh, S. Shirmohammadi, and A. Yassine, You are what you eat: So measure what you eat!, IEEE Instrumentation & Measurement Magazine, vol. 19, no. 1, pp. 915, 2016.

  12. Qiang Fu, Bridge Vibration Monitoring System Based on Vibrating- Wire Sensor and ZigBee Technologies, 9th IEEE International Conference on Communication Software and Networks ,2017.

  13. G. Cowburn and L. Stockley, Consumer understanding and use of nutrition labelling: a systematic review, Public Health Nutrition, vol. 8, no. 01, 2005.

  14. Andrew Gastineau, Tyler Johnson,Arturo Schultz Bridge Health Monitoring and Inspections A Survey of Methods vol. 11, Issue 7, September 2009.

  15. Parameshachari B D et. al Secure Transfer of Images Using Pixel Level and Bit Level Permutation Based on Knight Tour Path Scan Pattern and Henon Map1st International Conference on Recent Trends in Electronics & Communication Engineering (ICRTECE)organized by REVA university in association with TIE on 11-12 June 2020.

  16. Prabu, S., M. Lakshmanan, and V. Noor Mohammed. "A multimodal authentication for biometric recognition system using intelligent hybrid fusion techniques." Journal of medical systems 43.8 (2019): 249.

Leave a Reply

Your email address will not be published. Required fields are marked *