COMP 2211 Exploring Artificial Intelligence

Lab 8 Convolutional Neural Network

Review

This is a review of Convolutional Neural Network. It aims to refresh your memory of what you have learned in class.

Procedure of CNN task:

  1. Import required libraries and define global variables
  2. Data preprocessing
  3. Build the model
  4. Compile the model
  5. Train the model
  6. Evalutate the model
  7. Save the model

Please download the review notebook by right-clicking the link. Then, select "Save link as..." to save the file to your local disk. Next, upload it to your Google Drive and open it using Google Colab. You should see the following if you open the notebook successfully.

Card image cap

Introduction

Classification is a task of assigning a class label to examples from the problem domain, widely applied in several fields such as medicine and autopilot.

In this Lab, you will handle the classification task of RGB images based on the Fruit Recognition Dataset which has 33 different classes.

Lab Work


The following two tasks to be completed in this Lab session. Please download the task notebook, preprocessing.py submission template and dataset, then open the notebook on google colab. You should see the following if you open the notebook successfully.



Task 1 - Data Preprocessing

Complete following function:

def data_preprocessing():
    ...
  return x, y

Task 2 - Build the Model

Built your own model with at least 3 convolutional layers and 2 dense layers.

def custom_model():
    ...
  return model

Submission & Deadline

  • Deadline: Monday, 2 May 2022, 23:59.
  • You may earn 2 points for each lab via Automated Grading on the ZINC Online Submission System.
  • Zip the code file preprocessing.py and your trained model model_lab8.h5 as lab8_tasks.zip for submission to ZINC.
  • Please check here for a usage overview of ZINC.
  • You may submit your file multiple times, but only the latest version will be graded.
  • Lab work submitted via channels other than ZINC will NOT be accepted. Late submission will NOT be accepted as well

Frequently Asked Questions

Q:How much accuracy should achieve to get full mark?
A:0.95

Q:Where is the .h5 file in Colab?
A:

This list is incomplete; you can help by expanding it.

Page maintained by
Homepage