fix(ocr-pipeline): dewarp visibility, grid on both sides, session persistence

- Fix dewarp method selection: prefer methods with >5px curvature over
  higher confidence (vertical_edge 79px was being ignored for text_baseline 2px)
- Add grid overlay on left image in Dewarp step for side-by-side comparison
- Add GET /sessions/{id} endpoint to reload session data
- StepDeskew accepts sessionId prop to restore state when navigating back
- SessionInfo type extended with optional deskew_result and dewarp_result

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-02-26 17:29:53 +01:00
parent 44e8c573af
commit 9df745574b
7 changed files with 95 additions and 12 deletions

View File

@@ -49,7 +49,7 @@ export default function OcrPipelinePage() {
const renderStep = () => {
switch (currentStep) {
case 0:
return <StepDeskew onNext={handleDeskewComplete} />
return <StepDeskew sessionId={sessionId} onNext={handleDeskewComplete} />
case 1:
return <StepDewarp sessionId={sessionId} onNext={handleNext} />
case 2:

View File

@@ -13,6 +13,8 @@ export interface SessionInfo {
image_width: number
image_height: number
original_image_url: string
deskew_result?: DeskewResult
dewarp_result?: DewarpResult
}
export interface DeskewResult {