Spaces:
Paused
Paused
Download frontend/src/ReviewSummary.jsx from modventures/iris: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/spaces/modventures/iris/resolve/main/frontend/src/ReviewSummary.jsx
- Command line
-
hf download hf://spaces/modventures/iris/frontend/src/ReviewSummary.jsx
-
curl -L -o ReviewSummary.jsx https://huggingface.co/spaces/modventures/iris/resolve/main/frontend/src/ReviewSummary.jsx
2.17 kB
| 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>; | |
| } | |