adikhosla / feature-extraction Goto Github PK
View Code? Open in Web Editor NEWComputer vision feature extraction toolbox for image classification
License: Other
Computer vision feature extraction toolbox for image classification
License: Other
Hi, adikhosla
I run the feature-extraction in matlab and the version is MATALB 2014a. When I run the demo script, it throws the warnning:
Warning: matlabpool will be removed in a future release.
To query the size of an already started parallel pool, query the 'NumWorkers' property of the pool.
To check if a pool is already started use 'isempty(gcp('nocreate'))'.
The warning come from the file:
function [] = openPool(s)
%
% Copyright Aditya Khosla http://mit.edu/khosla
%
% Please cite this paper if you use this code in your publication:
% A. Khosla, J. Xiao, A. Torralba, A. Oliva
% Memorability of Image Regions
% Advances in Neural Information Processing Systems (NIPS) 2012
%
if(matlabpool('size')==0)
if(s==0)
matlabpool;
elseif(s>1)
matlabpool(s);
end
end
It seems the matlabpool
leads the warning. Though it's not a problem, but the warning makes one feel bad.
Hi
When I try to extract lbp features and ssim features with Matlab2015b, the code cannot work.
For lbp feature,the errors are listed below:
Dataset: demo
Processing filelist (train, lbp): batch 0 of 1
Processing filelist (train, lbp): batch 1 of 1
Error using getmapping (line 37)
ASSUMEDTYPE must be an integer type name.
Error in lbp_original (line 3)
mapping=getmapping(8,'u2');
Error in lbp_original_4x4 (line 3)
feature_L0(:,1) = lbp_original(I);
Error in lbp_feature (line 10)
[lbp_L0 lbp_L1 lbp_L2] = lbp_original_4x4(im);
Error in extract_lbp (line 17)
d = lbp_feature(img);
Error in extract_feature (line 15)
[feat, x, y, wid, hgt] = feval(['extract_' feature], img, c);
Error in filelist_feature (line 23)
parfor i=1:length(filelist)
Error in batch_feature (line 42)
poolfeat = filelist_feature('', filelist(this_batch), feature, c);
Error in datasets_feature (line 34)
batch_feature(train_lists{i}, 'train', feature, c);
Error in demo (line 24)
datasets_feature(datasets, train_lists, test_lists, feature, c);
For ssim featurem, the errors are listed below:
Dataset: demo
Learning dictionary for feature: ssim, size 20
Running k-means, dictionary size 20...done!
Saving dictionary: cache//demo//dictionary_ssim_20.mat
Processing filelist (train, ssim): batch 0 of 1
Processing filelist (train, ssim): batch 1 of 1
Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set 'UniformOutput' to false.
Error in max_pooling (line 36)
emptyIdx = find(cellfun(@(x) sum(x)==0, idx));
Error in filelist_feature (line 37)
poolfeat = max_pooling(llcfeat, info, c.pool_region, p.pyramid_levels);
Error in batch_feature (line 42)
poolfeat = filelist_feature('', filelist(this_batch), feature, c);
Error in datasets_feature (line 34)
batch_feature(train_lists{i}, 'train', feature, c);
Error in demo (line 24)
datasets_feature(datasets, train_lists, test_lists, feature, c);
Hi, I am trying to run your code in Matlab R2011a and having quite a bit of difficulty. Compile.m gives me several error messages such as "features/ssim/vggSsim/MEXfindnearestl2.cpp: In function 'void mexFunction(int, mxArray**, int, const mxArray**)':
features/ssim/vggSsim/MEXfindnearestl2.cpp:62: warning: deprecated conversion from string constant to 'char*'"
Then when I try demo.m, I get this type of error:
??? Undefined function or method 'matlabpool' for input arguments of type 'char'.
Error in ==> openPool at 20
if(matlabpool('size')==0)
Error in ==> datasets_feature at 16
openPool(c.cores);
Error in ==> demo at 24
datasets_feature(datasets, train_lists, test_lists, feature, c);
Could you please help?
Thanks,
Hi,
I have seen that in the demo.m file there is a part about the svm if i uncomment it doesn't work, giving me :Length of label vector does not match # of instances.
I am interested to do some personal work in Image processing and for this I need Image feature extraction. So this project interests me as a starting point. I am new to Octave, but I have used MatLab in past. I am trying to get the demo to work, for this I did the following (version details are also provided):
$ git clone [email protected]:adikhosla/feature-extraction.git
$ cd feature-extraction/
$ octave
octave:1> demo
warning: load: file found in load path
warning: function name 'config_hog3x3' does not agree with function file name '/home/imyousuf/projects/feature-extraction/features/ssim/config_ssim.m'
Dataset: demo
Learning dictionary for feature: color, size 20
error: default_formats: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error: /usr/share/octave/3.8.2/m/image/imformats.m at line 255, column 11
error: /usr/share/octave/3.8.2/m/image/imformats.m at line 78, column 3
error: /usr/share/octave/3.8.2/m/image/private/imageIO.m at line 60, column 7
error: /usr/share/octave/3.8.2/m/image/imread.m at line 107, column 30
error: /home/imyousuf/projects/feature-extraction/util/imgread.m at line 12, column 7
error: /home/imyousuf/projects/feature-extraction/util/build_dictionary.m at line 49, column 11
error: /home/imyousuf/projects/feature-extraction/util/datasets_feature.m at line 31, column 45
error: /home/imyousuf/projects/feature-extraction/demo.m at line 24, column 1
octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.2
GNU Octave License: GNU General Public License
Operating System: Linux 3.19.0-30-generic #33-Ubuntu SMP Mon Sep 21 20:58:04 UTC 2015 x86_64
----------------------------------------------------------------------
Package Name | Version | Installation directory
--------------+---------+-----------------------
control *| 2.6.6 | /usr/share/octave/packages/control-2.6.6
general *| 1.3.4 | /usr/share/octave/packages/general-1.3.4
image *| 2.2.2 | /usr/share/octave/packages/image-2.2.2
io *| 2.2.4 | /usr/share/octave/packages/io-2.2.4
signal *| 1.3.0 | /usr/share/octave/packages/signal-1.3.0
statistics *| 1.2.3 | /usr/share/octave/packages/statistics-1.2.3
Please help me to get it to work in Octave. Thank you.
Histogram refinement results in https://github.com/Ashwani21/Local-texture-descriptors are very promising.
Respected Sir,
When I run following command
datasets_feature(datasets, train_lists, test_lists, feature, c);
I got error:
Error using imread (line 349)
File "sun2.jpg" does not exist.
Error in imgread (line 12)
I = imread(img);
Error in build_dictionary>(parfor body)
(line 49)
img = imgread(filelist{perm(i)},
p);
Error in build_dictionary (line 47)
parfor i=1:num_images
Error in datasets_feature (line 31)
c.feature_config.(feature).dictionary
= build_dictionary(train_lists{i},
feature, c);
how to remeove this error.
Thanks
Could anyone please explain the meaning of 'dictionary_size' and how it affects the speed? Thank you.
Good day!
When starts compile.m , I have compile error:
>> compile
Building with 'MinGW64 Compiler (C++)'.
Error using mex
D:\antispoofing\Matlab_spoofdet_hog_lbp_Gab__svm\feature-extraction-master\util\pixelwise_hog31.cc: In function 'mxArray* process(const mxArray*, const mxArray*)':
D:\antispoofing\Matlab_spoofdet_hog_lbp_Gab__svm\feature-extraction-master\util\pixelwise_hog31.cc:48:44: error: cannot convert 'const size_t* {aka const long long unsigned int*}' to 'const int*' in initialization
const int dims = mxGetDimensions(mximage);
^
D:\antispoofing\Matlab_spoofdet_hog_lbp_Gab__svm\feature-extraction-master\util\pixelwise_hog31.cc:81:72: error: cannot convert 'int' to 'const size_t* {aka const long long unsigned int*}' for argument '2' to 'mxArray*
mxCreateNumericArray_730(size_t, const size_t*, mxClassID, mxComplexity)'
mxArray *mxfeat = mxCreateNumericArray(3, out, mxDOUBLE_CLASS, mxREAL);
The getmapping.m function needed for LBP extraction has been updated to version 0.2 with fixes to work in Matlab 2012 or newer
I tried to run it on octave without much success yet.
The following issues I noticed, most of them I already fixed while keeping the Matlab function as before. Pull request will be made soon as soon as I get demo.m working
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.