1/87
T/F: The process of transforming continuous space into discrete space is called digitization.
True

What is the effect of this operation on the resultant image?
a. move image down one row
b. move image left
c. copy of image with no change
d. move image right
d. move image right
Sampling is discretization of _______________.
a. Range
b. Domain
b. Domain
T/F: Quantization controls the resolution of the image.
False
Each pixel is randomly made black or white with a uniform probability distribution is called_______________.
A. Salt and Pepper Noise
B. Pepper Noise
C. Salt Noise
A. Salt and Pepper Noise

What is the output of this operation?
The center cell uses the whole image:
Row 1: 1·1 + 3·0 + 0·(-1) = 1
Row 2: 2·1 + 10·0.1 + 2·(-1) = 1
Row 3: 4·1 + 1·0 + 1·(-1) = 3
Sum = 5

The derivative mask of central difference is ________________.
a. [1 -1]
b. [-1 1]
c. [-1 0 1]
c. [-1 0 1]
Which one is not Gaussian filter property?
a) Smooth function
b) Symmetric
c) Convolution of a gaussian with itself is gaussian.
d) Gaussian is not separable.
d) Gaussian is not separable.
T/F: A mean filter operates over a window by selecting the median intensity in the window.
False
Which one is not the property of linear filters?
a. Shift Invariance
b. Associative
c. Linearity
d. Order of the input values
d. Order of the input values

T/F: The above edge is a model of Roof Edge.
False

T/F: For the above diagram, if gradient responses at r and p are larger than q, q is an edge.
False
T/F: An edge is a place of rapid change in the image intensity function.
True

T/F: If we have the following intensity function, its second-order derivative will look like this.
False
T/F: Smoothing removes noise and has no impact on edges.
False
If there are 100 dogs and you predicted only 3 of them and all 3 of them are correct. it means your algorithm is high in ___________ .
a. Precision
b. Recall
a. Precision

The above image represents which edge detector?
a. Sobel Edge Detector
b. Prewitt Edge Detector
a. Sobel Edge Detector
T/F: Laplacian is the first-order derivative mask to find edges.
False
T/F: Zero-crossing is achieved by a second-order derivative.
True

Which operation we are performing in the following equation:
a. Applying Difference of Gaussian
b. Applying Gaussian on image
c. Applying Laplacian of Gaussian
c. Applying Laplacian of Gaussian
T/F: In Neural Networks, images in the training set can be annotated with the "wrong answer" and the model can auto-correct it and produce the expected result.
False
T/F: Multi-Layer Perceptron (MLP) is a fully connected neural network with linear activation functions.
False
T/F: Weights enable an artificial neural network to adjust the strength of the connections between neurons.
True
T/F: In a neural network, each pixel of the image would be input.
True
In a neural network
image size = 28x28
after vectorization it is = 1x784
also assign the same amount of weights to each input.
the network is performing 10 - class classification
b is biased.
The above information can be represented by ________________________________.
a. (784x1) x (784x10)+b
b. (1x784) x (784x10)+b
c. (1x784) x (10x784)+b
b. (1x784) x (784x10)+b
How many network parameters?
-Input feature has 100 values
-One hidden layer with 50 neurons
-100 class classifier
a. wrong network
b. 15200
c. 10150
c. 10150
Input → Hidden layer: 100 × 50 = 5,000 weights
Hidden → Output layer: 50 × 100 = 5,000 weights
Biases: 50 + 100 = 150
Total: 5000 + 5000 + 150 = 10150
How many network parameters?
-Input feature has 50 values
-One hidden layer with 50 neurons
-50 class classifier
a. wrong network
b. 5100
c. 5000
b. 5100
Input → Hidden layer: 50 × 50 = 2,500 weights
Hidden → Output layer: 50 × 50 = 2,500 weights
Biases: 50 + 50 = 100
Total: 2500 + 2500 + 100 = 5100
Let's consider the linear function
z[1] =W[1] x + b[1]
then
z[2] =________________________
a. W[2] z[1] + b[1]
b. W[2] z[1] + b[2]
b. W[2] z[1] + b[2]

