Upload 7 files
Browse files
main.py
CHANGED
|
@@ -44,7 +44,7 @@ def crop_image(model, original_image):
|
|
| 44 |
|
| 45 |
Inputs:
|
| 46 |
model (YOLO): The YOLO model used for object detection.
|
| 47 |
-
|
| 48 |
|
| 49 |
Returns:
|
| 50 |
PIL.Image: The cropped image containing the detected table.
|
|
@@ -70,10 +70,11 @@ def process_image(model, image):
|
|
| 70 |
Process the uploaded image with YOLO model and draw bounding boxes with class-specific colors.
|
| 71 |
|
| 72 |
Inputs:
|
| 73 |
-
|
| 74 |
-
|
|
|
|
| 75 |
Returns:
|
| 76 |
-
|
| 77 |
"""
|
| 78 |
colors = {'title': (255, 0, 0),
|
| 79 |
'text': (0, 255, 0),
|
|
|
|
| 44 |
|
| 45 |
Inputs:
|
| 46 |
model (YOLO): The YOLO model used for object detection.
|
| 47 |
+
original_image (PIL.image): The image to be processed.
|
| 48 |
|
| 49 |
Returns:
|
| 50 |
PIL.Image: The cropped image containing the detected table.
|
|
|
|
| 70 |
Process the uploaded image with YOLO model and draw bounding boxes with class-specific colors.
|
| 71 |
|
| 72 |
Inputs:
|
| 73 |
+
model: The trained YOLO model
|
| 74 |
+
image: The image file uploaded through Streamlit.
|
| 75 |
+
|
| 76 |
Returns:
|
| 77 |
+
PIL.Image: The processed image with bounding boxes and labels.
|
| 78 |
"""
|
| 79 |
colors = {'title': (255, 0, 0),
|
| 80 |
'text': (0, 255, 0),
|