计算机视觉 道练习题
35 道题 · 0 已解决
计算机视觉模型将图像视为数字网格,并通过在图像上滑动小型 filter 来寻找边缘、纹理和物体。Convolution 就像是在图片上移动一个小模板,并记录每个 patch 的匹配程度。这些题目要求你手动编写核心图像操作,这有助于建立对 shape 和 indexing 的深刻理解。你将编写带有 stride 和 padding 的 2D convolution,使用 im2col 展开 patches,通过 dilated convolutions 追踪 feature map 的尺寸,实现 max pooling 的前向和后向传播,构建 Gaussian kernel,使用 Sobel filters 检测边缘,通过 bilinear interpolation 调整图像大小,在 NHWC 和 NCHW layout 之间进行转换,实现 transposed convolution,使用 IoU 和 non-max suppression 去除重复检测,以及为检测器训练分配 anchor boxes。建议从关于 convolution 和 layout conversion 的 Easy 题目开始。然后进行 pooling, im2col 和 resizing,最后完成 transposed convolution, NMS 和 anchor matching。从零售到制造业,工业界的视觉岗位仍然依赖这些基础模块,面试官经常会要求你在不使用库的情况下编写 convolution 或 NMS 代码。
简单 8
- Write a 2D convolution with stride and padding
- Track feature map sizes through a stack of dilated convolutions
- Convert an image batch from NHWC to NCHW
- Build a normalised 2D Gaussian kernel
- Compare parameters and multiply-adds of standard vs depthwise separable conv
- Compute the receptive field of a stack of conv layers
- Center-crop a U-Net skip connection and concatenate
- Horizontally flip and crop an image together with its boxes
中等 17
- Max pooling forward and backwardPro
- Detect edges with Sobel filters and a magnitude thresholdPro
- Unfold image patches with im2colPro
- Resize an image with bilinear interpolationPro
- Run a depthwise separable conv block forwardPro
- Implement average pooling forward and backward with overlapping windowsPro
- Apply a squeeze-and-excitation block to feature mapsPro
- Generate anchor boxes over a feature map gridPro
- Compute IoU and generalized IoU for box pairsPro
- Blur an image with a separable Gaussian filter and reflect paddingPro
- Trace tensor shapes and parameter counts through a LeNet-style CNNPro
- Implement pixel shuffle (depth to space) upsamplingPro
- Encode ground-truth boxes as regression deltas from anchorsPro
- Rotate a square image 90 degrees clockwise in placePro
- Mix two images with CutMix and adjust the labelsPro
- Count connected regions in a binary gridPro
- Fill a matrix along zigzag diagonalsPro
困难 10
- Remove duplicate detections with IoU and non-max suppressionPro
- Assign anchor boxes to ground-truth objects for detector trainingPro
- Implement a single-channel transposed convolutionPro
- Implement a multi-channel grouped conv2d with stride, padding and dilationPro
- Implement the backward pass of a strided multi-channel conv2dPro
- Build an Inception module: four branches concatenated on channelsPro
- Rescore overlapping detections with Gaussian soft-NMSPro
- Implement RoI max pooling for region featuresPro
- Build YOLO-style training targets on a grid with anchorsPro
- Find the largest empty square and rectangle in an occupancy gridPro