Skip to content

Food or non-food? Image Classification by Artificial Neural Network with NumPy

Notifications You must be signed in to change notification settings

enyangxxx/foodImageClassifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foodImageClassfier

Food or non-food? Image Classification with Artificial Neural Network

Download project

git clone https://github.com/enyangxxx/foodImageClassifier.git

Download dataset

  1. You can download the dataset Food-5K here by using e.g. Cyberduck to access via FTP: https://mmspg.epfl.ch/downloads/food-image-datasets/

  2. Create a folder 'images' in project root folder:

cd foodImageClassfier && mkdir images
  1. Copy the sub-folders 'training', 'evaluation', 'validation' into the 'images' folder

Current result

I chose the following hyperparameters:

  • Number of iterations = 3000
  • Learning rate = 0.1
  • Number of layers = 7
  • Side length of an image = 100
  • Number of units = side_length * side_length * 3, 100, 80, 60, 40, 20, 10, 1

The cost reduction as graph:

Considering the graph of cost reduction, the question I had was how the cost would be after 5000th, 10000th iteration & how it would look like with other values for the hyperparameters. These questions hopefully can be answered during/after the next Coursera course. But anyway, here are the costs after each 100th iteration:

After the training, the accuracy of training, (cross-)validation and test dataset achieved these following values:

Training accuracy

Cross-validation accuracy

Test accuracy

About

Food or non-food? Image Classification by Artificial Neural Network with NumPy

Topics

Resources

Stars

Watchers

Forks

Languages