The following image shows which activation function:
a. Sigmoid
b. tanh
c. Relu
c. Relu
T/F: The sigmoid activation function range is from -1 to 1.
False
T/F: Convolution Neural Networks operate with the volume of data.
True
If the input image has dimensions 32 x 32 x 3
The convolution layer dimension is 3 x 3 x 3
We have 6 kernels.
What is the dimension of an activation map?
a. 32 x 32 x 6
b. 30 X 30 x 3
c. 30 x 30 x 6
d. 32 x 32 x 3
c. 30 x 30 x 6
Height/Width = 132−3+1=30
Depth = 6 (one activation map per kernel)
Answer = 30 × 30 × 6
If the input image has dimensions 32 x 32 x 3
The convolution layer dimension is 5 x 5 x 3
We have 3 kernels.
What is the dimension of an activation map?
a. 30 x 30 x 3
b. 28 x 28 x 6
c. 32 x 32 x 3
d. 28 x 28 x 3
d. 28 x 28 x 3
Height/Width = 132−5+1=28
Depth = 3 (one activation map per kernel)
Answer = 28 × 28 × 3
If the input image has dimensions 7 x 7
The convolution layer dimension is 3 x 3
Stride is 2
What is the dimension of an activation map?
a. 7 x 7
b. 5 x 5
c. 3 x 3
c. 3 x 3
Height/Width = 27−3+1=3
Answer = 3 × 3
If the input image has dimensions 7 x 7
The convolution layer dimension is 3 x 3
Padding of one pixel
What is the dimension of an activation map?
a. 3 x 3
b. 5 x 5
c. 7 x 7
c. 7 x 7
Height/Width = 17+2(1)−3+1=7
Answer = 7 × 7

If we perform the max pooling operation.
Stride = 2
the result will be?
1) 6 8
3 4
2) 1 4
6 8
3 1
2 4
1) 6 8
3 4
Divide into four 2 × 2 sections.
Top-left: max(1, 1, 5, 6) = 6
Top-right: max(2, 4, 7, 8) = 8
Bottom-left: max(3, 2, 1, 2) = 3
Bottom-right: max(1, 0, 3, 4) = 4
Let
Input = 223 x 223 x 3
No of Kernels = 96
size of each kernel = 11 x 11
stride = 4
pad = 0
a) What is output volume size?
b) What is the number of parameters?
(a) 54 (b) 35K
(a) 55 (b) 35k
(a) 54 (b) 30k
(a) 55 (b) 30K
(a) 54 (b) 35K
a) 4223+2(0)−11+1=54
b) Each kernel has 11 × 11 × 3 = 363
Add 1 bias per kernel: 363 + 1 = 364
364 × 96 = 34,944 ≈ 35K
T/F: Gradient descent is an optimizer for functions which gives a guarantee to finding the optimum solution for convex functions.
True
T/F: Most computer vision problems are convex problems.
False
T/F: The loss function is a metric that determines how well our network can classify the instances used for training based on the parameters of the model.
True

T/F: The following equation show cross-entropy, where the first term represents predicted truth and the second term after the plus sign represents ground truth.
False
T/F: Perform gradient descent per sample and iterate is called Epoch.
False
Adjustment of the gradient by a weighted sum of the previous amount plus the current amount is called______________________.
a. Backpropagation
b. Momentum
c. Stochastic Gradient Descent
b. Momentum
T/F: Too many parameters can cause overfitting in the model and this can be handled by regularization.
True
T/F: The hyperparameters are variables whose values are learned during the training of the model.
False

