Open vignesh-irtt opened 5 years ago
neg_conf为背景像素被预测为背景的概率,为1代表确定为预测完全正确;为0代表预测错误,实际为背景像素,却被预测为了不是背景。所以这个值越低,误差越大。 所以,-neg_conf,中的top_k, 为背景像素中,预测误差最大的n_neg个。
实际上,这里可能有个缺陷, pos_pixel_weights_flatten 是gt里面box的像素点生成的,里面小box的pixel weight会大一点,边缘像素也大一点这样 selected_neg_pixel_mask:是背景里面,被预测为背景的像素里面,hardming 出来的。 可是背景里面被预测为正的像素,没有被计算误差。就是下面这句: nets\pixel_link_symbol.py pixel_cls_weights = pos_pixel_weights_flatten + \ tf.cast(selected_neg_pixel_mask, tf.float32)
Neg_conf is the probability that the background pixel is predicted as the background, and 1 means that the prediction is completely correct; 0 is the prediction error, which is actually the background pixel, but is predicted to be not the background. So the lower the value, the greater the error. Therefore, top_k in -neg_conf is the n_neg with the largest prediction error in the background pixels.
sorry i thought its as the loss Thank you
But as per the paper u haven't selected the negative pixels while calculating the link loss pixel_link_weight *= np.expand_dims(pixel_cls_weight, axis = -1) doesn't seem to contain true for negative pixels pixel_link_label[y, x, n_idx] = 0 does it makes pos cls pixels as neg in link
pixel_link_label[y, x, n_idx] = 0 这句使得,正的像素,周围有点,不是正像素,那么连接为负,
why are you making the loss negative before taking topk losses **vals, = tf.nn.top_k(-neg_conf, k=n_neg)**