MCPcopy Create free account
hub / github.com/GitsSaikat/PyGen / load_image

Method load_image

data/AutoVison/context_code.py:28–33  ·  view source on GitHub ↗

Load and validate image

(self, img_path)

Source from the content-addressed store, hash-verified

26 return os.path.join(base_path, relative_path)
27
28 def load_image(self, img_path):
29 """Load and validate image"""
30 img = cv2.imread(img_path)
31 if img is None:
32 raise ValueError(f"Failed to load image from {img_path}")
33 return img
34
35 def preprocess_image(self, img, target_size=(224, 224)):
36 """Enhanced preprocessing pipeline"""

Callers 1

mainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected