Advanced Computer Vision Quizzes

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/87

flashcard set

Earn XP

Description and Tags

CAP 5410

88 Terms

1
New cards

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

True

2
New cards
<p>What is the effect of this operation on the resultant image? </p><p>a. move image down one row </p><p>b. move image left </p><p>c. copy of image with no change </p><p>d. move image right</p>

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

3
New cards

Sampling is discretization of _______________.

a. Range

b. Domain

b. Domain

4
New cards

T/F: Quantization controls the resolution of the image.

False

5
New cards

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

6
New cards
<p>What is the output of this operation?</p>

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


<p>The center cell uses the whole image:</p><ul><li><p>Row 1: 1·1 + 3·0 + 0·(-1) = 1</p></li><li><p>Row 2: 2·1 + 10·0.1 + 2·(-1) = 1</p></li><li><p>Row 3: 4·1 + 1·0 + 1·(-1) = 3</p></li><li><p>Sum = <strong>5</strong></p></li></ul><p></p>
7
New cards

The derivative mask of central difference is ________________.

a. [1 -1]

b. [-1 1]

c. [-1 0 1]

c. [-1 0 1]

8
New cards

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.

9
New cards

T/F: A mean filter operates over a window by selecting the median intensity in the window.

False

10
New cards

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

11
New cards
<p>T/F: The above edge is a model of Roof Edge.</p>

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

False

12
New cards
<p>T/F: For the above diagram, if gradient responses at r and p are larger than q, q is an edge.</p>

T/F: For the above diagram, if gradient responses at r and p are larger than q, q is an edge.

False

13
New cards

T/F: An edge is a place of rapid change in the image intensity function.

True

14
New cards
<p>T/F: If we have the following intensity function, its second-order derivative will look like this.</p>

T/F: If we have the following intensity function, its second-order derivative will look like this.

False

15
New cards

T/F: Smoothing removes noise and has no impact on edges.

False

16
New cards

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

17
New cards
<p>The above image represents which edge detector? </p><p>a. Sobel Edge Detector </p><p>b. Prewitt Edge Detector</p>

The above image represents which edge detector?

a. Sobel Edge Detector

b. Prewitt Edge Detector

a. Sobel Edge Detector

18
New cards

T/F: Laplacian is the first-order derivative mask to find edges.

False

19
New cards

T/F: Zero-crossing is achieved by a second-order derivative.

True

20
New cards
<p>Which operation we are performing in the following equation: </p><p>a. Applying Difference of Gaussian </p><p>b. Applying Gaussian on image </p><p>c. Applying Laplacian of Gaussian</p>

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

21
New cards

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

22
New cards

T/F: Multi-Layer Perceptron (MLP) is a fully connected neural network with linear activation functions.

False

23
New cards

T/F: Weights enable an artificial neural network to adjust the strength of the connections between neurons.

True

24
New cards

T/F: In a neural network, each pixel of the image would be input.

True

25
New cards

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

26
New cards

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


27
New cards

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


28
New cards

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]

29
New cards
<p>The following image shows which activation function: </p><p>a. Sigmoid </p><p>b. tanh</p><p>c. Relu</p>

The following image shows which activation function:

a. Sigmoid

b. tanh

c. Relu

c. Relu

30
New cards

T/F: The sigmoid activation function range is from -1 to 1.

False

31
New cards

T/F: Convolution Neural Networks operate with the volume of data.

True

32
New cards

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 = 32−31+1=30\frac{32-3}{1}+1=30

Depth = 6 (one activation map per kernel)

Answer = 30 × 30 × 6

33
New cards

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 = 32−51+1=28\frac{32-5}{1}+1 = 28

Depth = 3 (one activation map per kernel)

Answer = 28 × 28 × 3

34
New cards

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 = 7−32+1=3\frac{7-3}{2}+1=3

Answer = 3 × 3

35
New cards

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 = 7+2(1)−31+1=7\frac{7+2\left(1\right)-3}{1}+1=7

Answer = 7 × 7

36
New cards
<p>If we perform the max pooling operation.&nbsp; </p><p>Stride = 2</p><p>the result will be?</p><p></p><p>1)&nbsp; &nbsp; 6&nbsp; &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; &nbsp; </p><p>&nbsp;      3&nbsp; &nbsp; &nbsp;  &nbsp;4 &nbsp; </p><p></p><p>2)&nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp; &nbsp; </p><p>       6&nbsp; &nbsp; &nbsp; &nbsp;  8 &nbsp; &nbsp; &nbsp; &nbsp;</p><p>       3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp; &nbsp;</p><p>       2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4</p>

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


37
New cards

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) 223+2(0)−114+1=54\frac{223+2\left(0\right)-11}{4}+1=54

b) Each kernel has 11 × 11 × 3 = 363

Add 1 bias per kernel: 363 + 1 = 364

364 × 96 = 34,944 ≈ 35K

38
New cards