The above operation on the neural network is called____________.
a. Early Stopping
b. Regularization
c. Dropout
c. Dropout
A PyTorch tensor has shape (4, 6, 8). Which shape is valid when applying x.view() without changing the total number of elements?
a. (4, 8, 8)
b. (6, 8, 2)
c. (8, 6, 4)
d. (4, 12, 4)
c. (8, 6, 4)
4 × 6 × 8 = 192
so option c = 8 × 6 × 4 = 192
Given A = torch.randn(8, 12) and B = torch.randn(12, 5), what is the shape of torch.mm(A, B)?
a. (12, 5)
b. (12, 12)
c. (8, 12)
d. (8, 5)
d. (8, 5)
Matrix multiplication: (m⋅n)(n⋅p)=(m⋅p)
(8 × 12) (12 × 5) = (8 × 5)
A 32 × 32 grayscale image passes through a convolutional layer with 6 filters of size 5 × 5, stride 1, and padding 0. What is the output tensor shape for one image, including the batch dimension?
a. (1, 6, 30, 30)
b. (1, 6, 28, 28)
c. (1, 5, 28, 28)
d. (1, 6, 32, 32)
b. (1, 6, 28, 28)
Height/Width = 132+2(0)−5+1=28
Batch size = 1 (one image)
Number of filters = 6
Answer = (1, 6, 28, 28)
A CNN produces feature maps of shape (4, 16, 10, 10). A 2 × 2 max-pooling operation with stride 2 is applied. What is the resulting shape?
a. (4, 16, 5, 5)
b. (4, 16, 8, 8)
c. (4, 32, 5, 5)
d. (4, 8, 5, 5)
a. (4, 16, 5, 5)
Height/Width = 210−2+1=5
Max pooling does not change the batch size or number of filters.
Answer = (4, 16, 5, 5)
A dataset contains 50,000 training images. With batch_size=128 and drop_last=False, how many optimizer updates occur in one epoch if optimizer.step() is called once per batch?
a. 128
b. 392
c. 391
d. 390
c. 391
Number of batches = 12850,000=391
A 32 × 32 grayscale image passes through Conv2d(1,6,5), MaxPool2d(2), Conv2d(6,16,5), and MaxPool2d(2), with convolution stride 1 and no padding. How many features per image enter the first fully connected layer?
a. 576
b. 256
c. 784
d. 400
d. 400
Conv2d(1, 6, 5): 132−5+1=28 → 28 × 28 × 6
MaxPool2d(2): 28/2 = 14 → 14 × 14 × 6
Conv2d(6, 16, 5): 114−5+1=10 → 10 × 10 × 16
MaxPool2d(2): 10/2 = 5 → 5 × 5 × 16 = 400
A PyTorch tensor has shape (4, 3, 8, 8), representing a batch of images. How many scalar values does the tensor contain?
a. 192
b. 256
c. 512
d. 768
d. 768
4 × 3 × 8 × 8 = 768
T/F: In PyTorch, a tensor with requires_grad=True can participate in automatic gradient computation.
True
In PyTorch, which operation computes gradients of a scalar loss with respect to trainable parameters?
a. optimizer.step()
b. loss.backward()
c. optimizer.zero_grad()
d. model.eval()
b. loss.backward()
A CNN is trained using 240 images with a batch size of 20. The optimizer updates the network's weights and biases once after processing each batch. How many batches are processed during one epoch?
a. 20
b. 24
c. 12
d. 10
c. 12
240/20 = 12
T/F: In a standard PyTorch training loop, optimizer.step() is used to clear gradients accumulated from previous batches.
False
A CNN receives an input image of size 28 × 28. A convolution uses a 3 × 3 kernel, stride 1, and no padding. What is the output spatial size?
a. 26 x 26
b. 28 x 28
c. 25 x 25
d. 14 x 14
a. 26 x 26
128+2(0)−3+1=26
A convolutional layer has 2 input channels, 4 output channels, a kernel size of 3 x 3, and one bias per output channel. How many trainable parameters does it contain?
a. 36
b. 80
c. 72
d. 76
d. 76
2 × 3 × 3 × 4 = 72
One bias per output channel: 1 × 4 = 4
72 + 4 = 76
Which PyTorch module is typically used as the base class when defining a custom neural network?
a. torch.nn.Module
b. torch.optim.Optimizer
c. torch.utils.data.Dataset
d. torch.Tensor
a. torch.nn.Module
In a PyTorch CNN, which operation is commonly used to convert convolutional feature maps into a one-dimensional feature vector per image before a fully connected layer?
a. Softmax
b. ReLU
c. Flatten
d. Max Pooling
c. Flatten
A PyTorch model produces logits of shape (64, 10) for a batch of 64 images. What does the second dimension represent in a 10-class classifier?
a. Number of training epochs
b. Number of convolutional filters in the layer
c. Number of images in the batch
d. Number of class scores per image
d. Number of class scores per image
A 2 × 3 matrix is multiplied by a 3 × 4 matrix using PyTorch matrix multiplication. What is the output shape?
a. 3 x 3
b. 2 x 3
c. 2 x 4
d. 4 x 2
c. 2 x 4
Matrix multiplication: (m⋅n)(n⋅p)=(m⋅p)
(2 × 3) (3 × 4) = (2 × 4)
A CNN is trained for 5 epochs on 8,000 samples using batch size 200. If the optimizer updates once per batch, how many total parameter updates occur?
a. 1,000
b. 40
c. 200
d. 8,000
c. 200
8000/200 = 40 batches
40 × 5 = 200

