├── OSTD.m
├── README.md
├── STOC-RPCA
├── solve_proj2.m
├── stoc_rpca.m
└── update_col_orpca.m
├── demo.m
├── demo.png
├── doc
├── ostd_demo.png
├── ostd_framework.png
└── tensor_decomp.png
└── hyperspectral
├── FG
├── fg000001.png
├── fg000002.png
├── fg000003.png
├── fg000004.png
├── fg000005.png
├── fg000006.png
├── fg000007.png
├── fg000008.png
├── fg000009.png
├── fg000010.png
├── fg000011.png
├── fg000012.png
├── fg000013.png
├── fg000014.png
├── fg000015.png
├── fg000016.png
├── fg000017.png
├── fg000018.png
├── fg000019.png
├── fg000020.png
├── fg000021.png
├── fg000022.png
├── fg000023.png
├── fg000024.png
├── fg000025.png
├── fg000026.png
├── fg000027.png
├── fg000028.png
├── fg000029.png
└── fg000030.png
├── GT
├── gt000001.png
├── gt000002.png
├── gt000003.png
├── gt000004.png
├── gt000005.png
├── gt000006.png
├── gt000007.png
├── gt000008.png
├── gt000009.png
├── gt000010.png
├── gt000011.png
├── gt000012.png
├── gt000013.png
├── gt000014.png
├── gt000015.png
├── gt000016.png
├── gt000017.png
├── gt000018.png
├── gt000019.png
├── gt000020.png
├── gt000021.png
├── gt000022.png
├── gt000023.png
├── gt000024.png
├── gt000025.png
├── gt000026.png
├── gt000027.png
├── gt000028.png
├── gt000029.png
└── gt000030.png
├── SC
├── gt000001.png
├── gt000002.png
├── gt000003.png
├── gt000004.png
├── gt000005.png
├── gt000006.png
├── gt000007.png
├── gt000008.png
├── gt000009.png
├── gt000010.png
├── gt000011.png
├── gt000012.png
├── gt000013.png
├── gt000014.png
├── gt000015.png
├── gt000016.png
├── gt000017.png
├── gt000018.png
├── gt000019.png
├── gt000020.png
├── gt000021.png
├── gt000022.png
├── gt000023.png
├── gt000024.png
├── gt000025.png
├── gt000026.png
├── gt000027.png
├── gt000028.png
├── gt000029.png
└── gt000030.png
├── fet.py
├── imgMS
├── in000001.tif
├── in000002.tif
├── in000003.tif
├── in000004.tif
├── in000005.tif
├── in000006.tif
├── in000007.tif
├── in000008.tif
├── in000009.tif
├── in000010.tif
├── in000011.tif
├── in000012.tif
├── in000013.tif
├── in000014.tif
├── in000015.tif
├── in000016.tif
├── in000017.tif
├── in000018.tif
├── in000019.tif
├── in000020.tif
├── in000021.tif
├── in000022.tif
├── in000023.tif
├── in000024.tif
├── in000025.tif
├── in000026.tif
├── in000027.tif
├── in000028.tif
├── in000029.tif
└── in000030.tif
├── imgRGB
├── in000001.png
├── in000002.png
├── in000003.png
├── in000004.png
├── in000005.png
├── in000006.png
├── in000007.png
├── in000008.png
├── in000009.png
├── in000010.png
├── in000011.png
├── in000012.png
├── in000013.png
├── in000014.png
├── in000015.png
├── in000016.png
├── in000017.png
├── in000018.png
├── in000019.png
├── in000020.png
├── in000021.png
├── in000022.png
├── in000023.png
├── in000024.png
├── in000025.png
├── in000026.png
├── in000027.png
├── in000028.png
├── in000029.png
└── in000030.png
└── results.txt
/OSTD.m:
--------------------------------------------------------------------------------
1 | %{
2 | Online Stochastic Tensor Decomposition for Background Subtraction
3 |
4 | Author: Andrews Sobral
5 | https://github.com/andrewssobral/ostd
6 |
7 | Reference:
8 | @inproceedings{ostd,
9 | author = {Sobral, Andrews and Javed, Sajid and Ki Jung, Soon and Bouwmans, Thierry and Zahzah, El-hadi},
10 | title = {Online Tensor Decomposition for Background Subtraction in Multispectral Video Sequences},
11 | booktitle = {IEEE International Conference on Computer Vision Workshops (ICCVW)},
12 | address = {Santiago, Chile},
13 | year = {2015},
14 | month = {December},
15 | url = {https://github.com/andrewssobral/ostd}
16 | }
17 | %}
18 | function [Tlowrank,Tsparse,Tmask,Tm] = OSTD(T,k,Tm)
19 | Tlowrank = zeros(size(T));
20 | Tsparse = zeros(size(T));
21 | nmode = length(size(T));
22 | for j = 1:nmode
23 | %disp(['tensor.mode-' num2str(j)]);
24 | Titm = tenmat(T,j); M = double(Titm); % imagesc(Ti)
25 | z = M(:); %disp(size(z))
26 | lambda1 = (1/sqrt(max(size(z))));
27 | lambda2 = lambda1*10;
28 | if(k == 1)
29 | [ndim,~] = size(z);
30 | nrank = 10;
31 | Tm{j}.A = zeros(nrank,nrank);
32 | Tm{j}.B = zeros(ndim,nrank);
33 |
34 | %%% Initialization by Random Basis
35 | %Tm{j}.L = rand(ndim,nrank);
36 |
37 | %%% Initialization by Bilateral Random Projections
38 | power = 1;
39 | Y2 = randn(size(z,2),nrank);
40 | for jj = 1:power+1
41 | Y1 = z*Y2;
42 | Y2 = z'*Y1;
43 | end
44 | [Q,R] = qr(Y2,0);
45 | L = (z*Q)*Q';
46 | L = repmat(L,[1 nrank]);
47 | Tm{j}.L = L;
48 | end
49 | A = Tm{j}.A;
50 | B = Tm{j}.B;
51 | L = Tm{j}.L;
52 | [r,e] = solve_proj2(z, L, lambda1, lambda2);
53 | A = A + r * r';
54 | B = B + (z-e) * r';
55 | L = update_col_orpca(L, A, B, lambda1);
56 | lowrank = reshape(L*r,size(M,1),size(M,2));
57 | sparse = reshape(e,size(M,1),size(M,2));
58 | Ti_lowrank = double(tensor(tenmat(lowrank,Titm.rdims,Titm.cdims,Titm.tsize)));
59 | Ti_sparse = double(tensor(tenmat(sparse,Titm.rdims,Titm.cdims,Titm.tsize)));
60 | Tm{j}.A = A;
61 | Tm{j}.B = B;
62 | Tm{j}.L = L;
63 | Tlowrank = Tlowrank + Ti_lowrank;
64 | Tsparse = Tsparse + Ti_sparse;
65 | end % end tensor mode-i
66 | Tlowrank = Tlowrank./nmode;
67 | Tsparse = Tsparse./nmode;
68 | Tmask = medfilt2(double(hard_threshold(mean(Tsparse,3))),[5 5]);
69 | end
70 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://www.mathworks.com/matlabcentral/fileexchange/88743-ostd)
2 |
3 | Last Page Update: **26/01/2016**
4 |
5 | # OSTD
6 | Online Stochastic Tensor Decomposition for Background Subtraction in Multispectral Video Sequences
7 |
8 |

9 |
10 | See also:
11 |
12 | * [OSTD SlideShare Presentation](http://pt.slideshare.net/andrewssobral/online-stochastic-tensor-decomposition-for-background-subtraction-in-multispectral-video-sequences)
13 |
14 | * [LRSLibrary: Low-Rank and Sparse Tools for Background Modeling and Subtraction in Videos](https://github.com/andrewssobral/lrslibrary)
15 |
16 | Abstract
17 | --------
18 | Background subtraction is an important task for visual surveillance systems. However, this task becomes more complex when the data size grows since the real-world scenario requires larger data to be processed in a more efficient way, and in some cases, in a continuous manner. Until now, most of background subtraction algorithms were designed for mono or trichromatic cameras within the visible spectrum or near infrared part. Recent advances in multispectral imaging technologies give the possibility to record multispectral videos for video surveillance applications. Due to the specific nature of these data, many of the bands within multispectral images are often strongly correlated. In addition, processing multispectral images with hundreds of bands can be computationally burdensome. In order to address these major difficulties of multispectral imaging for video surveillance, this paper propose an online stochastic framework for tensor decomposition of multispectral video sequences (OSTD).
19 |
20 | Highlights
21 | ----------
22 | * An online stochastic framework for tensor decomposition to deal with multi-dimensional and streaming data.
23 | * And, the use of multispectral video sequences instead of standard mono/trichromatic images, enabling a better background subtraction.
24 |
25 | Citation
26 | --------
27 | If you use this code for your publications, please cite it as ([Online Reference](https://www.researchgate.net/publication/282770162_Online_Stochastic_Tensor_Decomposition_for_Background_Subtraction_in_Multispectral_Video_Sequences)):
28 | ```
29 | @inproceedings{ostd,
30 | author = {Sobral, Andrews and Javed, Sajid and Ki Jung, Soon and Bouwmans, Thierry and Zahzah, El-hadi},
31 | title = {Online Tensor Decomposition for Background Subtraction in Multispectral Video Sequences},
32 | booktitle = {IEEE International Conference on Computer Vision Workshops (ICCVW)},
33 | address = {Santiago, Chile},
34 | year = {2015},
35 | month = {December},
36 | url = {https://github.com/andrewssobral/ostd}
37 | }
38 | ```
39 |
40 | Source code
41 | -----------
42 | ```
43 | hyperspectral/ - hyperspectral image sequences
44 | hyperspectral/fet.py - foreground evaluation tool in python
45 | STOC-RPCA/ - stochastic RPCA
46 | OSTD.m - proposed algorithm
47 | demo.m - demo file
48 | ```
49 |
50 | License
51 | -------
52 | The source code is available only for academic/research purposes (non-commercial).
53 |
54 | Problems or Questions
55 | ---------------------
56 | If you have any problems or questions, please contact the author: Andrews Sobral (andrewssobral at gmail dot com)
57 |
--------------------------------------------------------------------------------
/STOC-RPCA/solve_proj2.m:
--------------------------------------------------------------------------------
1 | % solve the problem:
2 | % min_{x,e} 0.5*|z-Dx-e|_2^2 + 0.5*lambda1*|x|_2^2 + lambda2*|e|_1
3 | %
4 | % solve the projection by APG
5 | % input:
6 | % z - data point
7 | % D - basis matrix
8 | % lambda1, lambda2 - tradeoff parameters
9 | % output:
10 | % r - projection coefficient
11 | % e - sparse noise
12 | % copyright Jiashi Feng (jshfeng@gmail.com)
13 | %
14 | function [x,e] = solve_proj2(z,D,lambda1,lambda2)
15 | % initialization
16 | [ndim,ncol] = size(D);
17 | e = zeros(ndim,1);
18 | x = zeros(ncol,1);
19 | I = eye(ncol);
20 | converged = false;
21 | maxIter = inf;
22 | iter = 0;
23 | % alternatively update
24 | DDt = inv(D'*D+lambda1*I)*D';
25 | while ~converged
26 | iter = iter + 1;
27 | xtemp = x;
28 | x = DDt*(z-e);
29 | % x = (D'*D + lambda1*I)\(D'*(z-e));
30 | etemp = e;
31 | e = thres(z-D*x,lambda2);
32 | stopc = max(norm(e-etemp), norm(x-xtemp))/ndim;
33 | if stopc < 1e-6 || iter > maxIter
34 | converged = true;
35 | end
36 | % fval = func_proj(z,D,lambda1,lambda2,x,e);
37 | % fprintf('fval = %f\n', fval);
38 | end
39 | end
40 |
41 | function x = thres(y,mu)
42 | x = max(y-mu, 0);
43 | x = x + min(y + mu, 0);
44 | end
45 |
46 | function fval = func_proj(z,D,lambda1,lambda2,x,e)
47 | fval = 0;
48 | fval = fval + 0.5*norm(z-D*x-e)^2;
49 | fval = fval + 0.5*lambda1*norm(x)^2;
50 | fval = fval + lambda2*sum(abs(e));
51 | end
--------------------------------------------------------------------------------
/STOC-RPCA/stoc_rpca.m:
--------------------------------------------------------------------------------
1 | % Stochastic optimization for the robust PCA
2 | % Input:
3 | % D: [m x n] data matrix, m - ambient dimension, n - samples number
4 | % lambda1, lambda2: trade-off parameters
5 | % nrank: the groundtruth rank of the data
6 | % Output:
7 | % L: [m x r] the basis of the subspace
8 | % R: [r x n] the coefficient of the samples on the basis L
9 | % E: sparse error
10 | %
11 | % copyright (c) Jiashi Feng (jshfeng@gmail.com)
12 | %
13 | % This is a modified version of Jiashi Feng code
14 | %
15 | %{
16 | lambda1 = 1/sqrt(max(size(M)));
17 | lambda2 = lambda1;
18 | nrank = size(M,2);
19 | [L,S] = stoc_rpca(M, lambda1, lambda2, nrank);
20 | %}
21 | % [L,R,E] = stoc_rpca(D, lambda1, lambda2, nrank)
22 | function [Lr,S] = stoc_rpca(D, lambda1, lambda2, nrank)
23 | %% initialization
24 | [ndim, nsample] = size(D);
25 | %L = cell(nsample+1,1);
26 | %L{1} = rand(ndim,nrank);
27 | L = rand(ndim,nrank);
28 | A = zeros(nrank,nrank);
29 | B = zeros(ndim,nrank);
30 | %R = zeros(nrank,nsample);
31 | S = zeros(ndim,nsample);
32 | Lr = zeros(ndim,nsample);
33 | %% online optimization
34 | for t = 1:nsample
35 | disp(t);
36 | % tic;
37 | z = D(:,t);
38 | % tic;
39 | %[r,s] = solve_proj2(z,L{t},lambda1,lambda2);
40 | [r,s] = solve_proj2(z,L,lambda1,lambda2);
41 | % tused = toc;
42 | % fprintf('elapsed time for projection %f secs\n',tused);
43 | % R(:,t) = r;
44 | S(:,t) = s;
45 | A = A + r*r';
46 | B = B + (z-s)*r';
47 | % L{t+1} = update_col(L{t},A,B,lambda1/nsample);
48 | L = update_col_orpca(L,A,B,lambda1/nsample);
49 | Lr(:,t) = L * r;
50 | % disp(t);
51 | % toc;
52 | end
53 | end
54 |
--------------------------------------------------------------------------------
/STOC-RPCA/update_col_orpca.m:
--------------------------------------------------------------------------------
1 | function L = update_col_orpca(L,A,B,lambda1)
2 | [junk,ncol] = size(L);
3 | A = A + lambda1*eye(ncol,ncol);
4 | for j = 1:ncol
5 | bj = B(:,j);
6 | lj = L(:,j);
7 | aj = A(:,j);
8 | temp = (bj-L*aj)/A(j,j) + lj;
9 | L(:,j) = temp/max(norm(temp),1);
10 | end
11 | end
--------------------------------------------------------------------------------
/demo.m:
--------------------------------------------------------------------------------
1 | %% Download and install LRSLibrary
2 | % https://github.com/andrewssobral/lrslibrary
3 | run('../lrslibrary/lrs_setup');
4 |
5 | %% Update the path
6 | addpath('STOC-RPCA');
7 |
8 | %% Run demo
9 | folder = 'hyperspectral/';
10 | folder_out = strcat(folder,'FG/');
11 | folder_frames_rgb = strcat(folder,'imgRGB/');
12 | folder_frames_tif = strcat(folder,'imgMS/');
13 | d_frames_rgb = dir(strcat(folder_frames_rgb,'*.png'));
14 | d_frames_tif = dir(strcat(folder_frames_tif,'*.tif'));
15 | nframes = size(d_frames_rgb,1);
16 | factor = 0.25; % input_size = [120 120];
17 | k = 0;
18 | for i = 1:20%nframes
19 | k = k + 1;
20 | disp(['frame: ' num2str(i)]);
21 | filename_rgb = strcat(folder_frames_rgb,d_frames_rgb(i).name);
22 | filename_tif = strcat(folder_frames_tif,d_frames_tif(i).name);
23 |
24 | input_rgb = im2double(imread(filename_rgb));
25 | input_tif = [];
26 | for j = 1:7, input_tif(:,:,j) = im2double(imread(filename_tif, j)); end
27 |
28 | input_rgb = imresize(input_rgb,factor);
29 | input_tif = imresize(input_tif,factor);
30 | %input_rgb = imresize(input_rgb,input_size);
31 | %input_tif = imresize(input_tif,input_size);
32 |
33 | % Only gray scale
34 | %frame = rgb2gray(input_rgb);
35 | % Only RGB values
36 | frame = input_rgb;
37 | % Only Multispectral bands
38 | %frame = input_tif;
39 | % Full: RGB + Multispectral bands
40 | %frame = cat(3,input_rgb,input_tif);
41 |
42 | % To see the frontal slices of the tensor
43 | %tensorlab.slice3(frame), colormap('gray');
44 |
45 | T = tensor(frame);
46 | if(k == 1) Tm = []; end
47 | [Tlowrank,Tsparse,Tmask,Tm] = OSTD(T,k,Tm);
48 |
49 | clf;
50 | subplot(1,4,1), imshow(input_rgb,[]);
51 | subplot(1,4,2), imshow(Tlowrank,[]);
52 | subplot(1,4,3), imshow(Tsparse,[]);
53 | subplot(1,4,4), imshow(Tmask,[]);
54 | pause(0.01);
55 |
56 | %%% Save outputs
57 | [~,filename_out,~] = fileparts(filename_rgb);
58 | filepath_out = strcat(folder_out,'fg',filename_out(3:end),'.png');
59 | %imwrite(Tmask,filepath_out); % uncomment for saving foreground masks
60 | end % end frames
61 |
--------------------------------------------------------------------------------
/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/demo.png
--------------------------------------------------------------------------------
/doc/ostd_demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/doc/ostd_demo.png
--------------------------------------------------------------------------------
/doc/ostd_framework.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/doc/ostd_framework.png
--------------------------------------------------------------------------------
/doc/tensor_decomp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/doc/tensor_decomp.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000001.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000002.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000003.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000004.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000005.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000006.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000007.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000008.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000009.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000010.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000011.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000012.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000013.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000014.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000015.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000016.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000017.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000017.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000018.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000018.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000019.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000020.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000020.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000021.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000021.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000022.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000023.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000023.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000024.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000025.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000025.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000026.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000026.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000027.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000027.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000028.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000029.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000029.png
--------------------------------------------------------------------------------
/hyperspectral/FG/fg000030.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/FG/fg000030.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000001.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000002.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000003.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000004.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000005.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000006.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000007.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000008.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000009.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000010.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000011.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000012.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000013.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000014.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000015.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000016.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000017.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000017.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000018.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000018.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000019.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000020.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000020.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000021.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000021.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000022.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000023.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000023.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000024.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000025.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000025.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000026.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000026.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000027.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000027.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000028.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000029.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000029.png
--------------------------------------------------------------------------------
/hyperspectral/GT/gt000030.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/GT/gt000030.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000001.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000002.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000003.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000004.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000005.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000006.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000007.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000008.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000009.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000010.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000011.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000012.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000013.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000014.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000015.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000016.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000017.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000017.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000018.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000018.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000019.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000020.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000020.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000021.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000021.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000022.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000023.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000023.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000024.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000025.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000025.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000026.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000026.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000027.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000027.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000028.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000029.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000029.png
--------------------------------------------------------------------------------
/hyperspectral/SC/gt000030.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/SC/gt000030.png
--------------------------------------------------------------------------------
/hyperspectral/fet.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | FET - FOREGROUND EVALUATION TOOL
4 |
5 | @author: Andrews Sobral
6 | """
7 | import sys
8 | import numpy as np
9 | import cv2
10 | from os import listdir
11 | from os.path import isfile, join
12 |
13 | path_gt = 'GT/'
14 | path_fg = 'FG/'
15 | path_sc = 'SC/'
16 |
17 | files_gt = [ f for f in listdir(path_gt) if isfile(join(path_gt,f)) ]
18 | files_fg = [ f for f in listdir(path_fg) if isfile(join(path_fg,f)) ]
19 | #print(files_gt.count())
20 |
21 | TP = .0 # True positive pixels
22 | FP = .0 # False positive pixels
23 | TN = .0 # True negative pixels
24 | FN = .0 # False negative pixels
25 | Recall = .0 # TP / (TP + FN)
26 | Precision = .0 # TP / (TP + FP)
27 | Fscore = .0 # 2*(Precision*Recall)/(Precision+Recall)
28 |
29 | # TP - # of foreground pixels classified as foreground pixels.
30 | # FP - # of background pixels classified as foreground pixels.
31 | # TN - # of background pixels classified as background pixels.
32 | # FN - # of foreground pixels classified as background pixels.
33 |
34 | green = [0,255,0] # for FN
35 | blue = [255,0,0]
36 | red = [0,0,255] # for FP
37 | white = [255,255,255] # for TP
38 | black = [0,0,0] # for TN
39 |
40 | print 'Processing'
41 | k = 0
42 | for file_gt, file_fg in zip(files_gt, files_fg):
43 | print(k, file_gt, file_fg)
44 | img_fg_raw = cv2.imread(path_fg + file_fg,cv2.IMREAD_GRAYSCALE)
45 | img_fg = img_fg_raw;
46 | #img_fg = cv2.resize(img_fg_raw, (0,0), fx=0.5, fy=0.5)
47 | #img_fg = cv2.resize(img_fg_raw, (120, 120))
48 | img_gt_raw = cv2.imread(path_gt + file_gt,cv2.IMREAD_GRAYSCALE)
49 | #img_gt = cv2.resize(img_gt_raw, (0,0), fx=0.5, fy=0.5)
50 | newx,newy = img_fg.shape[1],img_fg.shape[0] #new size (w,h)
51 | img_gt = cv2.resize(img_gt_raw,(newx,newy))
52 | #print(img_gt.shape,img_fg.shape)
53 | rows,cols = img_gt.shape
54 | img_res = np.zeros((rows,cols,3),np.uint8)
55 | for i in xrange(rows):
56 | for j in xrange(cols):
57 | pixel_gt = img_gt[i,j]
58 | pixel_fg = img_fg[i,j]
59 | if(pixel_gt == 255 and pixel_fg == 255):
60 | TP = TP + 1
61 | img_res[i,j] = white
62 | if(pixel_gt == 0 and pixel_fg == 255):
63 | FP = FP + 1
64 | img_res[i,j] = red
65 | if(pixel_gt == 0 and pixel_fg == 0):
66 | TN = TN + 1
67 | img_res[i,j] = black
68 | if(pixel_gt == 255 and pixel_fg == 0):
69 | FN = FN + 1
70 | img_res[i,j] = green
71 | cv2.imshow('GT',img_gt)
72 | cv2.imshow('FG',img_fg)
73 | cv2.imshow('SC',img_res)
74 | cv2.imwrite(path_sc + file_gt, img_res)
75 | cv2.waitKey(1) # 33
76 | k = k + 1
77 | #break
78 | cv2.destroyAllWindows()
79 |
80 | Recall = TP / (TP + FN)
81 | Precision = TP / (TP + FP)
82 | Fscore = 2*Precision*Recall/(Precision+Recall)
83 |
84 | print 'Score:'
85 | print 'TP: ', TP
86 | print 'FP: ', FP
87 | print 'TN: ', TN
88 | print 'FN: ', FN
89 | print 'Recall: ', Recall
90 | print 'Precision: ', Precision
91 | print 'Fscore: ', Fscore
92 | print ''
93 |
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000001.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000001.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000002.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000002.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000003.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000003.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000004.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000004.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000005.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000005.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000006.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000006.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000007.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000007.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000008.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000008.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000009.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000009.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000010.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000010.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000011.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000011.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000012.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000012.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000013.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000013.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000014.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000014.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000015.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000015.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000016.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000016.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000017.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000017.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000018.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000018.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000019.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000019.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000020.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000020.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000021.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000021.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000022.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000022.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000023.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000023.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000024.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000024.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000025.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000025.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000026.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000026.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000027.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000027.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000028.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000028.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000029.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000029.tif
--------------------------------------------------------------------------------
/hyperspectral/imgMS/in000030.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgMS/in000030.tif
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000001.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000002.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000003.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000004.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000005.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000006.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000007.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000008.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000009.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000010.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000011.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000012.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000013.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000014.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000015.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000016.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000017.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000017.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000018.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000018.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000019.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000020.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000020.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000021.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000021.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000022.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000023.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000023.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000024.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000025.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000025.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000026.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000026.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000027.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000027.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000028.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000029.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000029.png
--------------------------------------------------------------------------------
/hyperspectral/imgRGB/in000030.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andrewssobral/ostd/363d37d4f0e2f4c27ddb99c4b7f4bea50c948f85/hyperspectral/imgRGB/in000030.png
--------------------------------------------------------------------------------
/hyperspectral/results.txt:
--------------------------------------------------------------------------------
1 | Score:
2 | TP: 3029.0
3 | FP: 41.0
4 | TN: 316774.0
5 | FN: 397.0
6 | Recall: 0.884121424402
7 | Precision: 0.98664495114
8 | Fscore: 0.932573891626
--------------------------------------------------------------------------------