Skip to content

Using pretrained DenseNet-121 for image classification, achieved an F1-score of 92%

Notifications You must be signed in to change notification settings

qxygxt/Food11-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Food11-Classification

Using pretrained DenseNet-121 for image classification

1 Environment:

In this experiment, Google Colab is used to utilize GPU acceleration and achieve better training results in a shorter time.

The source code is in notebook format and can be directly opened on the Google Colab platform by running each code block sequentially.

2 Program Workflow

(1) Data Processing

First, downloading food images dataset from Kaggle, and upload zip to Google Drive (compression speeds up the upload process), and then extract it.

Next, define some data augmentation operations, such as cropping and rotation.

Finally, extract the labels and put all the data into dataloaders.

(2) Model Building

The model consists of a pretrained DenseNet121 and a fully connected layer.

(3) Model Training

The loss function is cross-entropy, and the Adam optimizer is used.

f45a7d139a05776aa863360d36ebcd8

(4) Model Testing

ba19b1260fa66a4b337757ca68ace8e

About

Using pretrained DenseNet-121 for image classification, achieved an F1-score of 92%

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published