Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the VP part problem #24

Open
cuicuizhang1989 opened this issue Jun 12, 2018 · 4 comments
Open

the VP part problem #24

cuicuizhang1989 opened this issue Jun 12, 2018 · 4 comments

Comments

@cuicuizhang1989
Copy link

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

@Frandre
Copy link

Frandre commented Jul 26, 2018

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

@SeokjuLee
Copy link
Owner

SeokjuLee commented Jul 26, 2018

@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
Copy link
Owner

SeokjuLee commented Jul 26, 2018

@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]

@AromaticJ
Copy link

AromaticJ commented Sep 26, 2018

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants