Giter Club home page Giter Club logo

seefood2's Introduction

Khana Dekho (๐Ÿ‡ฎ๐Ÿ‡ณ See Food) ๐Ÿš๐Ÿจ๐Ÿข๐Ÿฅœ

This is a Streamlit based application that provides basic information about Indian Food (origin, ingredients & preparation time). This is based on a fictional app based on the HBO series "Silicon Valley". This can be found here -> https://adhok-seefood-streamlit-app-7lw6nk.streamlitapp.com/

Data & Modeling Process

Data

This uses the Indian Food Image Dataset that consists of 85 categories that can be found on Kaggle(https://www.kaggle.com/datasets/iamsouravbanerjee/indian-food-images-dataset). Apart from the images that are already present, we have also augmented the dataset using different transformations (rotation, channel shift, vertical & horizontal flip , shearing). You can recreate this by running the code python augment.py on your terminal. 90% of the data was used for training, while 10% was used for validation.

Modeling Procedure

  1. The pixels of each image are normalized to be in the range 0-1, by dividing the images by 255.

  2. These normalized images are split into batches of 128 and fed into a pre-trained EfficientNetV2 Network, where we train the model for 100 epochs.

    • The first 25 epochs were trained with only the last layer unfrozen
    • The second 25 epochs were trained with the last two layers unfrozen
    • The third 25 epochs were trained with the last three layers unfrozen
    • The last 25 epochs were trained with the last four layers unfrozen

    The model weights were re-used from the previous steps (E.g Model weights for the second 25 epoch run were obtained from the first 25 epoch run)

  3. We use Adam optimizer with a learning rate of 0.003

  4. The model weights are then automatically stored in the file training_1/cp.ckpt.

  5. The training can be done by running the command python train.py

The other Python Files and what they mean

  1. streamlit_app.py -> This contains the front end function of the app, such as layout , text color and the drag and drop functionality. The app can be invoked using the command streamlit run streamlit_app.py.

  2. data_prep_for_prediction.py -> This contains the code that maps all 80 types of Indian Food to its prep time, region of origin and ingredients.

  3. inference.py -> This uses the model weights file created in the folder training_1/ and outputs the desired results(Food Type, Region of Origin, Prep time and Ingredients) based on the input image.

Results

The train F1 score was ~90%

seefood2's People

Watchers

James Cloos avatar RishikeshMane avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.