File size: 2,165 Bytes
b5af7d6
 
 
 
 
 
f65c627
 
b5af7d6
 
 
 
 
 
 
 
f65c627
b5af7d6
 
 
 
 
 
 
 
 
 
 
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
import React from 'react';

export default function ReviewSummary({metrics}) {
  const score = metrics.match_support_percent;
  return <section className="review-summary" aria-live="polite">
    <h2>{metrics.status_label}</h2>
    <p><strong>Alignment accuracy: not independently measured</strong></p>
    <p className="note">Alignment mode: {metrics.engine === 'learned_experimental' ? 'Learned iris alignment' : metrics.engine === 'classical' ? 'Standard' : 'Not recorded'}.</p>
    <p className="note">{metrics.score_description}</p>
    {metrics.reason && <p>{metrics.reason}</p>}
    {metrics.evaluation && <section><h2>Automatic consistency</h2>
      <p className="note">{metrics.evaluation.description}</p>
      <p className="note">Patch-verified matches: {metrics.verified_matches} / {metrics.raw_matches ?? metrics.matches}. Only this subset is evaluated; it is not the percentage of the iris aligned.</p>
      {metrics.evaluation.within_px_percent ? <table><thead><tr><th>Pixel tolerance</th><th>Held-out matches within tolerance</th></tr></thead><tbody>{Object.entries(metrics.evaluation.within_px_percent).map(([px,percent])=><tr key={px}><td>{px} px</td><td>{percent.toFixed(2)}%</td></tr>)}</tbody></table> : <p>{metrics.evaluation.reason}</p>}
    </section>}
    <dl>
      <dt>Global match support (not accuracy)</dt><dd>{score == null ? 'Not measurable' : `${score.toFixed(1)}%`}</dd>
      <dt>Consistent / proposed matches</dt><dd>{metrics.inliers ?? '—'} / {metrics.matches ?? 0}</dd>
      {metrics.fit_error_px != null && <><dt>Median fitting error (not independent accuracy)</dt><dd>{metrics.fit_error_px.toFixed(2)} px</dd></>}
      <dt>Processing time</dt><dd>{metrics.runtime_seconds.toFixed(2)} s</dd>
      <dt>Output area including second-image pixels</dt><dd>{(metrics.blended_fraction * 100).toFixed(1)}%</dd>
    </dl>
    <p className="note">{metrics.warning}</p>
    <h2>Next steps</h2>
    <ul>{metrics.suggestions.map(s => <li key={s}>{s}</li>)}</ul>
    <a download="alignment-review.json" href={'data:application/json,' + encodeURIComponent(JSON.stringify(metrics, null, 2))}>Download review details</a>
  </section>;
}