UOMOP

Performance (Patch size = 2) 본문

DE/Performance

Performance (Patch size = 2)

Happy PinGu 2024. 8. 8. 14:09
% 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.485 25.515 29.246 32.048 33.168], ...
                                 'x0_43', [20.518 24.982 27.059 28.321 28.631], ...
                                 'x0_60', [20.329 23.796 25.876 26.659 26.828]), ...
                  'x512', struct('x0_23', [19.152 23.562 27.133 29.211 29.769], ...
                                'x0_43', [19.017 23.386 26.096 27.657 27.994], ...
                                'x0_60', [18.961 22.857 25.255 26.362 26.671]), ...
                  'x256', struct('x0_23', [17.863 21.942 24.596 26.058 26.358], ...
                                'x0_43', [17.833 21.91 24.313 25.544 25.788], ...
                                'x0_60', [17.769 21.62 23.765 24.816 25.051]));

data.Random = struct('x1024', struct('x0_23', [20.342 23.972 26.617 28.047 28.366], ...
                                    'x0_43', [19.905 22.522 23.881 24.335 24.433], ...
                                    'x0_60', [19.296 20.982 21.559 21.736 21.76]), ...
                     'x512', struct('x0_23', [18.958 22.733 25.703 27.094 27.472], ...
                                   'x0_43', [18.717 21.862 23.6 24.265 24.396], ...
                                   'x0_60', [18.455 20.529 21.436 21.711 21.745]), ...
                     'x256', struct('x0_23', [17.701 21.546 23.866 25.071 25.311], ...
                                   'x0_43', [17.67 21.05 22.751 23.506 23.67], ...
                                   'x0_60', [17.483 20.08 21.174 21.622 21.677]));

data.TopK = struct('x1024', struct('x0_23', [20.12 24.441 28.831 30.555 31.808], ...
                                  'x0_43', [19.88 23.447 25.613 26.515 26.774], ...
                                  'x0_60', [19.287 21.278 22.794 22.963 23.001]), ...
                   'x512', struct('x0_23', [19.02 23.128 26.591 28.665 29.099], ...
                                 'x0_43', [18.842 22.486 24.881 25.968 26.271], ...
                                 'x0_60', [18.433 21.168 22.475 22.9 22.931]), ...
                   'x256', struct('x0_23', [17.767 21.659 24.309 25.718 26.026], ...
                                 'x0_43', [17.632 21.276 23.472 24.401 24.646], ...
                                 'x0_60', [17.359 20.22 21.787 22.32 22.421]));

data.CPM = struct('x1024', struct('x0_23', [20.358 23.972 26.496 27.835 28.123], ...
                                 'x0_43', [19.699 22.07 23.399 23.783 23.823], ...
                                 'x0_60', [18.563 19.795 20.354 20.47 20.499]), ...
                  'x512', struct('x0_23', [18.808 22.772 25.435 26.999 27.277], ...
                                'x0_43', [18.441 21.36 22.966 23.61 23.719], ...
                                'x0_60', [17.905 19.593 20.277 20.452 20.516]), ...
                  'x256', struct('x0_23', [17.654 21.488 23.891 25.045 25.276], ...
                                'x0_43', [17.602 20.663 22.313 22.972 23.121], ...
                                'x0_60', [17.165 19.129 20.091 20.375 20.457]));

data.PPM = struct('x1024', struct('x0_23', [20.206 23.684 25.801 26.795 27.097], ...
                                 'x0_43', [19.391 21.204 21.984 22.242 22.287], ...
                                 'x0_60', [17.838 18.775 19.205 19.278 19.296]), ...
                  'x512', struct('x0_23', [18.996 22.582 25.016 26.274 26.563], ...
                                'x0_43', [18.468 20.824 21.835 22.184 22.242], ...
                                'x0_60', [17.381 18.598 19.133 19.277 19.292]), ...
                  'x256', struct('x0_23', [17.727 21.139 23.618 24.627 24.854], ...
                                'x0_43', [17.496 20.152 21.441 21.94 22.105], ...
                                'x0_60', [16.792 18.311 19.012 19.241 19.284]));

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

% 데이터 선택
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 = 1)  (0) 2024.08.08
Comments