Spaces:
Build error
Build error
Upload processor/pipeline.py with huggingface_hub
Browse files- processor/pipeline.py +1 -5
processor/pipeline.py
CHANGED
|
@@ -1,13 +1,12 @@
|
|
| 1 |
from .bg_removal import remove_background_and_crop
|
| 2 |
from .upscale import upscale_image
|
| 3 |
-
|
| 4 |
|
| 5 |
def run_card_pipeline(image_bytes: bytes):
|
| 6 |
"""
|
| 7 |
Executes the full image processing pipeline.
|
| 8 |
1. Background Removal & Tight Crop
|
| 9 |
2. AI Upscaling
|
| 10 |
-
3. OCR Redaction
|
| 11 |
Returns the final processed OpenCV BGR image.
|
| 12 |
"""
|
| 13 |
# 1. Background removal and tight crop
|
|
@@ -16,7 +15,4 @@ def run_card_pipeline(image_bytes: bytes):
|
|
| 16 |
# 2. Upscale image
|
| 17 |
img = upscale_image(img)
|
| 18 |
|
| 19 |
-
# 3. Redact Names (Disabled for now per user feedback)
|
| 20 |
-
# img = redact_names(img)
|
| 21 |
-
|
| 22 |
return img
|
|
|
|
| 1 |
from .bg_removal import remove_background_and_crop
|
| 2 |
from .upscale import upscale_image
|
| 3 |
+
|
| 4 |
|
| 5 |
def run_card_pipeline(image_bytes: bytes):
|
| 6 |
"""
|
| 7 |
Executes the full image processing pipeline.
|
| 8 |
1. Background Removal & Tight Crop
|
| 9 |
2. AI Upscaling
|
|
|
|
| 10 |
Returns the final processed OpenCV BGR image.
|
| 11 |
"""
|
| 12 |
# 1. Background removal and tight crop
|
|
|
|
| 15 |
# 2. Upscale image
|
| 16 |
img = upscale_image(img)
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
return img
|