VPGNet icon indicating copy to clipboard operation
VPGNet copied to clipboard

the VP part problem

Open cuicuizhang1989 opened this issue 6 years ago • 4 comments

as the paper said. can the first task VPP be provide?

cuicuizhang1989 avatar Jun 12 '18 08:06 cuicuizhang1989

I am also interested in the VP part. However, I did not find it predicted in deploy.prototxt. I wish I was wrong here.

Frandre avatar Jul 26 '18 02:07 Frandre

@cuicuizhang1989 @Frandre You can simply add the VP branch to deploy.prototxt as follows.

layer {
  name: "vp-conv"
  type: "Convolution"
  bottom: "L6d"
  top: "vp-conv"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 128
    kernel_size: 1
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0.0
    }
  }
}

layer {
  name: "vp-tile"
  type: "Tiling"
  bottom: "vp-conv"
  top: "vp-conv-tiled"
  tiling_param {
    tile_dim: 8
  }
}

# Pixel level softmax prediction.
layer {
  name: "vp-prob"
  type: "Softmax"
  bottom: "vp-conv-tiled"
  top: "vp-prob"
}

SeokjuLee avatar Jul 26 '18 09:07 SeokjuLee

@cuicuizhang1989 @Frandre FYI, the python code to localize the VP is as below.

vp_prob = net.blobs['vp-prob'].data[0]
[vp_y, vp_x] = vp_quadrant(vp_prob)

def vp_quadrant(prob):
	prob[0,:,:] = scipy.ndimage.filters.gaussian_filter(prob[0,:,:], 5)
	prob[1,:,:] = scipy.ndimage.filters.gaussian_filter(prob[1,:,:], 5)
	prob[2,:,:] = scipy.ndimage.filters.gaussian_filter(prob[2,:,:], 5)
	prob[3,:,:] = scipy.ndimage.filters.gaussian_filter(prob[3,:,:], 5)
	prob[4,:,:] = scipy.ndimage.filters.gaussian_filter(prob[4,:,:], 5)

	P_avg = (1 - np.mean(prob[0,:,:])) / 4
	avg_map = np.ones(prob[0,:,:].shape) * P_avg
	loc_map = np.power((avg_map-prob[1,:,:]), 2) + np.power((avg_map-prob[2,:,:]), 2) + np.power((avg_map-prob[3,:,:]), 2) + np.power((avg_map-prob[4,:,:]), 2)

	[y, x] = np.unravel_index(loc_map.argmin(), loc_map.shape)
	return [y, x]

SeokjuLee avatar Jul 26 '18 09:07 SeokjuLee

@SeokjuLee Hi, as you have provided the VP branch deploy.prototxt, can you also provide VP branch train.prototxt ? And also, I didn't find label data for VP branch in dataset. How can I label VP information in my own dataset?

AromaticJ avatar Sep 26 '18 01:09 AromaticJ