Thursday, January 8, 2015

Soft Max

H(p/q) = H(p) + d_KL(p//q)

Cok sinifli tek etiketli siniflandirmada p etiket vektoru, q da skor vektoru olsun. H(p)=0 oldugu icin "cross entropy" H(p/q)'yi minimize etmek, skor vektoru ile etiket vektoru arasindaki KL mesafesini minimize etmeye denk gelir. Soft-max'in yaptigi da budur.

Wednesday, December 17, 2014

Asagidaki hatanin sebebi buyuk ihtimalle ya resimde "keypoint" bulunamamasi ya da "Visual Vocabulary"nin yuklenememesi.

OpenCV Error: Assertion failed (queryDescriptors.type() == trainDescCollection[0].type()) in knnMatchImpl, file /tmp/opencv-Ca0QEw/opencv-2.4.9/modules/features2d/src/matchers.cpp, line 351
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv-Ca0QEw/opencv-2.4.9/modules/features2d/src/matchers.cpp:351: error: (-215) queryDescriptors.type() == trainDescCollection[0].type() in function knnMatchImpl



Monday, November 4, 2013

imagenet sift download

wget http://www.image-net.org/downloads/features/sbow/n02119789.sbow.mat


cat wid.txt |
while read CMD; do
str1='http://www.image-net.org/downloads/features/sbow/'
str2='.sbow.mat'
echo "$CMD"
str3="$str1$CMD$str2"
echo "$str3"
wget "$str3"
done 
            

non-differentiability of the square-root terms

non-differentiability of the square-root terms (and l1 norms) (see Xu et al., ICML 2013)

Given any g(x) > 0, the following holds:

\sqrt(g(x)) = \min_{z>0} \frac{1}{2}[\frac{g(x)}{z}+z].

Then add this auxiliary variable to your cost.

Sunday, June 16, 2013

VOC-MAP code for MATLAB

ap=0;
for t=0:0.1:1
     p=max(pr(rc>=t));
     if isempty(p)
          p=0;
     end
     ap=ap+p/11;
end
map(i)=ap;

Tuesday, June 11, 2013

skull-preprocess

1. Download the folder with pdf files
2. Install "FlashFlippingBook PDF To JPG"  software to convert pdf to jpg (http://www.boxoft.com/pdf-to-jpg/)
3. Convert all the files (batch mode) to jpg
4. The output format: a folder is created for each pdf. for example if the pdf name is HD07, then there will be a folder
    with the name HD001 and there will be a jpg image with the name HD07-001-001
5. Start Matlab, go to the output directory and execute the following comments:
a=dir;

for i=1:length(a)
     movefile([a(i).name '/' a(i).name '-001-001.jpg'],'.')
end

for i=1:length(a)
     movefile([a(i).name '-001-001.jpg'],[a(i).name '.jpg'])
end

6. move the folder (let's say the folder name is skulls) to the general skull images dir. i.e., the new path would be E:\PROJECTS\skull\DATA\data_june2013\skulls

7. run the MATLAB function ss_ImageRegist.m for image alignment and registration
>> ss_ImageRegist('E:\PROJECTS\skull\DATA\data_june2013\skulls');

8. Next, we need to separate the three views. We will use the masks under the directory: E:\PROJECTS\skull\preprocess_output\mask
   It is important to use these masks, since all the images are resized to 800x600 and the function ss_Separate.m ism designed to use these masks specifically. Rin the following function
ss_Separate;

9. Get the skeleton images:
 ss_Segment;
Note that the pixel values for the green lines is 255,and red line is 128 in the skeleton images

Wednesday, May 15, 2013

set the node!

#PBS -l walltime=10:00:00,mem=8gb,nodes=1:ppn=1:amd09