Given x=2, w=3, z=wx, and L=z^2, what is the gradient of the loss with respect to the weight w, i.e., 𝜕z𝜕L ? Hint: Use chain rule
a. 6
b. 36
c. 24
d. 12
c. 24
z = w * x = 3 × 2 = 6
L = z² = 6² = 36
Chain rule: 𝜕w𝜕L=𝜕z𝜕L⋅𝜕w𝜕z = 2z * x = 2(6) * 2 = 24
T/F: Gaussian smoothing at different scales enables feature detection across different image resolutions.
True
T/F: In SIFT, keypoints are identified by finding extrema in the Difference of Gaussians (DoG) scale space.
True
T/F: SIFT orientation assignment is primarily responsible for achieving scale invariance.
False
Why is Difference of Gaussians (DoG) used in SIFT?
a. To calculate the final descriptor distance
b. To efficiently approximate the scale-normalized Laplacian of Gaussian
c. To eliminate the need for keypoint localization
d. To estimate optical flow between images
b. To efficiently approximate the scale-normalized Laplacian of Gaussian
T/F: In SIFT, a keypoint must be a local maximum in the Difference of Gaussians (DoG) scale space to be selected as a candidate keypoint.
False
In SIFT, why are keypoints with strong edge responses rejected?
a. They have insufficient gradient magnitude for feature detection.
b. They cannot be detected at multiple scales.
c. They are poorly localized along the direction of the edge.
d. They cannot be assigned a dominant orientation.
c. They are poorly localized along the direction of the edge.
During SIFT orientation assignment, a keypoint has two significant peaks in its local gradient orientation histogram, one at 40° (highest peak) and another at 130° (85% of the highest peak). What should SIFT do?
a. Reject the keypoint because multiple dominant orientations indicate instability.
b. Assign only 130° because it represents a secondary orientation.
c. Assign only 40° as the keypoint orientation.
d. Create two keypoints at the same location and scale, with orientations of 40° and 130°.
d. Create two keypoints at the same location and scale, with orientations of 40° and 130°.
Two SIFT descriptors have nearest-neighbor distances of 0.30 and 0.35. What does their distance ratio suggest compared with distances of 0.30 and 0.80?
a. Both matches are equally distinctive
b. The first match is more distinctive
c. The second match is more distinctive
d. The ratio does not measure distinctiveness
c. The second match is more distinctive
Distances 0.30 and 0.35: ratio = 0.30 / 0.35 ≈ 0.86.
Distances 0.30 and 0.80: ratio = 0.30 / 0.80 = 0.375.
In HOG, an image region is divided into cells of 8 × 8 pixels. Each cell produces a histogram containing 9 orientation bins. A block consists of 2 × 2 cells. How many values are included in the HOG descriptor for one block before normalization?
a. 36
b. 9
c. 64
d. 18
a. 36
Each cell produces a 9-bin histogram, and a block contains 2 × 2 = 4 cells. So, 4 × 9 = 36 values.
Which statement best distinguishes SIFT from HOG?
a. HOG requires scale-space extrema, while SIFT does not
b. SIFT is designed exclusively for human detection, while HOG is designed for image stitching
c. SIFT uses only intensity values, while HOG uses color values
d. SIFT detects and describes local keypoints, while HOG typically describes gradient distributions over a dense spatial grid
d. SIFT detects and describes local keypoints, while HOG typically describes gradient distributions over a dense spatial grid
A corner detector analyzes the intensity changes within a small image window. For two candidate points, the following observations are made:
Point A: Shifting the window horizontally produces a large intensity change, but shifting it vertically produces very little change.
Point B: Shifting the window horizontally, vertically, or diagonally produces large intensity changes.
Which conclusion is most appropriate?
a. Point A is a corner because its intensity changes strongly in one direction, while Point B is an edge.
b. Both points are corners because they produce large intensity changes in at least one direction.
c. Point A is likely an edge, while Point B is likely a corner because its intensity changes significantly in multiple directions.
d. Neither point can be a corner because corner detection requires the intensity to remain constant within the window.
c. Point A is likely an edge, while Point B is likely a corner because its intensity changes significantly in multiple directions.
In a HOG descriptor, gradient orientations are grouped into 9 bins covering 0° to 180°, with bin centers separated by 20°. A pixel has a gradient orientation of 35° and a gradient magnitude of 8.
Assuming linear interpolation between the two nearest orientation-bin centers (30° and 50°), how should the pixel's gradient magnitude be distributed?
a. 6 to the 30° bin and 2 to the 50° bin.
b. 4 to the 30° bin and 4 to the 50° bin.
c. 2 to the 30° bin and 6 to the 50° bin.
d. 8 to the 30° bin and 0 to the 50° bin.
a. 6 to the 30° bin and 2 to the 50° bin.
Calculate distance:
Distance from 35° to the 30°: 5°
Distance from 35° to the 50°: 15°
Bin spacing: 20°
Weights:
30° bin: (20 − 5) / 20 = 15/20 × 8 = 6
50° bin: (20 − 15) / 20 = 5/20 × 8 = 2
An autoencoder is trained to reproduce input images using an encoder and decoder. Which statement correctly describes the learning process?
a. The model learns features by reconstructing its input, using a loss function for optimization.
b. The model requires a class label for every input image.
c. The encoder must preserve every original input dimension.
d. The decoder learns class boundaries between labeled images.
a. The model learns features by reconstructing its input, using a loss function for optimization.
A dataset contains complex nonlinear relationships between image features. Which statement best explains why an autoencoder may be preferable to PCA?
a. An autoencoder can learn nonlinear dependencies, while PCA represents data using linear combinations.
b. PCA cannot reduce the dimensionality of image data.
c. Autoencoders do not require optimization.
d. PCA always reconstructs nonlinear relationships exactly.
a. An autoencoder can learn nonlinear dependencies, while PCA represents data using linear combinations.
An autoencoder compresses a 28 X 28 image into a latent vector containing only two values. Which conclusion is most appropriate?
a. The latent vector must contain the original pixel values.
b. The original image can always be reconstructed without information loss.
c. The representation is compressed, so reconstruction quality depends on what information the model learns to preserve.
d. The decoder is unnecessary because the encoder already produces the final image.
c. The representation is compressed, so reconstruction quality depends on what information the model learns to preserve.
An autoencoder is trained on images from one visual domain and then applied to images with substantially different characteristics. Which outcome is most likely?
a. The model automatically becomes a supervised classifier.
b. The model is guaranteed to reconstruct the new images equally well.
c. The model must increase its latent dimension automatically.
d. Reconstruction may degrade because the learned representation is data-specific.
d. Reconstruction may degrade because the learned representation is data-specific.
A denoising autoencoder receives a noisy image as input. Which processing sequence best describes how it produces a reconstructed image?
a. Clean image → PCA classifier → noise estimation
b. Noisy image → nearest-neighbor classifier → reconstructed image
c. Noisy image → encoder → compressed representation → decoder → denoised image
d. Clean image → decoder → class label
c. Noisy image → encoder → compressed representation → decoder → denoised image
A nearest-neighbor classifier divides a two-dimensional feature space into different classification regions based on labeled training samples. How is the predicted class determined for a new data point?
a. By finding the training sample with the highest classification score from a linear classifier.
b. By finding a separating line that maximizes the margin between the two classes.
c. By assigning the class of the training sample that has the smallest distance to the new point.
d. By calculating the average position of all training samples and assigning its class.
c. By assigning the class of the training sample that has the smallest distance to the new point.

