1. 对proposal层NMS的解释,很清晰

注意第18~20行是拿一个数(x1)和array(x1[ [0,2,3] ])去比:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUUAAAAqCAIAAACrw94xAAAAA3NCSVQICAjb4U/gAAAQI0lEQVR4Xu1deVxN6Rs/597ubV+0TBTFhKGoaWTLMpFksm8tMlF2bRoNpn5cDVKUwszEqGksoQURodKglKKaisRFlqiUVpXqLr9zt9x7z3IXN9Ny7sc/93ne9/s87/c9z3ve99zTF/it0lAA/+AM4Az0CgYIvWIU+CBwBnAGWAzg9YxfBzgDvYcBvJ67y1wSVEc5x8RS5ungU4I9Jb2OKKLOtLljB8ghjRrDhdQcvz8jswKAalYBl+qLz+wwkUdpIVszqGy88mKs7/SW569bZYvcy9BQiJIfufd2QTOV8y8nbopydxu2yuQDNdz0CpozNpsrfEpQ3mhB0IE/c39bPIzPyHFjuFAGiN8MEIkhKBoM1ycpGBrrkBH9sjWCahaBRz3NH4bbbDxV8IHBBSfrL/AJybyTw7pMS9KyDrlN1ezrs4VMFG8yyk+sM7a0MbK0W3O3RWCCQIXhi4Ko1PQ/xiiKNXFE9bFO/smptxoh5kv/uRexfoYOUayOnEag0mi3o1XUgiIvo867QXMOhZ3b7Lkx74Sg2p5EzVkdW2f9vyv+llqCM4zhQsmnr18hKLTQq2LWLJy6cPGqW00oLWRoJo9c6bdaK3/LTzEPWpmfcOl0OeWG1N+3L3L1cj2QJT/T89xeKy1QhnF7HBQKUbxx0JrrKqtrKqvfN3R00iinbTpn97ELBcG2eoC43JEN5u/3sahPDnd281yxP5NkvS4+9Ac9cSua/M3y0Ou+3wiRy+xoesfKraamhQ7jnVF9K3Qh5Z6WYwBlrIpglhguGAzLwK5nkr61p+NEIyWE4pbOhRiKYyRoTQo+Hv84j33boWYW//3TAn3uPRBy7YtJfFHM3jU9SrtzcNV0HcRTBT+8vKn7kZJCqEvO47OBR/669I6a9/r81jlfcegnDLALKsy/z46VQ43fucZEmT1I4sD54RXUf6Jtt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1KCQuY6HzAElZU+ovSTyFJ8ZCu/e0xn4z/5esvtrUGBMrXSiFhiAkEti5QpsONzbJxn40noGPUWDAuNikEaeAgNOOuUKDEDc1YcZ+NL13GM0KDCuCSnkKbDQpFKuwADEXX2YgS+934b+Xzg0ts2Vh6G5cDvOAM6AOAx0u7/HECdpvA3OAM4AIgN4PSPSghtxBnokA3g998hpw5PGGUBkAK9nRFpwI85Aj2QAr+ceOW140jgDiAz8H1o1tNpHJjSKAAAAAElFTkSuQmCC" alt="" />

2. box_inside_weights和box-outside_weights:

在smoothl1losslayer.cu里:

计算loss时乘的系数

3. tools/train_net.py:

对于git上默认的配置,这段代码实现:

roidb = get_roidb( voc_2007_trainval )
imdb = get_imdb( voc_2007_trainval )

rpn-data是AnchorTargetLayer

generate_anchors.py:

训练时修改anchors尺度的方法

注意原始py-faster-rcnn会设置batch_inds为0

proposal_layer.py:

bottom[0].shape=(1,18,7,7),最后得到all_scores.shpae=(1,9,7,7),根据注释,前面9层是背景,后面的9层才是前景,这里取bottom[0]里后面的9层。

proposal_target_layer.py:

bbox_overlaps函数在utils/bbox.pyx里,参考

偶见train.py:所以prototxt里不能随意改最后输出层的名字

涉及知识点:

lambda表达式

eval()函数

from IPython import embed;embed() #程序运行到这里会转成ipython环境

