Human gloss perception reproduced by tiny neural networks.
The 19 matches · 5 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
- [1] § Methods › Exclusion criteria ↔ process_onlinedata.m, lines 1 to 31 · score 0.70 · catch trials, median response, online experiment, observers · Report a mismatch
- [2] § Results › Computational models ↔ fig3_model_comparison.m, lines 26 to 83 · score 0.67 · physical ground truth, cross validation, correlation coefficient, human responses, networks, layers · Report a mismatch
- [3] § Methods › Computational modelling › Manipulation of the pattern of specular reflection ↔ fig6_highlight_manipulation.m, lines 18 to 101 · score 0.66 · surface roughness, surface contrast, manipulations, translation, rotated, rotation · Report a mismatch
- [4] § ‘Tiny’ neural networks as interpretable data-driven models ↔ function/XYZToSRGBPrimary.m, the whole file · a weak match · score 0.61 · CIE XYZ, gamma correction, sRGB, linear, matching · Report a mismatch
- [5] § Results › Computational models ↔ fig3_model_comparison.m, lines 1 to 18 · score 0.60 · ResNet18, specular metrics, computational models, ground truth, Figure 3, networks · Report a mismatch
- [6] § Methods › Computational modelling › Luminance statistics models ↔ save_luminance_stats.m, the whole file · a weak match · score 0.59 · kurtosis, quartile, skewness, Q1, Q3, luminance · Report a mismatch
- [7] § Methods › Stimuli ↔ function/XYZToSRGBPrimary.m, the whole file · a weak match · score 0.57 · gamma correction, sRGB, monitors, XYZ, linear, matching · Report a mismatch
- [8] § Results › Gloss illusion caused by manipulated specular highlights ↔ fig6_highlight_manipulation.m, lines 1 to 16 · score 0.56 · highlight rotation, surface roughness, translations, manipulated, predicted, gloss · Report a mismatch
- [9] § Results › Analysis of single-kernel models ↔ fig4c_4d_S7bc_S9c_analyze_kernel.m, lines 1 to 18 · score 0.55 · daylight locus, chromatic distribution, gamut, space, kernel, training · Report a mismatch
- [10] § Results › Perceptual experiments ↔ fig2_online_exp_results.m, lines 1 to 15 · score 0.55 · Intra observer, inter observer, ground truth, online, Perceptual, correlations · Report a mismatch
- [11] § Methods › Procedure and task ↔ process_onlinedata.m, lines 63 to 159 · score 0.53 · catch trial, slider, Median, Pellacini, Observers · Report a mismatch
- [12] § Methods › Computational modelling › Network architectures ↔ train.py, the whole file · a weak match · score 0.53 · Adam optimizer, convolutional layer, error, trained, networks, model · Report a mismatch
- [13] § Results › Computational models ↔ fig3_model_comparison.m, lines 291 to 433 · score 0.52 · luminance model, tailed, Cohen, CI, regression, errors · Report a mismatch
- [14] § Results › Analysis of single-kernel models ↔ fig4g_1kernel_fittingResults.m, lines 43 to 69 · score 0.52 · Gaussian ridge, ridge functions, amplitude, orientation, fitted, filters · Report a mismatch
- [15] § Methods › Stimuli ↔ fig6_highlight_manipulation.m, lines 18 to 101 · score 0.52 · surface roughness, rotated, rotations, pixel, positioned, network · Report a mismatch
- [16] § Results › Real-world photographs ↔ fig8_real_photographs.m, lines 87 to 132 · score 0.51 · comparing model, single kernel model, boundaries, layer model, matte, scatter · Report a mismatch
- [17] § Results › Analysis of single-kernel models ↔ fig4c_4d_S7bc_S9c_analyze_kernel.m, lines 1 to 18 · score 0.51 · daylight locus, Chromatic distribution, gamut, component, convolution, kernel · Report a mismatch
- [18] § Results › Computational models ↔ save_luminance_stats.m, the whole file · a weak match · score 0.50 · luminance distributions, kurtosis, quartile, skewness, median, linear · Report a mismatch
- [19] § Results › Perceptual experiments ↔ fig2_online_exp_results.m, lines 1 to 15 · score 0.50 · intra observer, ground truth correlation, Histogram, Figure 2, Perceptual, gloss · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 532 lines · 22 KB · MIT · 3 matches
- %--------------------------------------------------------------------------
- % This script generates Figure 3 for the manuscript.
- % It compares computational model performance in gloss perception by:
- % - Loading human and model response data,
- % - Computing and comparing correlation coefficients for one-layer, three-layer,
- % and ResNet18-based networks (with/without additional training data),
- % - Including image statistics and specular metrics models,
- % - Visualizing the relationship between correlation-to-ground-truth and
- % correlation-to-human for all approaches in a single comprehensive plot.
- % The script saves the resulting figure in the 'figs' directory.
- %
- % Author: TM, 2025
- %--------------------------------------------------------------------------
- % Source code to generate figures
- clearvars; close all; % cleaning
- disp('Generating figure 3...')
- %% Load Data
- load(fullfile('data','onlineData'))
- load(fullfile('data','imageStats_corrCoeff'))
- load(fullfile('data','imgStats_multiRegression_corrCoeff'))
- load(fullfile('data','fig_parameters'))
- %% One-layer and three-la models: load correlation coefficient
- kernelN_list.onelayer = [1 2 4 9];
- kernelN_list.threelayer = [9 16 32 64];
- filedir.onelayer = fullfile('data','networks','onelayer_models');
- filedir.threelayer = fullfile('data','networks','threelayer_models');
- cvtypeList = {'shape','lighting'};
- traininglabelList = {'human','groundtruth'};
- for model = {'onelayer','threelayer'}
- for kernelN_idx = 1:length(kernelN_list.(model{1}))
- kernelN = kernelN_list.(model{1})(kernelN_idx);
- for traininglabel = traininglabelList
- for cvtype = cvtypeList % validation type (shape-based or lighting-based cross validation)
- for ii = 1:12
- % Determine label ordering for correlation
- if strcmp(traininglabel{1}, 'human')
- % correlation to human response (human), or correlation to
- % physical ground-truth (gt)
- corrlabelList = {'human', 'gt'};
- else
- corrlabelList = {'gt', 'human'};
- end
- for corr_label = corrlabelList
- fname = fullfile(filedir.(model{1}), [traininglabel{1},'_kernelN',num2str(kernelN), ...
- '_',cvtype{1}, num2str(ii),'/corrs_',corr_label{1},'.csv']);
- temp = readmatrix(fname);
- % Pick the max correlation row according to label type
- % and use the same id to get the correlation for the
- % other objective
- if (strcmp(traininglabel{1},'human') && strcmp(corr_label{1},'human')) || ...
- (strcmp(traininglabel{1},'groundtruth') && strcmp(corr_label{1},'gt'))
- [~,maxid] = max(temp(:,1));
- end
- corr_all.(model{1}).(traininglabel{1}).(corr_label{1})(ii,strcmp(cvtype{1},cvtypeList),kernelN_idx) = temp(maxid,1);
- end
- end
- end
- end
- end
- end
- % Reshape and average correlation results for plotting
- for traininglabel = {'human','groundtruth'}
- for corr_label = {'human','gt'}
- oneLayer_corr.(traininglabel{1}).(corr_label{1}) = mean(reshape(corr_all.onelayer.(traininglabel{1}).(corr_label{1}),24,length(kernelN_list.onelayer)));
- oneLayer_corr_SD.(traininglabel{1}).(corr_label{1}) = std(reshape(corr_all.onelayer.(traininglabel{1}).(corr_label{1}),24,length(kernelN_list.onelayer)));
- threeLayers_corr.(traininglabel{1}).(corr_label{1}) = mean(reshape(corr_all.threelayer.(traininglabel{1}).(corr_label{1}),24,length(kernelN_list.threelayer)));
- threeLayers_corr_SD.(traininglabel{1}).(corr_label{1}) = std(reshape(corr_all.threelayer.(traininglabel{1}).(corr_label{1}),24,length(kernelN_list.threelayer)));
- end
- end
- %% Visualization & Figure generation
- cnt = 0;lw = 0.2;symbolsize = 50;
- % set color codes
- c_human = [90 152 152]/255;
- c_human_mean = [160 212 212]/255;
- c_oneLayer_human = [78 85 246]/255;
- c_oneLayer_gt = [184 0 127]/255;
- c_specularStr = [151 217 92]/255;
- c_ResNet18 = c_oneLayer_gt;
- c_additionalImage = [248 92 1]/255;
- basedir_additional = fullfile('data','networks','additional_trainingimgs');
- % load ResNet18 trained on ground-truth (additional training)
- % additional 500,000 imgs
- temp = readmatrix([basedir_additional,'/groundtruth_ResNet18_kernelN64_addtrainingN_500000/corrs_gt.csv']);
- [ResNet18_additional500000.gt,maxid] = max(temp(:,1));
- temp = readmatrix(fullfile(basedir_additional,'groundtruth_ResNet18_kernelN64_addtrainingN_500000/corrs_human.csv'));
- ResNet18_additional500000.human = temp(maxid,1);
- % additional 100,000 imgs
- temp = readmatrix([basedir_additional,'/groundtruth_ResNet18_kernelN64_addtrainingN_100000/corrs_gt.csv']);
- [ResNet18_additional100000.gt,maxid] = max(temp(:,1));
- temp = readmatrix([basedir_additional,'/groundtruth_ResNet18_kernelN64_addtrainingN_100000/corrs_human.csv']);
- ResNet18_additional100000.human = temp(maxid,1);
- % additional 10,000 imgs
- temp = readmatrix([basedir_additional,'/groundtruth_ResNet18_kernelN64_addtrainingN_10000/corrs_human.csv']);
- [ResNet18_additional10000.human,maxid] = max(temp(:,1));
- temp = readmatrix([basedir_additional,'/groundtruth_ResNet18_kernelN64_addtrainingN_10000/corrs_gt.csv']);
- ResNet18_additional10000.gt = temp(maxid,1);
- % load three-layer models trained on ground-truth (additional training)
- % additional 500,000 imgs
- temp = readmatrix([basedir_additional,'/groundtruth_threelayer_kernelN64_addtrainingN_500000/corrs_gt.csv']);
- [twoArea_additional500000.gt,maxid] = max(temp(:,1));
- temp = readmatrix([basedir_additional,'/groundtruth_threelayer_kernelN64_addtrainingN_500000/corrs_human.csv']);
- twoArea_additional500000.human =temp(maxid,1);
- % additional 100,000 imgs
- temp = readmatrix([basedir_additional,'/groundtruth_threelayer_kernelN64_addtrainingN_100000/corrs_gt.csv']);
- [twoArea_additional100000.gt,maxid] = max(temp(:,1));
- temp = readmatrix([basedir_additional,'/groundtruth_threelayer_kernelN64_addtrainingN_100000/corrs_human.csv']);
- twoArea_additional100000.human = temp(maxid,1);
- % additional 10,000 imgs
- temp = readmatrix([basedir_additional,'/groundtruth_threelayer_kernelN64_addtrainingN_10000/corrs_gt.csv']);
- [twoArea_additional10000.gt,maxid] = max(temp(:,1));
- temp = readmatrix([basedir_additional,'/groundtruth_threelayer_kernelN64_addtrainingN_10000/corrs_human.csv']);
- twoArea_additional10000.human = temp(maxid,1);
- % load ResNet18 trained on ground-truth (no additional training)
- basedir_ResNet18 = fullfile('data','networks');
- temp = readmatrix([basedir_ResNet18,'/groundtruth_ResNet18_kernelN64/corrs_gt.csv']);
- [ResNet18.gt,maxid] = max(temp(:,1));
- temp = readmatrix([basedir_ResNet18,'/groundtruth_ResNet18_kernelN64/corrs_human.csv']);
- ResNet18.human = temp(maxid,1);
- %% compute correlation to groundtruth and correlation to other participants for each participant
- groupN_summary = zeros(54,1);
- for N = 1:length(data)
- onlineData(:,:,N) = data(N).response_Pellacini_c;
- groupN_summary(N) = data(N).groupN;
- end
- for groupN = 1:54
- idx = find(groupN_summary == groupN);
- for N = 1:length(idx)
- response_group.(['group',num2str(groupN)])(:,N) = mean(data(idx(N)).response_Pellacini_c,2);
- if N == 1
- gt_group.(['group',num2str(groupN)])(:,1) = gt(idx(N)).Pellacini_c(1:84);
- end
- end
- end
- for groupN = 1:54
- for subjectN = 1:size(response_group.(['group',num2str(groupN)]),2)
- cnt = cnt + 1;
- obs1 = response_group.(['group',num2str(groupN)])(:,subjectN);
- obs_rest = mean(response_group.(['group',num2str(groupN)])(:,[1:subjectN-1,subjectN+1:end]),2);
- gt_temp = gt_group.(['group',num2str(groupN)]);
- human_human_corr(cnt) = corr(obs1,obs_rest);
- human_gt_corr(cnt) = corr(obs1,gt_temp);
- end
- end
- %% Generate figure
- fig = figure;
- ax = gca;
- % fill the figure panel with different colors and draw a diagonal line
- fill([0,0,1],[0,1,1],c_oneLayer_human,'FaceAlpha',0.05,'EdgeColor','none');hold on;
- fill([0,1,1],[0,0,1],c_oneLayer_gt,'FaceAlpha',0.05,'EdgeColor','none');hold on;
- line([0,100],[0,100],'Color','k','LineWidth',0.5)
- %%%%%% plot human participant %%%%%%
- scatter(human_gt_corr,human_human_corr,20,c_human,'o','filled','MarkerEdgeColor','none','LineWidth',lw,'MarkerFaceAlpha',0.4);hold on;
- scatter(mean(human_gt_corr),mean(human_human_corr),50,c_human_mean,'x','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',1,'LineWidth',1.5);hold on;
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot one-Layer rgb (human label) %%%%%%
- for kernelN = 1:size(oneLayer_corr.human.human,2)
- scatter(mean(oneLayer_corr.human.gt(:,kernelN)),mean(oneLayer_corr.human.human(:,kernelN)),40,c_oneLayer_human,'^','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot one-Layer rgb (gt label) %%%%%%
- for kernelN = 1:size(oneLayer_corr.groundtruth.human,2)
- scatter(mean(oneLayer_corr.groundtruth.gt(:,kernelN)),mean(oneLayer_corr.groundtruth.human(:,kernelN)),40,c_oneLayer_gt,'^','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot two-Layers rgb (human label) %%%%%%
- for kernelN = 1:size(threeLayers_corr.human.human,2)
- scatter(mean(threeLayers_corr.human.gt(:,kernelN)),mean(threeLayers_corr.human.human(:,kernelN)),50,c_oneLayer_human,'s','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- scatter(mean(threeLayers_corr.groundtruth.gt(:,kernelN)),mean(threeLayers_corr.groundtruth.human(:,kernelN)),50,c_oneLayer_gt,'s','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot ResNet18 (no additional) %%%%%%
- scatter(ResNet18.gt,ResNet18.human,40,c_ResNet18,'>','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot networks trained on additional images %%%%%%
- scatter(ResNet18_additional100000.gt,ResNet18_additional100000.human,40,c_additionalImage,'>','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- scatter(ResNet18_additional500000.gt,ResNet18_additional500000.human,40,c_additionalImage,'>','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- hold on;
- %scatter(twoArea_additional10000.gt,twoArea_additional10000.human,50,c_oneLayer_human,'s','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- scatter(twoArea_additional100000.gt,twoArea_additional100000.human,50,c_additionalImage,'s','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- scatter(twoArea_additional500000.gt,twoArea_additional500000.human,50,c_additionalImage,'s','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot image statistics models %%%%%%
- for N = 1:length(corrCoeff_imgStats.label)
- x = corrCoeff_imgStats.gtvsmodel(N,:);
- y = corrCoeff_imgStats.humanvsmodel(N,:);
- scatter(mean(x),mean(y),40,[.8 .8 .8],'d','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',1,'LineWidth',lw);hold on;
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot image statistics Multiple regression models %%%%%%
- x = corrCoeff_imgStats_multiRegression.gtvsmodel;
- y = corrCoeff_imgStats_multiRegression.humanvsmodel;
- scatter(mean(x),mean(y),60,[.8 .8 .8],'p','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',1,'LineWidth',lw);hold on;
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot image statistics Multiple regression models %%%%%%
- load(fullfile('data','specularMetrics_multiRegression_corrCoeff.mat'))
- x = corrCoeff_specularMetrics_multiRegression.gtvsmodel;
- y = corrCoeff_specularMetrics_multiRegression.humanvsmodel;
- scatter(mean(x),mean(y),60,c_specularStr,'p','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%% plot specular reflection models %%%%%%
- for modellabel = {'contrast','coverage','sharpness'}
- x = abs(corrCoeff_specularMetrics.gt.(modellabel{1}));
- y = abs(corrCoeff_specularMetrics.human.(modellabel{1}));
- scatter(mean(x),mean(y),40,c_specularStr,'v','filled','MarkerEdgeColor',[0 0 0],'MarkerFaceAlpha',0.5,'LineWidth',lw);hold on;
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- xlim([0 1]);ylim([0 1]);axis square
- xlabel('Correlation to ground-truth','FontWeight', 'Bold');ylabel('Correlation to human','FontWeight', 'Bold');
- fig.Units = 'centimeters';
- fig.Position = [10,10,figp.twocolumn/2,figp.twocolumn/2];
- fig.Color = 'w';
- fig.InvertHardcopy = 'off';
- xticks(0:0.25:1)
- yticks(0:0.25:1)
- ax.XTickLabel = {'0.00','0.25','0.50','0.75','1.00'};
- ax.YTickLabel = {'0.00','0.25','0.50','0.75','1.00'};
- ax.FontName = 'Arial';
- ax.Color = ones(1,3);
- ax.FontSize = figp.fontsize;
- ax.XColor = 'k';ax.YColor = 'k';
- ax.LineWidth = 0.5;
- ax.Units = 'centimeters';
- ax.Position = [0.95 0.85 7.6 7.6];
- ticklengthcm(ax,0.0)
- grid minor
- box off
- exportgraphics(fig,fullfile('figs','fig3(model_comparison).pdf'),'ContentType','vector')
- disp('Done.')
- close all
- %% ============================================================
- % Stats tests (24 paired correlations; correlation to human responses)
- % (1) Multi-reg (all luminance stats) vs mean luminance only
- % (2) Multi-reg (contrast+coverage+sharpness) vs sub-band contrast only
- % (3) One-layer (1 kernel) vs Three-layer (64 kernels)
- %% ============================================================
- alpha = 0.05; % 95% CI
- % --- Helper: find mean-luminance model row in corrCoeff_imgStats.label ---
- labels = corrCoeff_imgStats.label;
- if iscell(labels)
- labels_lower = lower(string(labels));
- else
- labels_lower = lower(string(labels(:)));
- end
- % Prefer label containing both "mean" and "lum"
- idx_meanlum = find(contains(labels_lower, "mean"), 1, 'first');
- if isempty(idx_meanlum)
- idx_meanlum = find(contains(labels_lower, "mean luminance"), 1, 'first');
- end
- if isempty(idx_meanlum)
- idx_meanlum = find(contains(labels_lower, "luminance"), 1, 'first');
- end
- if isempty(idx_meanlum)
- error('Could not identify the mean-luminance model in corrCoeff_imgStats.label. Please check label strings.');
- end
- % ============================================================
- % (1) Luminance: multi-reg vs mean luminance-only
- % ============================================================
- % Positive diff => multi-reg > mean-luminance
- y_lum_multi = corrCoeff_imgStats_multiRegression.humanvsmodel(:);
- y_meanlum = corrCoeff_imgStats.humanvsmodel(idx_meanlum, :).';
- if numel(y_lum_multi) ~= numel(y_meanlum)
- error('Size mismatch: multi-reg luminance (%d) vs mean-luminance (%d).', numel(y_lum_multi), numel(y_meanlum));
- end
- y_lum_multi = abs(y_lum_multi);
- y_meanlum = abs(y_meanlum);
- diff_lum = y_lum_multi - y_meanlum;
- [~, p_lum, ~, stats_lum] = ttest(diff_lum, 0, 'Alpha', alpha, 'Tail', 'both');
- n_lum = numel(diff_lum);
- df_lum = stats_lum.df;
- t_lum = stats_lum.tstat;
- dz_lum = mean(diff_lum) / std(diff_lum);
- [deltaL_lum, deltaU_lum] = local_nct_delta_ci(t_lum, df_lum, alpha);
- dzL_lum = deltaL_lum / sqrt(n_lum);
- dzU_lum = deltaU_lum / sqrt(n_lum);
- % ============================================================
- % (2) Specular: multi-reg vs contrast-only
- % ============================================================
- % Positive diff => multi-reg > contrast-only
- y_spec_multi = corrCoeff_specularMetrics_multiRegression.humanvsmodel(:);
- y_contrast = corrCoeff_specularMetrics.human.contrast(:);
- if numel(y_spec_multi) ~= numel(y_contrast)
- error('Size mismatch: multi-reg specular (%d) vs contrast-only (%d).', numel(y_spec_multi), numel(y_contrast));
- end
- y_spec_multi = abs(y_spec_multi);
- y_contrast = abs(y_contrast);
- diff_spec = y_spec_multi - y_contrast;
- [~, p_spec, ~, stats_spec] = ttest(diff_spec, 0, 'Alpha', alpha, 'Tail', 'both');
- n_spec = numel(diff_spec);
- df_spec = stats_spec.df;
- t_spec = stats_spec.tstat;
- dz_spec = mean(diff_spec) / std(diff_spec);
- [deltaL_spec, deltaU_spec] = local_nct_delta_ci(t_spec, df_spec, alpha);
- dzL_spec = deltaL_spec / sqrt(n_spec);
- dzU_spec = deltaU_spec / sqrt(n_spec);
- % ============================================================
- % (3) One-layer (1 kernel) vs Three-layer (64 kernels)
- % ============================================================
- % Positive diff => three-layer(64) > one-layer(1)
- % Find kernel indices
- idx_1kernel = find(kernelN_list.onelayer == 1, 1, 'first'); % 1
- idx_64kernel = find(kernelN_list.threelayer == 64, 1, 'first'); % 4
- if isempty(idx_1kernel) || isempty(idx_64kernel)
- error('Could not find kernel indices: one-layer(1) or three-layer(64).');
- end
- % --- IMPORTANT: use RAW 24 values (not means) ---
- % corr_all.onelayer.human.human has size: (12 x 2 x 4)
- % reshape -> (24 x 4) where 24 = 12(shape) + 12(lighting)
- r_one_all = reshape(corr_all.onelayer.human.human, 24, length(kernelN_list.onelayer));
- r_three_all = reshape(corr_all.threelayer.human.human, 24, length(kernelN_list.threelayer));
- r_one1 = r_one_all(:, idx_1kernel); % 24x1
- r_three64 = r_three_all(:, idx_64kernel); % 24x1
- diff_net = r_three64 - r_one1;
- % Paired t-test + Cohen's dz + CI(dz)
- [~, p_net, ~, stats_net] = ttest(diff_net, 0, 'Alpha', alpha, 'Tail', 'both');
- n_net = numel(diff_net);
- df_net = stats_net.df;
- t_net = stats_net.tstat;
- dz_net = mean(diff_net) / std(diff_net);
- [deltaL_net, deltaU_net] = local_nct_delta_ci(t_net, df_net, alpha);
- dzL_net = deltaL_net / sqrt(n_net);
- dzU_net = deltaU_net / sqrt(n_net);
- % ============================================================
- % Print full stats
- % ============================================================
- fprintf('\n=== Requested paired comparisons (n = %d patterns) ===\n', n_lum);
- fprintf('\n(1) All luminance stats (multi-reg) vs mean luminance-only:\n');
- if p_lum < 1e-3
- fprintf('t(%d) = %.2f, p < 0.001, Cohen''s dz = %.3f, 95%% CI [%.3f, %.3f]\n', ...
- df_lum, t_lum, dz_lum, dzL_lum, dzU_lum);
- else
- fprintf('t(%d) = %.2f, p = %.3f, Cohen''s dz = %.3f, 95%% CI [%.3f, %.3f]\n', ...
- df_lum, t_lum, p_lum, dz_lum, dzL_lum, dzU_lum);
- end
- fprintf('\n(2) All specular stats (multi-reg: contrast+coverage+sharpness) vs contrast-only:\n');
- if p_spec < 1e-3
- fprintf('t(%d) = %.2f, p < 0.001, Cohen''s dz = %.3f, 95%% CI [%.3f, %.3f]\n', ...
- df_spec, t_spec, dz_spec, dzL_spec, dzU_spec);
- else
- fprintf('t(%d) = %.2f, p = %.3f, Cohen''s dz = %.3f, 95%% CI [%.3f, %.3f]\n', ...
- df_spec, t_spec, p_spec, dz_spec, dzL_spec, dzU_spec);
- end
- fprintf('\n(3) One-layer (1 kernel) vs Three-layer (64 kernels):\n');
- if p_net < 1e-3
- fprintf('t(%d) = %.2f, p < 0.001, Cohen''s dz = %.3f, 95%% CI [%.3f, %.3f]\n', ...
- df_net, t_net, dz_net, dzL_net, dzU_net);
- else
- fprintf('t(%d) = %.2f, p = %.3f, Cohen''s dz = %.3f, 95%% CI [%.3f, %.3f]\n', ...
- df_net, t_net, p_net, dz_net, dzL_net, dzU_net);
- end
- function [deltaL, deltaU] = local_nct_delta_ci(tObs, df, alpha)
- % 100*(1-alpha)% CI for noncentrality parameter delta of noncentral t,
- % inverted from observed tObs (two-sided).
- %
- % Solve:
- % nctcdf(tObs; df, deltaL) = 1 - alpha/2
- % nctcdf(tObs; df, deltaU) = alpha/2
- if exist('nctcdf','file') ~= 2
- error('nctcdf not found. Requires Statistics and Machine Learning Toolbox.');
- end
- targetL = 1 - alpha/2; % 0.975
- targetU = alpha/2; % 0.025
- deltaL = local_solve_delta_robust(tObs, df, targetL);
- deltaU = local_solve_delta_robust(tObs, df, targetU);
- if deltaL > deltaU
- tmp = deltaL; deltaL = deltaU; deltaU = tmp;
- end
- end
- function delta = local_solve_delta_robust(tObs, df, target)
- % Robustly solve nctcdf(tObs; df, delta) = target for delta.
- % Avoids non-finite endpoints and uses a safe fallback if bracketing fails.
- fun = @(d) nctcdf(tObs, df, d) - target;
- % Start near a reasonable center; delta is typically on the order of tObs
- center = tObs;
- % Candidate bracket half-widths (grow gradually)
- widths = [0.5 1 2 5 10 20 50 100 200 500 1000 2000];
- lo = NaN; hi = NaN;
- flo = NaN; fhi = NaN;
- % Try to find a finite bracket with sign change
- for w = widths
- lo_c = center - w;
- hi_c = center + w;
- flo_c = fun(lo_c);
- fhi_c = fun(hi_c);
- if isfinite(flo_c) && isreal(flo_c) && isfinite(fhi_c) && isreal(fhi_c)
- if sign(flo_c) ~= sign(fhi_c)
- lo = lo_c; hi = hi_c;
- flo = flo_c; fhi = fhi_c;
- break;
- end
- end
- end
- % If still not bracketed, try asymmetric expansion (sometimes needed)
- if isnan(lo)
- for w = widths
- lo_c = center - w;
- hi_c = center + 5*w;
- flo_c = fun(lo_c);
- fhi_c = fun(hi_c);
- if isfinite(flo_c) && isreal(flo_c) && isfinite(fhi_c) && isreal(fhi_c)
- if sign(flo_c) ~= sign(fhi_c)
- lo = lo_c; hi = hi_c;
- flo = flo_c; fhi = fhi_c;
- break;
- end
- end
- end
- end
- % If we found a valid bracket, use fzero safely
- if ~isnan(lo)
- try
- delta = fzero(fun, [lo, hi]);
- return;
- catch
- % fall through to fallback
- end
- end
- % Fallback: bounded minimization of squared error on a safe delta range
- % (keeps code from crashing even in rare numeric corner cases)
- bound = 2000; % wide enough for typical cases, avoids nctcdf blowups
- obj = @(d) (fun(d)).^2;
- try
- delta = fminbnd(obj, center - bound, center + bound);
- catch
- % last resort: return center
- delta = center;
- end
- end
fig3_model_comparison.m at commit 884485d, under MIT · at the source
Overview
- Department of Psychology, Justus-Liebig-Universität Gießen, Giessen, Germany
- Department of Experimental Psychology, University of Oxford, Oxford, UK
- School of Psychology, University of Auckland, Auckland, New Zealand
Abstract
A key goal of visual neuroscience is to explain how our brains infer object properties such as colour, curvature or gloss. Here we used machine learning to identify computations underlying human gloss judgements—traditionally
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 19 matches between paragraphs and lines of code.
takuma929/gloss_tinynetworks
884485d02f73d1a9aa079d3355dc4c774d36c994, 6 February 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
40 files
- fig2_online_exp_results.
m , MATLAB, 313 lines, 2 matches - fig3_model_comparison.m, MATLAB, 532 lines, 3 matches
- fig4b_24kernels.m, MATLAB, 85 lines
- fig4c_4d_S7bc_S9c_analyz
e_kernel.m , MATLAB, 130 lines, 2 matches - fig4g_1kernel_fittingRes
ults.m , MATLAB, 126 lines, 1 match - fig4h_24kernel_fittingRe
sults.m , MATLAB, 180 lines - fig4i_region_of_max_acti
vation.m , MATLAB, 184 lines - fig5b_tSNEplot.m, MATLAB, 142 lines
- fig6_highlight_manipulat
ion.m , MATLAB, 101 lines, 3 matches - fig7_Serrano_dataset.m, MATLAB, 152 lines
- fig8_real_photographs.m, MATLAB, 220 lines, 1 match
- figS2ANDS3_make_thumbnai
ls.m , MATLAB, 65 lines - figS3b_lighting_colordis
tribution.m , MATLAB, 119 lines - figS4AND5_scatter_lighti
ng_shape.m , MATLAB, 179 lines - figS6_offlinevsonline.m, MATLAB, 218 lines
- figS7a_24kernels_groundt
ruth.m , MATLAB, 85 lines - figS8_effect_background.
m , MATLAB, 225 lines - figS9_texture_objects.m, MATLAB, 273 lines
- fit_kernel_gauss_ridges.
m , MATLAB, 212 lines - function/
MakeItS.m , MATLAB, 29 lines - function/
MakeItWls.m , MATLAB, 13 lines - function/
SRGBGammaUncorrect.m , MATLAB, 28 lines - function/
SRGBPrimaryToXYZ.m , MATLAB, 19 lines - function/
SToWls.m , MATLAB, 28 lines - function/
SplineCmf.m , MATLAB, 26 lines - function/
SplineRaw.m , MATLAB, 78 lines - function/
XYZToLab.m , MATLAB, 72 lines - function/
XYZToSRGBPrimary.m , MATLAB, 39 lines, 2 matches - function/
XYZToxyY.m , MATLAB, 20 lines - function/
XYZimgToSRGBimg.m , MATLAB, 7 lines - function/
brewermap.m , MATLAB, 535 lines - function/
gaussfitn.m , MATLAB, 233 lines - function/
gloss_spectraTotristimul , MATLAB, 55 linesusvals_400to720.m - function/
ticklengthcm.m , MATLAB, 23 lines - main.m, MATLAB, 79 lines
- process_onlinedata.m, MATLAB, 160 lines, 2 matches
- save_fig_parameters.m, MATLAB, 40 lines
- save_luminance_stats.m, MATLAB, 44 lines, 2 matches
- LICENSE, License, 21 lines
- README.md, Text, 121 lines
Hans1984/material-illumination-geometry
2e8dae1c7f6dd1a81b4b639c11ae79ed32156f8d, 27 April 2023Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
8 files
Zenodo 19511809
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
Code availability
All custom analysis codes used to reproduce figures in this Article are available via GitHub at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 44 scripts, each with its path and the digest of its content;
- 19 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data Availability Statement
All behavioural data, stimulus images and model data are available via GitHub at https://
All custom analysis codes used to reproduce figures in this Article are available via GitHub at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 2, 28 September 2026
- Publisher: n/a → Nature Portfolio
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 2 keywords, 5 MeSH terms, 3 funders, 58 references.
Cite
This paper
Morimoto, T., Akbarinia, A., Storrs, K. R., Cheeseman, J. R., Smithson, H. E., Gegenfurtner, K. R., & Fleming, R. W. (2026). Human gloss perception reproduced by tiny neural networks. Nature human behaviour, 10(7), 1340-1355. https://
BibTeX
@article{morimoto2026hum
author = {Morimoto, Takuma and Akbarinia, Arash and Storrs, Katherine R and Cheeseman, Jacob R and Smithson, Hannah E and Gegenfurtner, Karl R and Fleming, Roland W},
title = {{Human gloss perception reproduced by tiny neural networks}},
journal = {Nature human behaviour},
year = {2026},
month = may,
volume = {10},
number = {7},
pages = {1340--1355},
publisher = {Nature Portfolio},
issn = {2397-3374},
doi = {10.1038/
url = {https://
pmid = {42120903},
pmcid = {PMC13388104}
}
RIS
TY - JOUR
AU - Morimoto, Takuma
AU - Akbarinia, Arash
AU - Storrs, Katherine R
AU - Cheeseman, Jacob R
AU - Smithson, Hannah E
AU - Gegenfurtner, Karl R
AU - Fleming, Roland W
TI - Human gloss perception reproduced by tiny neural networks
T2 - Nature human behaviour
J2 - Nat Hum Behav
PY - 2026
DA - 2026/
VL - 10
IS - 7
SP - 1340
EP - 1355
SN - 2397-3374
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Human gloss perception reproduced by tiny neural networks",
"container-title": "Nature human behaviour",
"author": [
{
"family": "Morimoto",
"given": "Takuma"
},
{
"family": "Akbarinia",
"given": "Arash"
},
{
"family": "Storrs",
"given": "Katherine R"
},
{
"family": "Cheeseman",
"given": "Jacob R"
},
{
"family": "Smithson",
"given": "Hannah E"
},
{
"family": "Gegenfurtner",
"given": "Karl R"
},
{
"family": "Fleming",
"given": "Roland W"
}
],
"container-title-short":
"volume": "10",
"issue": "7",
"page": "1340-1355",
"DOI": "10.1038/
"PMID": "42120903",
"PMCID": "PMC13388104",
"ISSN": "2397-3374",
"publisher": "Nature Portfolio",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
12
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41562-023-01601-0
- Material category of visual objects computed from specular image structure.Journal: Nature human behaviourIn common: cognitive, 16 references
- [2] doi:10.1167/jov.22.7.6 [code]
- Identifying specular highlights: Insights from deep learning.Journal: Journal of visionIn common: cognitive, 11 references
- [3] doi:10.1073/pnas.2503088122 [code]
- Orientation fields predict human perception of 3D shape from shading.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: OpenCV, Image Processing Toolbox, Statistics and Machine Learning Toolbox, 3 other tools, cognitive, 5 references, author Roland W Fleming
- [4] doi:10.1364/josaa.479986
- Modeling surface color discrimination under different lighting environments using image chromatic statistics and convolutional neural networks.Journal: Journal of the Optical Society of America. A, Optics, image science, and visionIn common: 4 references, 2 authors
- [5] doi:10.1038/s42003-025-08474-1 [code]
- Human and artificial visual systems share a computational principle for transforming binocular disparity into depth representation.Journal: Communications biologyIn common: OpenCV, TensorFlow, Image Processing Toolbox, 5 other tools, 1 reference
- [6] doi:10.1038/s41467-025-61458-x [code]
- Computational models reveal that intuitive physics underlies visual processing of soft objects.Journal: Nature communicationsIn common: OpenCV, scikit-learn, pandas, 2 other tools, 3 references
- [7] doi:10.1126/sciadv.adj3906 [code]
- Reconstructing visual illusory experiences from human brain activity.Journal: Science advancesIn common: OpenCV, TensorFlow, Image Processing Toolbox, 4 other tools, 1 reference
- [8] doi:10.1038/s42003-026-09685-w [code]
- Achieving more human brain-like vision via human EEG representational alignment.Journal: Communications biologyIn common: OpenCV, TensorFlow, Statistics and Machine Learning Toolbox, 4 other tools, cognitive, 1 reference
- [9] doi:10.1038/s41467-024-45679-0 [code]
- Improved modeling of human vision by incorporating robustness to blur in convolutional neural networks.Journal: Nature communicationsIn common: OpenCV, TensorFlow, Image Processing Toolbox, 4 other tools, 1 reference
- [10] doi:10.7554/elife.90256 [code]
- Emergence of brain-like mirror-symmetric viewpoint tuning in convolutional neural networks.Journal: eLifeIn common: OpenCV, Image Processing Toolbox, Statistics and Machine Learning Toolbox, 3 other tools, 2 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 3 repositories of the authors' code, each at its verified commit and with its license, 44 scripts, and 19 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:ab4679967020ca2b…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41562-026-02445-0)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41562-026-02445-0.svg
:target: https://openscicode.org/badge/doi/10.1038/s41562-026-02445-0
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41562-026-02445-0"><img src="https://openscicode.org/badge/doi/10.1038/s41562-026-02445-0.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
- takuma929/gloss_tinynetworks: README.md on GitHub
- Hans1984/material-illumination-geometry: README.md on GitHub
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