A K-Nearest Neighbor (KNN) classifier uses Euclidean distance to classify a new data point Q=(2, 3). The training dataset contains the following labeled points:
Point Coordinates Class
P1 (2, 6) A
P2 (5, 3) B
P3 (2, 4) A
P4 (6, 3) B
P5 (2, 5) A
If K = 3, what class will be assigned to Q? Hint: Euclidean distance
a. Class B, because two of the three nearest neighbors belong to B.
b. Class B, because Class B has more samples in the complete training dataset.
c. Class A, because Class A contains the closest training sample.
d. Class A, because two of the three nearest neighbors belong to A.
d. Class A, because two of the three nearest neighbors belong to A.
Using Euclidean distance formula:
P1 (2,6): √[(2−2)² + (6−3)²] = √9 = 3 (A)
P2 (5,3): √[(5−2)² + (3−3)²] = √9 = 3 (B)
P3 (2,4): √[(2−2)² + (4−3)²] = √1 = 1 (A)
P4 (6,3): √[(6−2)² + (3−3)²] = √16 = 4 (B)
P5 (2,5): √[(2−2)² + (5−3)²] = √4 = 2 (A)
3 nearest neighbors:
P3 = 1 (A)
P5 = 2 (A)
P1 = 3 (A)
Class A = 3 votes
Class B = 0 votes
A two-class dataset can be separated by several different straight lines, all of which classify the training samples correctly. According to the maximum-margin principle, which boundary should be preferred?
a. The line with the steepest slope.
b. The line maximizing the distance to the nearest training samples from either class.
c. The line passing through the center of the entire dataset, regardless of class labels.
d. The line passing closest to the greatest number of training samples.
b. The line maximizing the distance to the nearest training samples from either class.
A dataset contains two classes that cannot be separated by a straight line in the original two-dimensional feature space. Which approach would allow an SVM to classify these data more effectively?
a. Remove the training samples that cannot be separated by a straight line.
b. Increase the number of training iterations while keeping the original linear decision boundary.
c. Adjust the slope and intercept of a linear decision boundary without changing the feature space.
d. Map the data into a higher-dimensional feature space where a linear separating hyperplane may exist.
d. Map the data into a higher-dimensional feature space where a linear separating hyperplane may exist.
A classification problem contains four classes. A one-vs.-one multiclass SVM trains a separate binary classifier for each unique pair of classes. How many binary SVM classifiers are required?
a. 8
b. 12
c. 6
d. 4
c. 6
Let's call the classes A, B, C, and D.
The pairs are:
A vs B
A vs C
A vs D
B vs C
B vs D
C vs D
That gives us 6 classifiers.
A CNN produces a feature map of size 5×5×16, which is flattened and connected to a fully connected layer containing 400 neurons.
If this fully connected layer is replaced by an equivalent convolutional layer, which configuration would preserve the same operation?
a. 400 filters of size 3 x 3, producing a 3 x 3 x 400 output.
b. 400 filters of size 1 x 1, producing a 5 x 5 x 400 output.
c. 16 filters of size 5 x 5, producing a 1 x 1 x 16 output.
d. 400 filters of size 5 x 5, producing a 1 x 1 x 400 output.
d. 400 filters of size 5 x 5, producing a 1 x 1 x 400 output.
Height/Width: 15+2(0)−5+1=1