0
0
Computer Visionml~20 mins

Why CNNs dominate image classification in Computer Vision - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
CNN Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why do CNNs perform better than fully connected networks on images?

Which reason best explains why Convolutional Neural Networks (CNNs) usually outperform fully connected networks on image classification tasks?

ACNNs use local connections and shared weights, capturing spatial patterns efficiently.
BFully connected networks have fewer parameters, so they underfit images.
CCNNs ignore pixel relationships, making them faster but less accurate.
DFully connected networks use convolution layers that reduce image size too much.
Attempts:
2 left
💡 Hint

Think about how images have nearby pixels related to each other.

Predict Output
intermediate
2:00remaining
Output shape after convolution layer

Given a grayscale image of size 28x28 and a convolution layer with 6 filters of size 5x5, stride 1, and no padding, what is the output shape?

Computer Vision
import torch
import torch.nn as nn

input_tensor = torch.randn(1, 1, 28, 28)  # batch=1, channels=1, height=28, width=28
conv = nn.Conv2d(in_channels=1, out_channels=6, kernel_size=5, stride=1, padding=0)
output = conv(input_tensor)
print(output.shape)
Atorch.Size([6, 1, 28, 28])
Btorch.Size([1, 6, 28, 28])
Ctorch.Size([1, 6, 24, 24])
Dtorch.Size([1, 1, 24, 24])
Attempts:
2 left
💡 Hint

Output size = (Input size - Kernel size) / Stride + 1

Model Choice
advanced
2:00remaining
Choosing CNN architecture for complex image classification

You want to classify high-resolution images with many classes. Which CNN architecture choice is best to improve accuracy while managing training time?

AUse a CNN with residual connections (ResNet) to allow deeper networks without vanishing gradients.
BUse a very deep CNN with many layers and no pooling to keep all details.
CUse a shallow CNN with large fully connected layers at the end to capture complexity.
DUse only convolution layers with large kernel sizes (e.g., 11x11) to cover more area.
Attempts:
2 left
💡 Hint

Think about how very deep networks can be trained effectively.

Hyperparameter
advanced
2:00remaining
Effect of kernel size on CNN feature detection

How does increasing the convolution kernel size from 3x3 to 7x7 generally affect a CNN's ability to detect features in images?

ALarger kernels always improve accuracy without drawbacks.
BLarger kernels capture more global features but increase parameters and risk overfitting.
CLarger kernels decrease the number of parameters and speed up training.
DLarger kernels reduce the receptive field and miss important details.
Attempts:
2 left
💡 Hint

Consider the trade-off between detail and context in feature detection.

Metrics
expert
2:00remaining
Interpreting CNN training metrics for image classification

During CNN training on image classification, you observe training accuracy steadily increasing but validation accuracy plateaus and then decreases. What does this indicate?

AThe dataset is too small to train any model.
BThe model is underfitting and needs more layers.
CThe learning rate is too low, causing slow training.
DThe model is overfitting the training data and not generalizing well.
Attempts:
2 left
💡 Hint

Think about what it means when training improves but validation worsens.