Code Monkey home page Code Monkey logo

Comments (4)

SeokjuLee avatar SeokjuLee commented on August 25, 2024 2

@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"
}

from vpgnet.

Frandre avatar Frandre commented on August 25, 2024

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

from vpgnet.

SeokjuLee avatar SeokjuLee commented on August 25, 2024

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

from vpgnet.

AromaticJ avatar AromaticJ commented on August 25, 2024

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

from vpgnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.