Objective
- Solve image classification with convolutional neural networks.
- Improve the performance with data augmentations.
- Understand how to utilize unlabeled data and how it benefits.
Task – Food Classification
Task – Food Classification
- ● The images are collected from the food-11 dataset classified into 11 classes.
- ● The dataset here is slightly modified:
- ● Training set: 280 * 11 labeled images + 6786 unlabeled images
- ● Validation set: 60 * 11 labeled images
- ● Testing set: 3347 images
- ● DO NOT utilize the original dataset or labels.
○ This is cheating.
Task – Food Classification
logits
(not normalized)
-0.25 +3.02
+0.56 softmax -3.90
-0.01 +0.25 -0.47 +5.00 -1.32 +1.14 -0.28
probability (normalized)
CNN model
0.004 0.114 0.009 0.001 0.005 0.007 0.003 0.831 0.001 0.017 0.004
Requirements
● This homework is in three levels: ○ Easy
○ Medium
Kaggle link: here
○ Hard
- ● You can easily finish the easy level by running the example code.
- ● For the rest, we recommend you start with the same code.
○ We already prepared some TODO blocks for you.
- ● DO NOT pre-train your model on other datasets.
- ● If you use some well-known model architecture (e.g., ResNet), make sure
NOT to load pre-trained weights as initialization.
Requirements – Easy
- ● Build a convolutional neural network using labeled images with provided codes.
- ● Public simple baseline: 44.862 (accuracy, %)
Requirements – Medium
- ● Improve the performance using labeled images with different model architectures or data augmentations.
- ● Public medium baseline: 52.807 (accuracy, %)
- ● You can achieve the baseline by adding a few lines to the example code.
Requirements – Hard
- ● Improve the performance with additional unlabeled images.
- ● Public strong baseline: 82.138 (accuracy, %)
- ● Do it on your own (by finishing TODO blocks in the example code).
- ● Using unlabeled testing data here is allowed.
- ● Hint: semi-supervised learning, self-supervised learning
Semi-supervised Learning
- ● There are many ways to do semi-supervised learning.
- ● E.g., generate pseudo-labels for unlabeled data and train with them.
training
labeling
filtering
labeled data
CNN model
unlabeled data
subset of data
combining
Pseudo-labels
labeled data
training labeling
CNN unlabeled model data
subset of data
combining
logits probability (not normalized) (normalized)
pseudo-label = 7
CNN model
-0.25 +3.02
+0.56 softmax -3.90
-0.01 +0.25 -0.47 +5.00 -1.32 +1.14 -0.28
0.004 0.114 0.009 0.001 0.005 0.007 0.003 0.831 0.001 0.017 0.004
confident enough?
filtering
yes
Kaggle Submission Format
- ● The submitted predictions should be in CSV format.
- ● The first row is “Id, Category”
- ● The rest of rows are “{id}, {prediction}” (e.g., 0005, 8)
- ● There should be (3347 + 1) rows in total.
|
Id |
Category |
|
0001 |
0 |
|
0002 |
9 |
|
0003 |
4 |
|
0004 |
5 |
Grading Policy
- ● Public simple baseline: +1pt
- ● Public medium baseline: +1pt
- ● Public strong baseline: +1pt
- ● Private simple baseline: +1pt
- ● Private medium baseline: +1pt
- ● Private strong baseline: +1pt
- ● Submit your code: +4pt
Code Submission
● Submit your code via NTU COOL. <student_id>_hw3.zip
● DO
- ○ Specify the source of your code. (You may refer to Academic Ethics Guidelines)
- ○ Organize your code and make it easy to read (not necessary).
- ● DO NOT
- ○ Submit empty or garbage files.
- ○ Submit the dataset or model.
- ○ Compress your codes into other formats like .rar or .7z and simply rename it to .zip.
- ● If we find you cheating or your code problematic, you will be punished.
○ Course final score * 0.9 for the first time, or fail the course otherwise.
Bonus
- ● If you successfully get 10 pts:
- ○ Your code will be made public to students.
- ○ You can submit a report in PDF format briefly describing what you
have done (in English, less than 100 words) for extra 0.5 pts.
- ○ Reports will also be made public to students.
- ● Report template





