UOMOP

Performance (Patch size = 1) 본문

DE/Performance

Performance (Patch size = 1)

Happy PinGu 2024. 8. 8. 14:20
% SNRdB 값 설정
snrdb = [0, 10, 20, 30, 40];

% PSNR 값 데이터 초기화
data.NoMasking = struct('x1024', [19.958 25.263 28.937 31.97 33.79], ...
                        'x512', [19.051 23.277 26.696 29.33 29.956], ...
                        'x256', [17.897 21.718 24.645 26.202 26.54]);

data.CBM = struct('x1024', struct('x0_23', [20.571 24.169 28.232 31.348 33.606], ...
                                 'x0_43', [20.712 24.653 28.559 30.781 31.319], ...
                                 'x0_60', [20.285 24.944 27.661 29.117 29.512]), ...
                  'x512', struct('x0_23', [19.217 23.697 27.224 29.638 30.248], ...
                                'x0_43', [19.258 23.562 27.116 29.158 29.751], ...
                                'x0_60', [19.1 23.6 26.321 28.088 28.509]), ...
                  'x256', struct('x0_23', [17.876 21.912 24.52 26.171 26.468], ...
                                'x0_43', [17.91 22.063 24.674 26.07 26.432], ...
                                'x0_60', [17.866 21.789 24.283 25.614 25.858]));

data.Random = struct('x1024', struct('x0_23', [20.379 24.214 27.712 29.804 30.584], ...
                                    'x0_43', [20.291 23.643 25.686 26.67 26.983], ...
                                    'x0_60', [19.862 22.547 23.614 24.074 24.02]), ...
                     'x512', struct('x0_23', [19.06 23.436 26.465 28.388 28.764], ...
                                   'x0_43', [19.017 22.658 25.276 26.423 26.69], ...
                                   'x0_60', [18.881 21.837 23.421 23.951 24.138]), ...
                     'x256', struct('x0_23', [17.743 21.85 24.343 25.644 25.973], ...
                                   'x0_43', [17.765 21.488 23.754 24.826 25.05], ...
                                   'x0_60', [17.702 20.984 22.811 23.532 23.667]));

data.TopK = struct('x1024', struct('x0_23', [20.294 24.557 28.052 30.158 31.582], ...
                                  'x0_43', [19.802 23.486 25.789 26.832 27.157], ...
                                  'x0_60', [19.584 21.988 23.333 23.487 23.611]), ...
                   'x512', struct('x0_23', [19.021 23.538 26.53 28.361 29.082], ...
                                 'x0_43', [18.752 22.448 25.165 26.308 26.629], ...
                                 'x0_60', [18.531 21.308 22.995 23.347 23.388]), ...
                   'x256', struct('x0_23', [17.798 21.742 24.405 25.631 25.961], ...
                                 'x0_43', [17.723 21.307 23.583 24.637 24.768], ...
                                 'x0_60', [17.517 20.546 22.154 22.709 22.833]));

data.CPM = struct('x1024', struct('x0_23', [20.385 24.516 27.771 29.499 30.499], ...
                                 'x0_43', [19.93 23.309 25.152 25.883 26], ...
                                 'x0_60', [19.583 21.423 22.326 22.45 22.457]), ...
                  'x512', struct('x0_23', [18.973 23.079 26.312 28.223 28.657], ...
                                'x0_43', [18.861 22.527 24.635 25.664 25.831], ...
                                'x0_60', [18.536 21.006 22.06 22.343 22.504]), ...
                  'x256', struct('x0_23', [17.765 21.854 24.27 25.605 25.932], ...
                                'x0_43', [17.711 21.303 23.448 24.442 24.669], ...
                                'x0_60', [17.565 20.395 21.7 22.222 22.356]));

data.PPM = struct('x1024', struct('x0_23', [19.497 21.737 22.686 22.882 22.961], ...
                                 'x0_43', [17.333 18.345 18.688 18.77 18.764], ...
                                 'x0_60', [16.201 16.925 17.101 17.164 17.159]), ...
                  'x512', struct('x0_23', [18.363 20.991 22.411 22.831 22.978], ...
                                'x0_43', [16.962 18.133 18.637 18.813 18.834], ...
                                'x0_60', [16.025 16.827 17.074 17.157 17.18]), ...
                  'x256', struct('x0_23', [17.458 20.349 21.861 22.42 22.569], ...
                                'x0_43', [16.453 17.884 18.578 18.757 18.806], ...
                                'x0_60', [15.764 16.671 17.041 17.159 17.149]));

% 사용자가 원하는 DIM과 MR 값을 입력합니다.
dim = 512;
mr = 0.23;

% 데이터 선택
noMasking = data.NoMasking.(['x', num2str(dim)]);
field_name = ['x0_', sprintf('%02d', mr*100)];  % 필드 이름을 0_60으로 만듭니다.
cbm = data.CBM.(['x', num2str(dim)]).(field_name);
rm = data.Random.(['x', num2str(dim)]).(field_name);
topk = data.TopK.(['x', num2str(dim)]).(field_name);
cpm = data.CPM.(['x', num2str(dim)]).(field_name);
ppm = data.PPM.(['x', num2str(dim)]).(field_name);

% 그래프 그리기
figure;
hold on;
plot(snrdb, noMasking, '-d', 'Color', 'k', 'LineWidth', 2, 'DisplayName', 'No masking');
plot(snrdb, cbm, '-*', 'Color', 'r', 'LineWidth', 2, 'MarkerSize', 8, 'DisplayName', 'Proposed');
plot(snrdb, rm, '-^', 'LineWidth', 2, 'DisplayName', 'Random');
plot(snrdb, topk, '-d', 'LineWidth', 2, 'DisplayName', 'TopK');
plot(snrdb, cpm, '-x', 'LineWidth', 2, 'DisplayName', 'Central');
plot(snrdb, ppm, '-+', 'LineWidth', 2, 'DisplayName', 'Periphery');
hold off;
xlabel('SNR (dB)');
ylabel('PSNR (dB)');
legend('show', 'Location', 'southeast');
xticks([0 10 20 30 40]);
ylim([0 40]);
grid on;

'DE > Performance' 카테고리의 다른 글

Performance graph  (0) 2024.08.26
Lv.4 Dynamic encoder (Proposed, TopK, Random) performance  (0) 2024.08.26
DE dim = 256  (0) 2024.08.20
Dynamic encoder performance  (0) 2024.08.20
Performance (Patch size = 2)  (0) 2024.08.08
Comments