tensorflow/models · error · ValueError
Input directory not found at '{INPUT_DIR}'
Error message
Input directory not found at '{INPUT_DIR}' What it means
Error "Input directory not found at '{INPUT_DIR}'" thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/llm_applications/milk_pouch_detection/src/extract_objects.py:111
Filtered masks and boxes.
"""
filtered = [
(mask, box)
for mask, box in zip(masks, boxes)
if (np.sum(mask.astype(np.uint8)) / image_area) * 100 > min_percent
]
if not filtered:
return [], []
valid_masks, valid_boxes = zip(*filtered)
return list(valid_masks), list(valid_boxes)
def main(_) -> None:
"""Runs the main object detection and extraction pipeline."""
if not os.path.isdir(INPUT_DIR):
raise ValueError(f"Input directory not found at '{INPUT_DIR}'")
# Check if COCO output should be created
create_coco = FLAGS.category_name is not None
print("Initializing image extraction and classification...")
try:
pipeline = detection_segmentation.ObjectDetectionSegmentation(
dino_config_path=GROUNDING_DINO_CONFIG,
dino_weights_path=GROUNDING_DINO_WEIGHTS,
sam_config_path=SAM2_CONFIG,
sam_checkpoint_path=SAM2_WEIGHTS,
)
except FileNotFoundError as e:
print(
f"\n⚠️ Error: Could not find model files: {e}. "
"Please check the paths in the script."
)
returnView on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/waste_identification_ml/llm_applications/milk_pouch_detection/src/extract_objects.py:111 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/1dfa5bad0e1f0ef6.
Report an issue: GitHub.