GithubHelp home page GithubHelp logo

nian-liu / picanet Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 14.0 23.08 MB

Makefile 0.27% CMake 1.16% Shell 0.29% C++ 34.78% MATLAB 0.46% Dockerfile 0.03% HTML 0.08% CSS 0.10% Jupyter Notebook 55.84% Python 3.54% Cuda 3.46%
caffe saliency-map detection

picanet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

picanet's Issues

The result of F-measure was different

Hello, thank you for your code!

I used the model you provided to test on DUT-O dataset. But the value of F-β is 0.69, lower than your 0.79,The other two values are all right. I guess there is something wrong with my evaluation code. Could you provide the code of F-β code?

thanks a lot!

need help for computing the number of parameters in each layer

Hi,

Thanks for your great work!

I got problems when compiling the provided caffe on my computer, as follows:

.build_release/lib/libcaffe.so: undefined reference to `cblas_sgemv'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dgemm'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dgemv'
.build_release/lib/libcaffe.so: undefined reference to `cblas_saxpy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_ddot'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dasum'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sgemm'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dscal'
.build_release/lib/libcaffe.so: undefined reference to `cblas_scopy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sasum'
.build_release/lib/libcaffe.so: undefined reference to `cblas_daxpy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dcopy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sdot'
collect2: error: ld returned 1 exit status
Makefile:616: recipe for target '.build_release/tools/convert_imageset.bin' failed
make: *** [.build_release/tools/convert_imageset.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_release/lib/libcaffe.so: undefined reference to `cblas_sgemv'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dgemm'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dgemv'
.build_release/lib/libcaffe.so: undefined reference to `cblas_saxpy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_ddot'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dasum'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sgemm'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dscal'
.build_release/lib/libcaffe.so: undefined reference to `cblas_scopy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sasum'
.build_release/lib/libcaffe.so: undefined reference to `cblas_daxpy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_dcopy'
.build_release/lib/libcaffe.so: undefined reference to `cblas_sdot'
collect2: error: ld returned 1 exit status
Makefile:616: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1

After searching the solutions, I am still trapped with this error.

I want to compute the number of parameters in your model using the following codes:

matlab

clc;clear;
close all;

%% init
% Add caffe/matlab to my Matlab search PATH to use matcaffe
if exist('../+caffe','dir')
    addpath('..');
else
    error('Please run this from caffe/matlab/demo');
end

% Set caffe mode
use_gpu     = true;
if exist('use_gpu', 'var') && use_gpu
    caffe.set_mode_gpu();
    gpu_id = 0;
    caffe.set_device(gpu_id);
else
    caffe.set_mode_cpu();
end

net_model       = '/path/to/deploy.prototxt';
phase           = 'test';

% Initialize a network
net         = caffe.Net(net_model, phase);
fprintf('Init Done!');

num_layers = length(net.layer_names);
num_params = 0;
count = 0;
count_layers = [];
for iter_layer = 1 : num_layers
    fprintf('processing/total %d/%d\n', iter_layer, num_layers);
    layer_name = net.layer_names(iter_layer);
    layer_name = layer_name{1,1};
    layer_type = net.layers(layer_name).type;
    c = 1;
    while 1
        try
            count = count + prod(size(net.params(layer_name,c).get_data()));
            count_layers = [count_layers; prod(size(net.params(layer_name,c).get_data()))];
            c = c + 1;
        catch
            break;
        end
    end
end
caffe.reset_all()
fprintf('Total number of parameters: %d\n', count);

python

import caffe
caffe.set_mode_cpu()
import numpy as np
from numpy import prod, sum
from pprint import pprint

def print_net_parameters (deploy_file):
    print "Net: " + deploy_file
    net = caffe.Net(deploy_file, caffe.TEST)
    print "Layer-wise parameters: "
    pprint([(k, v[0].data.shape) for k, v in net.params.items()])
    print "Total number of parameters: " + str(sum([prod(v[0].data.shape) for k, v in net.params.items()]))
    
deploy_file = "/path/to/deploy.prototxt"
print_net_parameters(deploy_file)

since I could not compile the caffe on my computer, would you mind computing the number of parameters for me?

Thanks a lot!!

About Attention maps on paper

Hi, I think that PiCANet mechanism is really great, but I am not sure how to recognize those attention map visuals.
In your paper, you uploaded attention map examples and descriptions like below images.
image

  • Can I get more attention map examples(which is not included in paper)?
  • And does most of attention maps are showing some attention difference between inside and outside of salient object?
  • Which one is the significant characteristic of "learned" attention map against "not-learned" one?
    1. attend point is delocalized
      or
    2. attention gap between inside and outside of object
    3. neither.

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.