Create image_processing.py
Browse files- image_processing.py +8 -0
image_processing.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from PIL import Image
|
| 2 |
+
|
| 3 |
+
def preprocess_image(image):
|
| 4 |
+
"""
|
| 5 |
+
Preprocess the input image for food recognition.
|
| 6 |
+
"""
|
| 7 |
+
image = image.resize((224, 224)) # Resize for model compatibility
|
| 8 |
+
return image
|