tensorflow/models · error · FileNotFoundError
Image not found at {image_path}
Error message
Image not found at {image_path} What it means
Error "Image not found at {image_path}" thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/Deploy/detr_cloud_deployment/client/triton_server_inference.py:132
def _get_input_batch_for_inference(self, image_path: str) -> np.ndarray:
"""Preprocesses an image for Triton inference.
Loads an image, resizes it, converts it to RGB, normalizes pixel values,
and transposes it to the channel-first format expected by the model.
Args:
image_path: The path to the input image file.
Returns:
A numpy array representing the preprocessed image, ready for inference.
Raises:
FileNotFoundError: If the image file does not exist.
"""
original_image = cv2.imread(image_path)
if original_image is None:
raise FileNotFoundError(f'Image not found at {image_path}')
rgb_image = cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB)
resized_image = cv2.resize(
rgb_image, self.input_size, interpolation=cv2.INTER_AREA
)
# Normalize: (pixel / 255 - mean) / std
float_image = resized_image.astype(np.float32) / 255.0
normalized_image = (float_image - self.means) / self.stds
# Transpose to CHW and add batch dimension
transposed_image = np.transpose(normalized_image, (2, 0, 1))
batched_image = np.expand_dims(transposed_image, axis=0).astype(np.float32)
return batched_image
def _reformat_triton_output_to_dict(
self,
outputs: List[np.ndarray],View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/waste_identification_ml/Deploy/detr_cloud_deployment/client/triton_server_inference.py:132 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/82299b7c79db3b01.
Report an issue: GitHub.