Challenge - 5 Problems
Image-to-Image Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What is the main goal of image-to-image transformation models?
Choose the best description of what image-to-image transformation models do.
Attempts:
2 left
💡 Hint
Think about models that change one image into another.
✗ Incorrect
Image-to-image transformation models take an input image and produce a new image that has been changed in some way, such as changing style, color, or adding effects.
❓ Model Choice
intermediate2:00remaining
Which model architecture is commonly used for image-to-image transformation tasks?
Select the model architecture best suited for image-to-image transformation.
Attempts:
2 left
💡 Hint
Look for a model that preserves spatial details and can reconstruct images.
✗ Incorrect
U-Net is a convolutional autoencoder with skip connections that helps preserve image details, making it ideal for image-to-image tasks.
❓ Metrics
advanced2:00remaining
Which metric best measures the quality of generated images in image-to-image transformation?
Choose the metric that evaluates how close the generated image is to the target image in terms of pixel-level similarity.
Attempts:
2 left
💡 Hint
Think about a metric that calculates average squared differences between pixels.
✗ Incorrect
Mean Squared Error measures the average squared difference between pixels of generated and target images, indicating similarity.
🔧 Debug
advanced2:00remaining
What error will this image-to-image transformation training code raise?
Consider this Python snippet for training a model. What error occurs when running it?
```python
import torch
from torch import nn
model = nn.Sequential(
nn.Conv2d(3, 64, 3, padding=1),
nn.ReLU(),
nn.Conv2d(64, 3, 3, padding=1)
)
input_image = torch.randn(1, 3, 256, 256)
output = model(input_image)
loss_fn = nn.MSELoss()
# Target image has wrong shape
target_image = torch.randn(1, 3, 128, 128)
loss = loss_fn(output, target_image)
```
Attempts:
2 left
💡 Hint
Check if output and target images have the same shape before computing loss.
✗ Incorrect
The output image shape is (1,3,256,256) but target image shape is (1,3,128,128). MSELoss requires both inputs to have the same shape, causing a RuntimeError.
❓ Hyperparameter
expert2:00remaining
Which hyperparameter adjustment is most likely to improve image sharpness in a GAN-based image-to-image model?
You notice generated images are blurry. Which change is most effective to improve sharpness?
Attempts:
2 left
💡 Hint
Sharper images often come from a stronger discriminator that pushes the generator harder.
✗ Incorrect
Increasing discriminator capacity helps it better distinguish real from fake images, forcing the generator to produce sharper images.