当前位置:网站首页>Brain and cognitive neuroscience matlab psychoolbox cognitive science experimental design - experimental design 4
Brain and cognitive neuroscience matlab psychoolbox cognitive science experimental design - experimental design 4
2022-07-02 05:56:00 【I don't know who】
Matlab Psytoolbox( Brain and cognitive neuroscience )
Examples of optical illusion
Experimental design 1
Experimental design II
Experimental design 3
Experiment design IV
List of articles
Preface
Brain and cognitive neuroscience Matlab Cognitive science significance test ( Attention prediction )
1. subject
function MIT/Tuebingen Saliency Benchmark( Website :https://saliency.tuebingen.ai/) The code on , Find your own pictures , Show run results , Know about significance detection
2. Screenshot
After entering the website , Click on results, There are many models to choose from
I chose RARE2012 and Context-Aware Saliency Two models , As a comparison of attention prediction . Click on the name , Go to the link , The two interfaces are
RARE2012, Click on the red area below to download the thesis and source code
Context-Aware Saliency, The interface also has the following links to papers and download source code , Click to
The original picture when I execute the code is these six
The running results are respectively
RARE2012
Context-Aware Saliency
Both are matlab function ,RARE2020 The execution time is approximately 10s within , The result is rough , and Context-Aware Saliency The execution time varies from tens of seconds , The predicted area is more in line with human perception .
3. Evaluate the results
Because the webpage provides python There are many evaluation codes bug, I don't recommend using that evaluation code , You can go to github Find your own evaluation code . Or directly use the existing evaluation data .
The meanings of different indicators are explained in detail below :
AUC: This is a ROC A version of the area under the curve . Saliency mapping is used as a binary classifier to distinguish positive samples and negative samples under different thresholds .
sAUC:Shuffled AUC Is under the area ROC A version of curve measurement . Saliency mapping is used as a binary classifier to distinguish positive samples and negative samples under different thresholds .
NSS:The normalized scanpath saliency, Measure the normalized significance diagram ( Zero mean , Unit variance ) Average significance value of fixed position .
CC:The correlation coefficient, Is the linear correlation coefficient between the model significance diagram and the empirical significance diagram , The saliency map is obtained by convolution of gaze position and Gaussian kernel .
KLDiv:Kullback-Leibler divergence, Normalize the model significance diagram and empirical significance diagram , Divide the sum by the density , Then calculate the Kullback-Leibler The divergence .
SIM:Similarity, This similarity measure is also called histogram intersection , When considered as a distribution , It measures the similarity between two different saliency graphs . Its calculation method is , Firstly, the significance mapping and empirical significance mapping of the model are normalized , Divide it by the sum , Then add the pixel level minimum values of the two distributions .
RARE2012
Context-Aware Saliency
4. Code changes
Because the source code cannot execute multiple pictures at one time , I make some modifications , Make it possible to display the results of six pictures at one time
( Pay attention to modifying the picture name )
RARE2012 Of example.m Executable files
I=cell(6);
R=cell(6);
I{
1} = im2double(imread('images/1.jpeg'));
I{
2} = im2double(imread('images/2.jpeg'));
I{
3} = im2double(imread('images/3.jpeg'));
I{
4} = im2double(imread('images/4.jpeg'));
I{
5} = im2double(imread('images/5.jpeg'));
I{
6} = im2double(imread('images/6.jpeg'));
R{
1} = Rare2007(I{
1});
R{
2} = Rare2007(I{
2});
R{
3} = Rare2007(I{
3});
R{
4} = Rare2007(I{
4});
R{
5} = Rare2007(I{
5});
R{
6} = Rare2007(I{
6});
N = length(R);
for i=1:N
figure(i); clf;
subplot(1,2,1); imshow(I{
i}); title('Initial image')
subplot(1,2,2); imshow(R{
i}); title('Raw saliency map')
end
Context-Aware Saliency Of run_saliency.m Executable files
%% A script for running saliency computation
clear all;
close all;
%% load parameters and images
file_names{
1} = '1.jpeg';
file_names{
2} = '2.jpeg';
file_names{
3} = '3.jpeg';
file_names{
4} = '4.jpeg';
file_names{
5} = '5.jpeg';
file_names{
6} = '6.jpeg';
MOV = saliency(file_names);
%% display results
N = length(MOV);
for i=1:N
figure(i); clf;
subplot(1,2,1); imshow(MOV{
i}.Irgb); title('Input','fontsize',16);
subplot(1,2,2); imshow(MOV{
i}.SaliencyMap); title('Saliency map','fontsize',16);
end
summary
Through the comparison of method 2 and method 1 , We can visually feel that the model of method 2 is better than method 1 , The images displayed after running the code of methods 1 and 2 have edge detection algorithms , Method 1 starts with the outline of things , Emphasize the main part , But there are too many white parts , Unable to focus on which part . Relatively speaking, the focus area can be clearly seen in the image after executing the code of method 2 , Some are ignored , Focus on the whole , Prevent the main part from local interference , Prevent important areas from being distorted , The marked area is closer to the attention area . Of course , Method 2 also takes longer to execute the code .
Method 2 running time : Average time for four of the six pictures 30s about , Only figure 2 and figure 3 are exceptions , After observation and analysis , Figure 2 and figure 3 are animated pictures , colorful , Too much halo , Personally, I think these aspects lead to a long code execution time , Figure 2 40-50s, Figure 3 time consuming 75s about .
Method 1 running time :10s The running results of six pictures are displayed in .
Thank you very much for watching , The content has been uploaded completely , In addition, my home page also has python Artificial intelligence , SCM and other articles , Welcome to
边栏推荐
猜你喜欢
随机推荐
Keepalived installation, use and quick start
RGB infinite cube (advanced version)
File contains vulnerability (I)
Zzuli:1066 character classification statistics
token过期自动续费方案和实现
Stc8h8k series assembly and C51 actual combat - keys allow key counting (using falling edge interrupt control)
[Chongqing Guangdong education] selected reading reference materials of British and American literature of Nanyang Normal University
cookie插件和localForage离线储存插件
Redis key value database [seckill]
STC8H8K系列匯編和C51實戰——數碼管顯示ADC、按鍵串口回複按鍵號與ADC數值
Pytorch Basics
"Simple" infinite magic cube
Zzuli:1069 learn from classmate Z
Summary of MySQL constraints
[paper translation] gcnet: non local networks meet squeeze exception networks and beyond
TI毫米波雷达学习(一)
Redis key value database [primary]
[personal test] copy and paste code between VirtualBox virtual machine and local
Balsamiq wireframes free installation
Pytorch Chinese document