dschandra commited on
Commit
9de87c3
·
verified ·
1 Parent(s): 3808896

Create image_processing.py

Browse files
Files changed (1) hide show
  1. 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