-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel-comparison.html
More file actions
704 lines (603 loc) · 26.9 KB
/
Copy pathmodel-comparison.html
File metadata and controls
704 lines (603 loc) · 26.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Model Comparison | Artifactiq</title>
<meta name="description" content="Transparent comparison of Artifactiq models vs stock YOLOv8n using validation dataset with ground truth.">
<style>
:root {
--primary: #00d4ff;
--bg-dark: #0a0a12;
--bg-card: rgba(255, 255, 255, 0.03);
--border-color: rgba(255, 255, 255, 0.08);
--text: #e4e4e4;
--text-muted: #888;
--code-bg: #0d1117;
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg-dark);
color: var(--text);
line-height: 1.6;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border-color);
}
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; }
nav a { color: var(--text-muted); text-decoration: none; margin-left: 1.5rem; }
nav a:hover { color: var(--primary); }
h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.transparency-notice {
background: var(--code-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1rem;
margin-bottom: 2rem;
font-size: 0.85rem;
}
.transparency-notice h3 { color: var(--success); margin-bottom: 0.5rem; font-size: 0.9rem; }
.transparency-notice code { background: rgba(255,255,255,0.1); padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.8rem; }
/* Summary Cards */
.summary-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
.summary-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
}
.summary-card h3 {
font-size: 1rem;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.metric-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
.metric {
text-align: center;
}
.metric-value {
font-size: 1.5rem;
font-weight: 700;
}
.metric-label {
font-size: 0.75rem;
color: var(--text-muted);
}
/* Filters */
.filters {
display: flex;
gap: 1rem;
flex-wrap: wrap;
margin-bottom: 1.5rem;
padding: 1rem;
background: var(--bg-card);
border-radius: 8px;
}
.filter-group {
display: flex;
align-items: center;
gap: 0.5rem;
}
.filter-group label {
font-size: 0.8rem;
color: var(--text-muted);
}
.filter-group select, .filter-group input {
background: var(--code-bg);
border: 1px solid var(--border-color);
color: var(--text);
padding: 0.4rem 0.6rem;
border-radius: 4px;
font-size: 0.8rem;
}
/* Comparison Grid */
.comparison-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 1rem;
}
.comparison-card {
background: var(--bg-card);
border-radius: 12px;
overflow: hidden;
border: 1px solid var(--border-color);
}
.comparison-card.highlight-success { border-color: var(--success); }
.comparison-card.highlight-failure { border-color: var(--error); }
.card-image {
aspect-ratio: 16/10;
overflow: hidden;
background: #111;
position: relative;
}
.card-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.card-gt-badge {
position: absolute;
top: 0.5rem;
left: 0.5rem;
background: rgba(0,0,0,0.8);
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.7rem;
}
.card-header {
padding: 0.5rem 1rem;
font-size: 0.75rem;
color: var(--text-muted);
border-bottom: 1px solid var(--border-color);
font-family: monospace;
display: flex;
justify-content: space-between;
}
.card-results {
display: grid;
grid-template-columns: 1fr 1fr;
}
.model-result {
padding: 0.75rem;
border-right: 1px solid var(--border-color);
}
.model-result:last-child { border-right: none; }
.result-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 0.5rem;
margin-bottom: 0.5rem;
border-bottom: 1px solid var(--border-color);
font-size: 0.75rem;
}
.model-name { font-weight: 600; }
.eval-metrics {
display: flex;
gap: 0.5rem;
font-size: 0.65rem;
margin-bottom: 0.5rem;
}
.eval-metrics span {
padding: 0.15rem 0.4rem;
border-radius: 3px;
}
.tp { background: var(--success); color: #000; }
.fp { background: var(--error); color: #fff; }
.fn { background: var(--warning); color: #000; }
.result-detections {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
min-height: 1.5rem;
}
.detection-tag {
display: inline-block;
padding: 0.15rem 0.4rem;
border-radius: 4px;
font-size: 0.65rem;
color: white;
background: #6b7280;
}
.no-detections {
color: var(--text-muted);
font-size: 0.7rem;
font-style: italic;
}
.model-result.is-winner {
background: rgba(16, 185, 129, 0.08);
border-left: 3px solid var(--success);
}
.winner-badge {
color: var(--success);
font-size: 0.9rem;
margin-left: 0.3rem;
animation: pulse 2s infinite;
}
.tie-badge {
color: var(--text-muted);
font-size: 0.8rem;
margin-left: 0.3rem;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.gt-issue-badge {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: rgba(239, 68, 68, 0.9);
color: white;
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-size: 0.65rem;
font-weight: 600;
cursor: pointer;
}
.gt-issue-badge:hover {
background: rgba(239, 68, 68, 1);
}
.gt-issue-badge.medium {
background: rgba(245, 158, 11, 0.9);
color: black;
}
.gt-issue-badge.low {
background: rgba(107, 114, 128, 0.8);
}
.comparison-card.has-gt-issue {
border-color: var(--warning);
}
.comparison-card.has-gt-issue.high-severity {
border-color: var(--error);
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
margin-top: 2rem;
padding: 1rem;
}
.pagination button {
background: var(--primary);
color: var(--bg-dark);
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
}
.pagination button:disabled {
background: var(--text-muted);
cursor: not-allowed;
}
.loading { text-align: center; padding: 4rem; color: var(--text-muted); }
.error { text-align: center; padding: 2rem; color: var(--error); background: rgba(239, 68, 68, 0.1); border-radius: 8px; }
footer {
margin-top: 3rem;
padding-top: 2rem;
border-top: 1px solid var(--border-color);
text-align: center;
color: var(--text-muted);
font-size: 0.85rem;
}
@media (max-width: 768px) {
.comparison-grid { grid-template-columns: 1fr; }
.card-results { grid-template-columns: 1fr; }
.model-result { border-right: none; border-bottom: 1px solid var(--border-color); }
}
</style>
</head>
<body>
<div class="container">
<header>
<a href="/" class="logo">Artifactiq</a>
<nav>
<a href="/">Home</a>
<a href="/gt-audit.html">GT Audit</a>
<a href="https://github.com/ARTIFACTIQ">GitHub</a>
</nav>
</header>
<h1>Model Comparison</h1>
<p class="subtitle">Transparent comparison using validation dataset with ground truth labels</p>
<div class="transparency-notice">
<h3>🔍 Validation Set Comparison</h3>
<p>Results generated from <strong>700 randomly sampled images</strong> (10%) from the 7,570 image validation set.</p>
<p style="margin-top: 0.5rem;">
Ground truth labels enable honest evaluation: ✅ True Positives, ❌ False Positives, ⚠️ Missed Detections
</p>
<p style="margin-top: 0.5rem;">
<strong>Note:</strong> Some GT labels may be incorrect. See <a href="/gt-audit.html" style="color: var(--primary);">GT Audit</a> for flagged issues.
</p>
<p style="margin-top: 0.5rem;">
<strong>Regenerate:</strong> <code>python scripts/generate-val-comparison.py --sample-size 700</code>
</p>
</div>
<div id="comparison-container">
<div class="loading">Loading comparison data...</div>
</div>
<footer>
<p>Data: <code>src/data/val-comparison-results.json</code> | Seed: 42 (reproducible)</p>
<p>© 2026 Artifactiq. Committed to transparency in AI.</p>
</footer>
</div>
<script>
let allData = null;
let gtAuditData = null;
let gtIssuesByFile = {};
let currentPage = 0;
const PAGE_SIZE = 50;
// Dynamically find the Artifactiq model ID from loaded data
function getArtifactiqModelId() {
if (!allData?.models) return null;
return Object.keys(allData.models).find(id => id.startsWith('artifactiq_'));
}
function getArtifactiqModelName() {
const id = getArtifactiqModelId();
return id ? (allData.models[id]?.name || id) : 'Artifactiq';
}
// Get GT issues for a specific filename
function getGtIssues(filename) {
return gtIssuesByFile[filename] || null;
}
async function loadComparison() {
const container = document.getElementById('comparison-container');
try {
// Load both comparison data and GT audit data in parallel
const [compResponse, auditResponse] = await Promise.all([
fetch('src/data/val-comparison-results.json'),
fetch('src/data/gt-audit-results.json').catch(() => null)
]);
if (!compResponse.ok) throw new Error(`HTTP ${compResponse.status}`);
allData = await compResponse.json();
// Load GT audit data if available
if (auditResponse?.ok) {
gtAuditData = await auditResponse.json();
// Index by filename for quick lookup
(gtAuditData.flagged_images || []).forEach(img => {
gtIssuesByFile[img.filename] = img;
});
}
renderComparison(container);
} catch (error) {
container.innerHTML = `<div class="error"><p><strong>Failed to load</strong></p><p>${error.message}</p></div>`;
}
}
function renderComparison(container) {
const models = allData.models || {};
const summary = allData.summary || {};
const config = allData.benchmark_config || {};
let html = `
<div class="summary-grid">
${Object.entries(models).map(([id, model]) => `
<div class="summary-card" style="border-left: 4px solid ${model.color}">
<h3 style="color: ${model.color}">
${model.name}
${model.is_current ? '<span style="background: var(--success); color: #000; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.6rem;">CURRENT</span>' : ''}
</h3>
<div class="metric-grid">
<div class="metric">
<div class="metric-value" style="color: ${model.color}">${summary[id]?.total_detections || 0}</div>
<div class="metric-label">Detections</div>
</div>
<div class="metric">
<div class="metric-value" style="color: var(--success)">${((summary[id]?.precision || 0) * 100).toFixed(1)}%</div>
<div class="metric-label">Precision</div>
</div>
<div class="metric">
<div class="metric-value" style="color: var(--warning)">${((summary[id]?.recall || 0) * 100).toFixed(1)}%</div>
<div class="metric-label">Recall</div>
</div>
</div>
<div style="margin-top: 1rem; font-size: 0.75rem; color: var(--text-muted);">
TP: ${summary[id]?.true_positives || 0} | FP: ${summary[id]?.false_positives || 0} | FN: ${summary[id]?.false_negatives || 0} | F1: ${((summary[id]?.f1 || 0) * 100).toFixed(1)}%
</div>
${model.known_issue ? `<div style="margin-top: 0.5rem; font-size: 0.7rem; color: var(--warning);">⚠️ ${model.known_issue}</div>` : ''}
</div>
`).join('')}
</div>
<div class="filters">
<div class="filter-group">
<label>Show:</label>
<select id="filter-type" onchange="renderPage()">
<option value="all">All Images</option>
<option value="artifactiq_better">${getArtifactiqModelName()} Better</option>
<option value="stock_better">Stock Better</option>
<option value="both_detect">Both Detect</option>
<option value="artifactiq_only">${getArtifactiqModelName()} Only</option>
<option value="gt_issues">GT Issues Only</option>
</select>
</div>
<div class="filter-group">
<label>Page Size:</label>
<select id="page-size" onchange="changePageSize()">
<option value="25">25</option>
<option value="50" selected>50</option>
<option value="100">100</option>
</select>
</div>
<div style="margin-left: auto; font-size: 0.8rem; color: var(--text-muted);">
${config.sample_size} images | conf ≥ ${(config.confidence_threshold * 100).toFixed(0)}% | <a href="/gt-audit.html" style="color: var(--warning);">${Object.keys(gtIssuesByFile).length} GT issues</a>
</div>
</div>
<div id="image-grid" class="comparison-grid"></div>
<div id="pagination" class="pagination"></div>
`;
container.innerHTML = html;
renderPage();
}
function getFilteredImages() {
const filterType = document.getElementById('filter-type')?.value || 'all';
let images = allData.images || [];
const artifactiqId = getArtifactiqModelId();
if (filterType === 'artifactiq_better') {
images = images.filter(img => {
const artifactiq = img.results?.[artifactiqId]?.evaluation;
const stock = img.results?.stock_yolov8n?.evaluation;
return artifactiq && stock && (artifactiq.recall > stock.recall || artifactiq.precision > stock.precision);
});
} else if (filterType === 'stock_better') {
images = images.filter(img => {
const artifactiq = img.results?.[artifactiqId]?.evaluation;
const stock = img.results?.stock_yolov8n?.evaluation;
return artifactiq && stock && stock.recall > artifactiq.recall && stock.true_positives > artifactiq.true_positives;
});
} else if (filterType === 'both_detect') {
images = images.filter(img => {
const artifactiqCount = img.results?.[artifactiqId]?.count || 0;
const stock = img.results?.stock_yolov8n?.count || 0;
return artifactiqCount > 0 && stock > 0;
});
} else if (filterType === 'artifactiq_only') {
images = images.filter(img => {
const artifactiqCount = img.results?.[artifactiqId]?.count || 0;
return artifactiqCount > 0;
});
} else if (filterType === 'gt_issues') {
images = images.filter(img => {
const issues = getGtIssues(img.filename);
if (!issues) return false;
const highCount = issues.issues?.filter(i => i.severity === 'high').length || 0;
const medCount = issues.issues?.filter(i => i.severity === 'medium').length || 0;
return highCount > 0 || medCount > 0;
});
}
return images;
}
function renderPage() {
const images = getFilteredImages();
const pageSize = parseInt(document.getElementById('page-size')?.value || PAGE_SIZE);
const totalPages = Math.ceil(images.length / pageSize);
currentPage = Math.min(currentPage, totalPages - 1);
currentPage = Math.max(0, currentPage);
const start = currentPage * pageSize;
const pageImages = images.slice(start, start + pageSize);
const grid = document.getElementById('image-grid');
const models = allData.models || {};
grid.innerHTML = pageImages.map(img => renderImageCard(img, models)).join('');
document.getElementById('pagination').innerHTML = `
<button onclick="prevPage()" ${currentPage === 0 ? 'disabled' : ''}>← Previous</button>
<span>Page ${currentPage + 1} of ${totalPages} (${images.length} images)</span>
<button onclick="nextPage()" ${currentPage >= totalPages - 1 ? 'disabled' : ''}>Next →</button>
`;
}
function getWinner(img) {
const artifactiqId = getArtifactiqModelId();
const artifactiq = img.results?.[artifactiqId];
const stock = img.results?.stock_yolov8n;
const gtClasses = img.ground_truth?.classes || [];
if (!artifactiq?.evaluation || !stock?.evaluation) return null;
const aEval = artifactiq.evaluation;
const sEval = stock.evaluation;
// Check if Artifactiq detected any GT class (domain-specific match)
const artifactiqDetections = artifactiq.detections || [];
const stockDetections = stock.detections || [];
const artifactiqMatchesGT = artifactiqDetections.some(det =>
gtClasses.some(gt => gt.toLowerCase() === det.label.toLowerCase())
);
// Stock detects generic COCO classes (person, etc.) - not domain-specific
// If Artifactiq matches GT class and has TPs, prefer it
if (artifactiqMatchesGT && (aEval.true_positives || 0) > 0) {
// Artifactiq detected the actual domain class
// Only lose if Stock has significantly better metrics AND no FN
if ((sEval.true_positives || 0) > (aEval.true_positives || 0) &&
(sEval.false_negatives || 0) === 0 &&
(sEval.false_positives || 0) < (aEval.false_positives || 0)) {
return 'stock_yolov8n';
}
return artifactiqId;
}
// Fallback: compare by TP count, then by fewer FPs
const aTp = aEval.true_positives || 0;
const sTp = sEval.true_positives || 0;
if (aTp > sTp) return artifactiqId;
if (sTp > aTp) return 'stock_yolov8n';
// Same TPs: fewer FPs wins
const aFp = aEval.false_positives || 0;
const sFp = sEval.false_positives || 0;
if (aFp < sFp) return artifactiqId;
if (sFp < aFp) return 'stock_yolov8n';
return 'tie';
}
function renderImageCard(img, models) {
const gt = img.ground_truth || {};
const winner = getWinner(img);
// Check for GT issues
const gtIssues = getGtIssues(img.filename);
const hasGtIssue = gtIssues !== null;
const highCount = gtIssues?.issues?.filter(i => i.severity === 'high').length || 0;
const medCount = gtIssues?.issues?.filter(i => i.severity === 'medium').length || 0;
const maxSeverity = highCount > 0 ? 'high' : (medCount > 0 ? 'medium' : 'low');
// GT issue badge
let gtIssueBadge = '';
if (hasGtIssue && (highCount > 0 || medCount > 0)) {
const badgeClass = highCount > 0 ? '' : 'medium';
const issueText = highCount > 0 ? `${highCount} GT issue${highCount > 1 ? 's' : ''}` : `${medCount} GT issue${medCount > 1 ? 's' : ''}`;
gtIssueBadge = `<a href="/gt-audit.html" class="gt-issue-badge ${badgeClass}" title="Click to view GT audit details">${issueText}</a>`;
}
const cardClasses = ['comparison-card'];
if (hasGtIssue && highCount > 0) cardClasses.push('has-gt-issue', 'high-severity');
else if (hasGtIssue && medCount > 0) cardClasses.push('has-gt-issue');
return `
<div class="${cardClasses.join(' ')}">
<div class="card-image">
<img src="images/val/${img.filename}" alt="${img.filename}" loading="lazy"
onerror="this.parentElement.innerHTML='<div style=\\'padding:2rem;text-align:center;color:var(--text-muted)\\'>Image not available</div>'">
<div class="card-gt-badge">GT: ${gt.count || 0} objects</div>
${gtIssueBadge}
</div>
<div class="card-header">
<span>${img.filename}</span>
<span>${gt.classes?.slice(0,3).join(', ') || 'Unknown'}${gt.classes?.length > 3 ? '...' : ''}</span>
</div>
<div class="card-results">
${Object.entries(models).map(([id, model]) => renderModelResult(id, img.results?.[id], model, winner)).join('')}
</div>
</div>
`;
}
function renderModelResult(modelId, result, config, winner) {
if (!result) return `<div class="model-result"><span class="no-detections">No data</span></div>`;
const eval_ = result.evaluation || {};
const detections = result.detections || [];
const isWinner = winner === modelId;
const isTie = winner === 'tie';
// Winner indicator styles
const winnerBadge = isWinner
? '<span class="winner-badge" title="Better on this image">▲</span>'
: (isTie ? '<span class="tie-badge" title="Tie">=</span>' : '');
return `
<div class="model-result ${isWinner ? 'is-winner' : ''}">
<div class="result-header">
<span class="model-name" style="color: ${config?.color || '#888'}">${config?.name || modelId} ${winnerBadge}</span>
<span>${result.count} det</span>
</div>
<div class="eval-metrics">
<span class="tp">✓${eval_.true_positives || 0}</span>
<span class="fp">✗${eval_.false_positives || 0}</span>
<span class="fn">?${eval_.false_negatives || 0}</span>
</div>
<div class="result-detections">
${detections.length === 0 ? '<span class="no-detections">No detections</span>' : ''}
${detections.slice(0, 5).map(det => `
<span class="detection-tag">${det.label} ${(det.confidence * 100).toFixed(0)}%</span>
`).join('')}
${detections.length > 5 ? `<span class="no-detections">+${detections.length - 5}</span>` : ''}
</div>
</div>
`;
}
function prevPage() { currentPage--; renderPage(); window.scrollTo(0, 400); }
function nextPage() { currentPage++; renderPage(); window.scrollTo(0, 400); }
function changePageSize() { currentPage = 0; renderPage(); }
document.addEventListener('DOMContentLoaded', loadComparison);
</script>
</body>
</html>