askakalsky commited on
Commit
075e3dd
·
verified ·
1 Parent(s): 90ec8e7

Upload pipeline.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -2
pipeline.py CHANGED
@@ -90,7 +90,7 @@ class PassportOCR:
90
  "error": "ROI not detected",
91
  }
92
 
93
- roi_crop = crop_roi(img_bgr, box, padding=0.05)
94
 
95
  # -- Preprocess --------------------------------------------------------
96
  roi_clean = preprocess(roi_crop)
@@ -127,7 +127,7 @@ def _show_result(img_bgr: np.ndarray, result: dict) -> None:
127
  axes[0].axis("off")
128
 
129
  if box:
130
- roi = crop_roi(img_bgr, box, padding=0.05)
131
  roi_clean = preprocess(roi)
132
  axes[1].imshow(roi_clean, cmap="gray")
133
  label = result.get("full") or "NOT DETECTED"
 
90
  "error": "ROI not detected",
91
  }
92
 
93
+ roi_crop = crop_roi(img_bgr, box, padding=0.0)
94
 
95
  # -- Preprocess --------------------------------------------------------
96
  roi_clean = preprocess(roi_crop)
 
127
  axes[0].axis("off")
128
 
129
  if box:
130
+ roi = crop_roi(img_bgr, box, padding=0.0)
131
  roi_clean = preprocess(roi)
132
  axes[1].imshow(roi_clean, cmap="gray")
133
  label = result.get("full") or "NOT DETECTED"