T/F: Gradient descent is an optimizer for functions which gives a guarantee to finding the optimum solution for convex functions.

True

39
New cards

T/F: Most computer vision problems are convex problems.

False

40
New cards

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

41
New cards
<p>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.</p>

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

42
New cards

T/F: Perform gradient descent per sample and iterate is called Epoch.

False

43
New cards

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

44
New cards

T/F: Too many parameters can cause overfitting in the model and this can be handled by regularization.

True

45
New cards

T/F: The hyperparameters are variables whose values are learned during the training of the model.

False

46
New cards
<p>The above operation on the neural network is called____________.&nbsp; &nbsp; </p><p></p><p>a. Early Stopping </p><p>b. Regularization </p><p>c. Dropout</p>

The above operation on the neural network is called____________.   


a. Early Stopping

b. Regularization

c. Dropout

c. Dropout

47
New cards

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

48
New cards

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)\left(m\cdot n\right)\left(n\cdot p\right)=\left(m\cdot p\right)

(8 × 12) (12 × 5) = (8 × 5)

49
New cards

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 = 32+2(0)−51+1=28\frac{32+2\left(0\right)-5}{1}+1=28

Batch size = 1 (one image)

Number of filters = 6

Answer = (1, 6, 28, 28)

50
New cards

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 = 10−22+1=5\frac{10-2}{2}+1=5

Max pooling does not change the batch size or number of filters.

Answer = (4, 16, 5, 5)

51
New cards

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 = 50,000128=391\frac{50,000}{128}=391

52
New cards

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): 32−51+1=28\frac{32-5}{1}+1=28 → 28 × 28 × 6

  • MaxPool2d(2): 28/2 = 14 → 14 × 14 × 6

  • Conv2d(6, 16, 5): 14−51+1=10\frac{14-5}{1}+1=10 → 10 × 10 × 16

  • MaxPool2d(2): 10/2 = 5 → 5 × 5 × 16 = 400


53
New cards

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

54
New cards

T/F: In PyTorch, a tensor with requires_grad=True can participate in automatic gradient computation.

True

55
New cards

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()

56
New cards

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

57
New cards

T/F: In a standard PyTorch training loop, optimizer.step() is used to clear gradients accumulated from previous batches.

False

58
New cards

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


28+2(0)−31+1=26\frac{28+2\left(0\right)-3}{1}+1=26

59
New cards

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

60
New cards

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

61
New cards

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

62
New cards

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

63
New cards

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)\left(m\cdot n\right)\left(n\cdot p\right)=\left(m\cdot p\right)

(2 × 3) (3 × 4) = (2 × 4)

64
New cards

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

65
New cards
<p>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., $$ \frac{𝜕L}{𝜕z} $$ ? Hint: Use chain rule</p><p></p><p>a. 6</p><p>b. 36</p><p>c. 24</p><p>d. 12</p>

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., 𝜕L𝜕z\frac{𝜕L}{𝜕z} ? 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: 𝜕L𝜕w=𝜕L𝜕z⋅𝜕z𝜕w\frac{𝜕L}{𝜕w}=\frac{𝜕L}{𝜕z}\cdot\frac{𝜕z}{𝜕w} = 2z * x = 2(6) * 2 = 24

66
New cards

T/F: Gaussian smoothing at different scales enables feature detection across different image resolutions.

True

67
New cards

T/F: In SIFT, keypoints are identified by finding extrema in the Difference of Gaussians (DoG) scale space.

True

68
New cards

T/F: SIFT orientation assignment is primarily responsible for achieving scale invariance.

False

69
New cards

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

70
New cards

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

71
New cards

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.

72
New cards

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°.

73
New cards

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.

74
New cards

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.

75
New cards

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

76
New cards

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.

77
New cards

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


78
New cards

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.

79
New cards

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.

80
New cards

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.

81
New cards

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.

82
New cards

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

83
New cards

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.

84
New cards
<p>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:</p><p>Point                 Coordinates                   Class</p><p>P1                           (2, 6)                            A</p><p>P2                           (5, 3)                            B</p><p>P3                           (2, 4)                            A</p><p>P4                           (6, 3)                            B</p><p>P5                           (2, 5)                            A</p><p>If K = 3, what class will be assigned to Q?     Hint: Euclidean distance </p><p></p><p>a. Class B, because two of the three nearest neighbors belong to B.</p><p>b. Class B, because Class B has more samples in the complete training dataset.</p><p>c. Class A, because Class A contains the closest training sample.</p><p>d. Class A, because two of the three nearest neighbors belong to A.</p>

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

85
New cards

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.

86
New cards

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.

87
New cards

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:

  1. A vs B

  2. A vs C

  3. A vs D

  4. B vs C

  5. B vs D

  6. C vs D

That gives us 6 classifiers.

88
New cards

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: 5+2(0)−51+1=1\frac{5+2\left(0\right)-5}{1}+1=1