py-faster-rcnn代码的更多相关文章

  1. py faster rcnn+ 1080Ti+cudnn5.0

    看了py-faster-rcnn上的issue,原来大家都遇到各种问题. 我要好好琢磨一下,看看到底怎么样才能更好地把GPU卡发挥出来.最近真是和GPU卡较上劲了. 上午解决了g++的问题不是. 然后 ...

  2. Faster RCNN代码理解(Python)

    转自http://www.infocool.net/kb/Python/201611/209696.html#原文地址 第一步,准备 从train_faster_rcnn_alt_opt.py入: 初 ...

  3. Faster rcnn代码理解(1)

    这段时间看了不少论文,回头看看,感觉还是有必要将Faster rcnn的源码理解一下,毕竟后来很多方法都和它有相近之处,同时理解该框架也有助于以后自己修改和编写自己的框架.好的开始吧- 这里我们跟着F ...

  4. Faster R-CNN代码例子

    主要参考文章:1,从编程实现角度学习Faster R-CNN(附极简实现) 经常是做到一半发现收敛情况不理想,然后又回去看看这篇文章的细节. 另外两篇: 2,Faster R-CNN学习总结      ...

  5. Faster rcnn代码理解(4)

    上一篇我们说完了AnchorTargetLayer层,然后我将Faster rcnn中的其他层看了,这里把ROIPoolingLayer层说一下: 我先说一下它的实现原理:RPN生成的roi区域大小是 ...

  6. Faster rcnn代码理解(2)

    接着上篇的博客,咱们继续看一下Faster RCNN的代码- 上次大致讲完了Faster rcnn在训练时是如何获取imdb和roidb文件的,主要都在train_rpn()的get_roidb()函 ...

  7. Faster rcnn代码理解(3)

    紧接着之前的博客,我们继续来看faster rcnn中的AnchorTargetLayer层: 该层定义在lib>rpn>中,见该层定义: 首先说一下这一层的目的是输出在特征图上所有点的a ...

  8. tensorflow faster rcnn 代码分析一 demo.py

    os.environ["CUDA_VISIBLE_DEVICES"]=2 # 设置使用的GPU tfconfig=tf.ConfigProto(allow_soft_placeme ...

  9. Faster RCNN代码解析

    1.faster_rcnn_end2end训练 1.1训练入口及配置 def train(): cfg.GPU_ID = 0 cfg_file = "../experiments/cfgs/ ...

  10. py faster rcnn的lib编译出错问题

    真是好事多磨啊,计算机系统依然是14.04,而cuda依然是8.0,唯一不同的是时间不一样,下载的各种库版本有差别,GPU的driver不一样. 但是这样就出问题了,py-faster rcnn的li ...

随机推荐

  1. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project demo: Fatal error com piling: 无效的标记: -parameters

    背景:本项目使用JDK1.8 编译maven工程的时候出现如下错误: Failed to execute goal org.apache.maven.plugins:maven-compiler-pl ...

  2. Transaction rolled back because it has been marked as rollback-only分析解决方法

    1. Transaction rolled back because it has been marked as rollback-only事务已回滚,因为它被标记成了只回滚<prop key= ...

  3. windows 驱动开发 MDL 内核层 用户层共享内存

    参考资料 https://blog.csdn.net/wdykanq/article/details/7752909 http://blog.51cto.com/laokaddk/404584 内核层 ...

  4. centos7上修改lv逻辑卷的大小

    author:headsen  chen date: 2019-03-18 15:24:22 1,查看 [root@localhost mnt]# df -h Filesystem Size Used ...

  5. Serv-u 备份处理

    需求分析 从删库到跑路,大家听过很多,但如果没删备份的话,那只能说玩的不够彻底,不专业.系统管理员一个非常重要的职责就是定期备份,以便在系统出现故障的时候能够及时恢复.我们来看下如何备份Serv-u系 ...

  6. Gym 100712

    我的作用:增加罚时. noip380分大佬全程带飞出了10T,可惜被我搞的罚时太高了... 那啥,你会发现java代码有两种风格,嗯两个人,c++自然就是自招大佬了... A:大水题略 B:(不是我写 ...

  7. mysql存储emoji问题

    前一段时间,项目中需要在数据库中存储emoji,由于编码格式不对,直接导致数据库报错,后来修改mysql的编码,就解决了 emoji符号实际上是文本,并不是图片,它们仅仅显示为图片 在mysql5.5 ...

  8. 9、socket.io,websocket 前后端实时通信,(聊天室的实现)

    websocket 一种通信协议 ajax/jsonp 单工通信 websocket 全双工通信 性能高 速度快 2种方式: 1.前端的websocket 2.后端的 socket.io 一.后端so ...

  9. js jq 手机号实现(344) 附带删除功能 jq 实现银行卡没四个数加一个空格 附带删除功能

    js 手机号实现(344)  下面有将正则验证去掉“-” 或“空格”  下一篇博客有单独的删除功能方法 <!DOCTYPE html> <head> <meta char ...

  10. juqery 回车事件 回车操作 回车搜索

    html <form class="search_wrap" method="post" action=""> <div ...