pavankm96 commited on
Commit
ee26137
·
verified ·
1 Parent(s): fb70265

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -1
pipeline.py CHANGED
@@ -11,7 +11,7 @@ class BrainTumorDetectionPipeline(Pipeline):
11
  def preprocess(self, images: list):
12
  processed_images = []
13
  for image in images:
14
- image = Image.open(image).resize((224, 224)) # Resize to model input size
15
  image = np.array(image) / 255.0 # Normalize the image
16
  processed_images.append(np.expand_dims(image, axis=0)) # Add batch dimension
17
  return np.vstack(processed_images) # Stack for batch processing
 
11
  def preprocess(self, images: list):
12
  processed_images = []
13
  for image in images:
14
+ image = Image.open(image).resize((128, 128)) # Resize to model input size
15
  image = np.array(image) / 255.0 # Normalize the image
16
  processed_images.append(np.expand_dims(image, axis=0)) # Add batch dimension
17
  return np.vstack(processed_images) # Stack for batch processing