Image Analysis and Object Recognition (IAOR)Summer Semester 2022Version: 23.06.2022Assignment 5Convolutional Neural Networksfor Image ClassicationSubmission Deadline: XXXXXXXXXX, 11 amTask ...

Image Analysis and Object Recognition (IAOR)Summer Semester 2022Version: 23.06.2022Assignment 5Convolutional Neural Networksfor Image ClassicationSubmission Deadline: 06.07.2022, 11 amTask  Convolutional Neural NetworkIn this task, you are supposed to implement and run a small convolutional neural network (CNN) forhandwritten digit classication. Training a CNN typically consumes large time and computationresources and will be skipped. Instead, you are provided with the pretrained parameters (akaweights), which you compose into a CNN of the following structure1:Layer Abbrev. Size (in) Size (out) Kernel Size StrideConvolutional Conv1 28 × 28 × 1 26 × 26 × 32 3 × 3 1Activation Relu 26 × 26 × 32 26 × 26 × 32  Convolutional Conv2 26 × 26 × 32 24 × 24 × 64 3 × 3 1Activation Relu 24 × 24 × 64 24 × 24 × 64  Pooling Maxpool 24 × 24 × 64 12 × 12 × 64 2 × 2 2Flattening Flat 12 × 12 × 64 9216  Fully-connected Fc1 9216 128  Activation Relu 128 128  Fully-connected Fc2 128 10  Activation Softmax 10 10  a) Download the le images.zip, which contains 100 images of size 28 × 28 pixels from theMNIST dataset2. Load and plot image_1.png. Furthermore, download the weights.zip,which contains the pretrained parameters. You can use the weights_python.zip for python.b) Implement a function for the convolutional layer: It uses the layer's input and the layer'sparameters and returns a properly sized output for the layer (cf. in and out sizes in the tableabove). Conceptually, it implements a 2D convolution with summation over the channels.Assume stride 1, a `valid' padding, and kernel size of 3 × 3. You are allowed to use built-infunction such as conv2, etc.c) Activation functions introduce non-linearities into the CNN. Commonly used activation func-tions are the rectied linear unit (Relu) and the softmax. Implement both by yourself.d) Implement a max pooling function that keeps the maximum value within a 2×2 neighborhoodUse stride 2. The usage of built-in functions and online resources is allowed (if properlyreferenced).e) Use your implemented functions and the downloaded parameters in order to compose theminto the CNN described in the table above.1https://torchserve.pytorch.org/mar_files/mnist_scripted_v2.mar2http://yann.lecun.com/exdb/mnist/Computer Vision in Engineering  Prof. Dr. RodehorstM.Sc. Christian [email protected]/2
Jun 30, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here