Quiz Space

Deep Learning Practice · End Term · 22 Dec 2024 · September 2024 term

Question 12: Consider the following code snippets used in a multiscal…

Question 12

+5 marksOne correct option

Consider the following code snippets used in a multiscale deep network for single-image depth estimation. Both blocks play different roles in the network.

Which of the following best describes the roles of the two blocks?

A. Block A:

python
import torch
import torch.nn as nn
class DepthNetwork(nn.Module):
def __init__(self):
super(DepthNetwork, self).__init__()
self.encoder = nn.Sequential(
nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3),
nn.ReLU(),
nn.Conv2d(64, 128, kernel_size=5, stride=2, padding=2),
nn.ReLU()
)
self.fc = nn.Sequential(
nn.Linear(128 * 28 * 28, 1024),
nn.ReLU(),
nn.Linear(1024, 128 * 56 * 56)
)
def forward(self, x):
x = self.encoder(x)
x = x.view(x.size(0), -1)
x = self.fc(x)
x = x.view(x.size(0), 128, 56, 56)
return x

B. Block B:

python
import torch
import torch.nn as nn
class DepthRefinementNetwork(nn.Module):
def __init__(self):
super(DepthRefinementNetwork, self).__init__()
self.refinement = nn.Sequential(
nn.Conv2d(131, 64, kernel_size=3, padding=1),
nn.ReLU(),
nn.Conv2d(64, 1, kernel_size=3, padding=1)
)
def forward(self, coarse_depth, rgb):
x = torch.cat((coarse_depth, rgb), dim=1) # Concatenate coarse depth and RGB
x = self.refinement(x)
return x
  1. A

    Block A generates high-level global features and outputs an initial coarse depth map, while Block B refines the depth map using local details from the RGB image and the coarse depth map.

  2. B

    Block A performs refinement of the depth map using concatenated coarse depth and RGB features, while Block B generates the coarse depth map from the input RGB image.

  3. C

    Both Block A and Block B are coarse networks, with Block B performing an additional refinement step.

  4. D

    Block A generates a low-resolution coarse depth map but does not include global features, while Block B produces fine-grained depth without refinement.

Show answer

Correct answer

  • A

    Block A generates high-level global features and outputs an initial coarse depth map, while Block B refines the depth map using local details from the RGB image and the coarse depth map.

Question 12 of 20 in the IIT Madras BS Deep Learning Practice (Deep Learning Practice) End Term paper sat on 22 Dec 2024, in the September 2024 term (IIT M DEGREE AN EXAM QDB4 22 Dec 2024). It carries 5 marks.

This question was also asked in

More questions from this paper

  1. Q1Consider the following code snippets for loading and modifying VGGNet-16 and VGGNet-19 architectures for a classificati…
  2. Q2Figure question
  3. Q3Suppose I have an image of size 227×227. Which of the following code snippets correctly implements a Min Pooling operat…
  4. Q4Consider a black-and-white image of dimension 227×227. Which of the following correctly demonstrates a function to flat…
  5. Q5Which of the following code snippets correctly implements the skip connection in ResNet?
  6. Q6Figure question
  7. Q7The following code snippets represent different blocks in the Fast R-CNN pipeline. Identify the correct arrangement of …
  8. Q8Which of the following code snippets correctly models the loss function in YOLO?
  9. Q9Consider the following predictions and ground truths for a binary classification problem: - True Positives (TP): 30 - F…
  10. Q10How many convolutional layers are there in the original YOLO architecture?
  11. Q11Consider the following code snippet that calculates the Intersection over Union (IoU) for two bounding boxes: What will…
  12. Q13Which of the following code snippets correctly implements the downsampling operation in a U-Net architecture?
  13. Q14Consider the following predictions and ground truth values:\ Predictions: [3.0,−0.5, 2.0, 7.0] - Ground Truth: [2.5, 0.…
  14. Q15In a stereo vision system, left-right disparity is used to compute depth by comparing\ corresponding points in the left…
  15. Q16What are the primary roles of the generator and discriminator in a Super-Resolution GAN (SRGAN) architecture?
  16. Q17Which of the following code snippets correctly adds gaussian noise to an image?
  17. Q18What are the benefits of using depthwise and pointwise convolutions (as in depthwise separable convolutions) compared t…
  18. Q19Which of the following code snippets correctly implements the generator for a super- resolution GAN (SRGAN) network?
  19. Q20Which of the following are common use cases of super-resolution using SRGAN?