上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页
摘要: 我已经根据resize_image()函数的解析对原图像与resize图像进行了解析, 若有读者想对原图像与目标图像不同尺寸验证,可根据以下代码,调整函数参数, 其细节如下: import cv2 as cvimport numpy as npimg=cv.imread('D:\\MASKRCNN\ 阅读全文
posted @ 2019-12-15 18:19 tangjunjun 阅读(2258) 评论(0) 推荐(0) 编辑
摘要: 我以为只有box能计算iou值,但我看了maskrcnn后,发现该模型对mask进行了iou的计算,该方法巧妙之处在于 mask1与mask2必须有相同的height and width,而后在同一个位置的值累加,即交叉面积,而后将mask1与mask2 所有值累加为并集,而后计算类似于box的io 阅读全文
posted @ 2019-12-15 12:47 tangjunjun 阅读(5013) 评论(1) 推荐(0) 编辑
摘要: 我简单看了distutils库,但发现目前还用不到,感觉有些复杂。因此我简单复制了别人的介绍,如下: Distutils可以用来在Python环境中构建和安装额外的模块。新的模块可以是纯Python的,也可以是用C/C++写的扩展模块, 或者可以是Python包,包中包含了由C和Python编写的模 阅读全文
posted @ 2019-12-15 12:29 tangjunjun 阅读(2643) 评论(0) 推荐(0) 编辑
摘要: tf.where()的使用,该函数会返回满足条件的索引。经验证,发现返回均是二维矩阵,可以说明该函数用二维矩阵给出满足条件的位置索引。(若有错误,欢迎指正。)代码如下:import tensorflow as tfsess=tf.Session()import numpy as npprint('验 阅读全文
posted @ 2019-12-10 22:13 tangjunjun 阅读(3523) 评论(0) 推荐(1) 编辑
摘要: tf.argmax(input,axis)根据axis取值的不同返回每行或者每列最大值的索引。代码如下: import tensorflow as tfimport numpy as npsess=tf.Session()a = np.array([[1, 2, 3], [2, 3, 4], [5, 阅读全文
posted @ 2019-12-09 23:30 tangjunjun 阅读(484) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tfimport numpy as npsess=tf.Session()a=np.ones((5,6))c=tf.cast(tf.reduce_sum(a, axis=1),tf.bool) # tf.reduce_sum 表示按照axis方向求和c=se 阅读全文
posted @ 2019-12-02 00:28 tangjunjun 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 此处模拟 rpn_feature_maps数据的处理,最终得到rpn_class_logits, rpn_class, rpn_bbox。 代码如下: import numpy as np'''层与层之间主要是中间变量H与W不一致,则此处模拟2层,分别改为8与4'''# 模拟某层,如p3a1=np. 阅读全文
posted @ 2019-12-01 17:46 tangjunjun 阅读(678) 评论(0) 推荐(0) 编辑
摘要: 我已用随机生产函数取模拟5张图片各有8个box的坐标值,而后验证batch_slice()函数的意义。由于inputs_slice = [x[i] for x in inputs] output_slice = graph_fn(*inputs_slice)代码一时蒙蔽,故而对其深入理解,如下:代码 阅读全文
posted @ 2019-12-01 01:23 tangjunjun 阅读(1193) 评论(1) 推荐(0) 编辑
摘要: 此函数是利用deltas对box修正,我并没有详细说明,若有问题,欢迎留言交流: def clip_boxes_graph(boxes, window): """ boxes: [N, (y1, x1, y2, x2)] window: [4] in the form y1, x1, y2, x2 阅读全文
posted @ 2019-11-30 17:59 tangjunjun 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 此部分为mask-rcnn中clip_boxes_graph()函数的使用。首先利用代码解决基本函数的使用,然后运行代码,其细节如下:代码如下: import tensorflow as tfimport numpy as npimport randomsess=tf.Session()window 阅读全文
posted @ 2019-11-30 17:40 tangjunjun 阅读(749) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页
https://rpc.cnblogs.com/metaweblog/tangjunjun