{"id":13703417,"url":"https://github.com/donnyyou/cv-interview","last_synced_at":"2025-04-07T17:09:27.995Z","repository":{"id":38484385,"uuid":"203779312","full_name":"donnyyou/cv-interview","owner":"donnyyou","description":"CV岗常见面试题(欢迎大家补充！！！)","archived":false,"fork":false,"pushed_at":"2021-01-05T09:21:35.000Z","size":358,"stargazers_count":365,"open_issues_count":0,"forks_count":53,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-31T14:14:23.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donnyyou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-22T11:16:18.000Z","updated_at":"2024-11-29T11:29:11.000Z","dependencies_parsed_at":"2022-08-18T17:22:38.824Z","dependency_job_id":null,"html_url":"https://github.com/donnyyou/cv-interview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnyyou%2Fcv-interview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnyyou%2Fcv-interview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnyyou%2Fcv-interview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnyyou%2Fcv-interview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donnyyou","download_url":"https://codeload.github.com/donnyyou/cv-interview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694876,"owners_count":20980733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T21:00:54.537Z","updated_at":"2025-04-07T17:09:27.972Z","avatar_url":"https://github.com/donnyyou.png","language":null,"readme":"### 计算机视觉岗常见面试题\n\n#### 问题1：Softmax+Cross Entropy反向求导\n![CE](./img/ce.png)\n\n#### 问题2：BatchNorm层的详细解读(具体可以参考之后出版的百面深度学习2333)\n  + ![BatchNorm](./img/151566545899_.pic.jpg)\n  + 作用：\n    - 使得每层的输入/输出分布更加稳定，避免参数更新和网络层次变深大幅度影响数据分布。从而使模型训练更稳定。\n  + 参数 β 和 γ的作用\n    + 保留网络各层在训练过程中的学习成果\n    + 保证激活单元的非线性表达能力 \n    + 使批归一化模块具有复原初始输出分布能力。\n\n  + BN放在激活层之前还是之后 \n  + 各种不同的Norm![各种不同的Norm](./img/171566546190_.pic_hd.jpg)\n  + [阅读材料](https://zhuanlan.zhihu.com/p/33173246)\n\n\n#### 问题3：Conv+BN加速策略\n在inference阶段，可以将BN层的参数合并在之前的Linear或Conv层中，加速推断时间（因为二者都是线性变换）。\n```python\nw = module.weight.data\nb = module.bias.data      # conv的bias可以用全0代替\nws = [1] * len(w.size())\nws[0] = w.size()[0]\n\ninvstd = bn_module.running_var.clone().add_(bn_module.eps).pow_(-0.5)\nw.mul_(invstd.view(*ws).expand_as(w))\nb.add_(-bn_module.running_mean).mul_(invstd)\n\nif bn_module.affine:\n    w.mul_(bn_module.weight.data.view(*ws).expand_as(w))\n    b.mul_(bn_module.weight.data).add_(bn_module.bias.data)\n\n```\n\n#### 问题4：常见的模型加速方法\n\n#### 问题5：目标检测里如何有效解决常见的前景少背景多的问题\n  - 采用Focal Loss或OHEM进行负样本挖掘，加大Hard Example损失权重\n  - 训练时只利用Ground Truth周边的Prior Boxes进行训练，忽略其他背景区域，只考虑困难背景区域\n\n#### 问题6：目标检测里有什么情况是SSD、YOLOv3、Faster R-CNN等所不能解决的，假设网络拟合能力无限强\n\n#### 问题7：分类和检索两个问题可以怎么理解\n\n#### 问题8：ROIPool和ROIAlign的区别，以及ROIAlign的简单实现（不考虑并行，cpu串行即可）\n+ ROIPool存在两次量化误差，首先是将候选框边界量化为整数点坐标值，其次是将量化后的边界区域平均分割成 k x k 个单元，对每一个单元的边界进行量化。ROIAlign通过双线性插值避免了量化操作，保存了原始ROI的空间分布，有效避免了误差的产生；对于检测图片中大目标物体时，两种方案的差别不大，而如果是图片中有较多小目标物体需要检测，则优先选择ROIAlign，更精准一些\n\n#### 问题9：深度神经网络常见的参数初始化方式，如果全部初始化为0，会出现什么情况\n\n#### 问题10：多卡并行的时候怎么实现参数共享，通信梯度是指平均梯度，还是最大梯度，还是梯度总和\n\n#### 问题11：介绍常见的梯度下降优化方法\n\n#### 问题12: 神经网络（卷积/全连接）反向传播公式推导\n\n#### 问题13: Focal Loss解决了什么问题，如何解决的，与OHEM有什么不同\n\n#### 问题14: 斜着的矩形框如何求iou, 两个多边形的框如何求iou\n首先要求解两个多边形的面积，方法见该[链接](https://www.shuxuele.com/geometry/area-irregular-polygons.html)\n\n关键在于如何求出交集的面积\n\n**思路一**\n\n蒙特卡洛 + 采样，近似求解交集的面积，但是中间涉及判断点在不在多边形内，[判断点是否在多边形内](https://www.jianshu.com/p/ba03c600a557)\n\n**思路二**\n\n适合于两个凸多边形（非凸没想到好的思路），凸多边形可以看做是半平面的交集，因此两个凸多边形的交集，可以看作是（m+n）个半平面的交集（假设两个凸多边形分别有m个顶点和n个顶点），求出来半平面的交集（仍旧是一个凸多边形）之后，求解该多边形的面积即可。[求解半平面交集](https://www.cnblogs.com/Harry-bh/p/9998850.html)\n\n#### 问题15: Detection你觉的还有哪些可做的点\n\n#### 问题16: 卷积底层如何实现的\n\n#### 问题17: mini-Batch SGD相对于GD有什么优点\n\n#### 问题18: DCN比普通卷积多了多少计算量\n\n#### 问题19: SyncBN如何实现的\n\n#### 问题20：当需要添加背景类时，怎样处理比较合理\n\n#### 问题21：给出语义分割评估指标mIOU的计算公式和实现\n\n#### 问题22：人体姿态估计主流的两个做法是啥？简单介绍下\n\n#### 问题23：介绍带孔卷积以及其优势与劣势\n\n#### 问题24：Non-local模块与Self-attention的之间的关系与区别\n\n#### 问题25：PyTorch和TensorFlow的运行原理\n\n#### 问题26：卷积的实现原理以及如何快速高效实现局部weight sharing的卷积操作方式\n\n#### 问题27：详解几种优化算法\n\n#### 问题28：BN在training和inference的时候有什么区别\n+ 在训练时，我们可以计算出batch的均值和方差，迭代训练过程中，均值和方差一直在发生变化。但是在推理时，均值和方差是固定的，对于均值来说直接计算所有batch u值的平均值，对于标准偏差采用每个batch σB的无偏估计。\n\n#### 问题29：基于anchor匹配的目标检测和基于RNN集合匹配的目标检测有何区别，基于RNN集合匹配的损失定义有何缺陷\n\n#### 问题30：CycleGAN的生成效果为啥一般都是位置不变纹理变化，为啥不能产生不同位置的生成效果\n\n#### 问题31：L2 regularization和Weight decay\n\n#### 问题32：深度学习中的batch的大小对学习效果有何影响？\n\n","funding_links":[],"categories":["Algorithm Interview"],"sub_categories":["1. Github"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonnyyou%2Fcv-interview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonnyyou%2Fcv-interview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonnyyou%2Fcv-interview/lists"}