Comments (3)
Our network first learns deep pixel features which are then used for computing distance between pixels and superpixels. We do iterative clustering using deep features. After each iteration of differentiable SLIC, we obtain superpixel centroid features. You can use the following function to convert deep pixel features into superpixel features:
spixel_feat = L.SpixelFeature2(pixel_features,
pixel_assoc,
spixel_init,
spixel_feature2_param =\
dict(num_spixels_h = num_spixels_h, num_spixels_w = num_spixels_w))
Does this answer your question?
from ssn_superpixels.
Hi @varunjampani ,
Thank you for your answer. Yes this is what l need. Can l also get the coordinates of each superpixel (gravity center) and the coordinates (index(x,y)) of each pixel ?
Thank you
from ssn_superpixels.
You can compute 'XYRGB' pixel features using the following layer:
pixel_features = L.PixelFeature(img,
pixel_feature_param = dict(type = P.PixelFeature.POSITION_AND_RGB,
pos_scale = float(pos_scale),
color_scale = float(color_scale)))
And, then pass these pixels features onto 'SpixelFeature2' layer to compute XYRGB gravity center for superpixels:
spixel_feat = L.SpixelFeature2(pixel_features,
pixel_assoc,
spixel_init,
spixel_feature2_param =\
dict(num_spixels_h = num_spixels_h, num_spixels_w = num_spixels_w))
And, you can convert pixel-superpixel associations into 'superpixel index' using the following function in 'create_net.py':
def compute_final_spixel_labels(pixel_spixel_assoc,
spixel_init,
num_spixels_h, num_spixels_w):
# Compute new spixel indices
rel_label = L.ArgMax(pixel_spixel_assoc, argmax_param = dict(axis = 1),
propagate_down = False)
new_spix_indices = L.RelToAbsIndex(rel_label, spixel_init,
rel_to_abs_index_param = dict(num_spixels_h = int(num_spixels_h),
num_spixels_w = int(num_spixels_w)),
propagate_down = [False, False])
return new_spix_indices
from ssn_superpixels.
Related Issues (20)
- Aboutn
- some question of paper about training HOT 4
- where to install Caffe inside "ssn_superpixels" HOT 2
- About some custom caffe layer ? HOT 3
- input image size different for training and testing on the BSDS500 dataset?? HOT 1
- Some question about initialization of group conv layer 'concat_spixel_feat_50' HOT 3
- about Evaluation HOT 1
- Some questions on source code HOT 7
- what does the training loss curve look like HOT 5
- The implementation of pytorch version HOT 6
- I cannot understand “n*9” mentioned in the paper HOT 1
- F0630 15:37:53.939426 12256 math_functions.cu:79] Check failed: error == cudaSuccess (74 vs. 0) misaligned address *** Check failure stack trace: ***
- Why is random cropping / patching and random scaling applied continuously throughout training? HOT 1
- how to run the code??? HOT 1
- Question of the function of spix_init HOT 2
- about the label and loss HOT 2
- Superpixel border issue on BSDS500 dataset HOT 5
- Pytorch Implementation License
- custom training HOT 1
- extract the features of the superpixel area
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssn_superpixels.