tensorflow/models · error · FileNotFoundError
Dataset is missing required images folder
Error message
Dataset {dataset_name!r} is missing required images folder: {images_dir} What it means
Raised during dataset validation when a dataset lacks the expected images subfolder required for processing.
Solutions
- Create the images folder at the path shown or move images into it.
- Confirm the input images folder name in the config matches the on-disk name.
- Re-run the upstream stage that should have produced the images folder.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/filter_sparse_images.py:193 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/18193302ed71d79c.
Report an issue: GitHub.
Appendix: source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/filter_sparse_images.py:193
) -> list[tuple[str, str]]:
"""Validates that each dataset has the expected input images folder.
Args:
dataset_directories: List of ``(dataset_name, dataset_path)`` tuples.
input_images_folder_name: Name of the input images subfolder.
Returns:
A list of ``(dataset_name, images_dir)`` tuples ready for processing.
Raises:
FileNotFoundError: If any dataset is missing its images folder.
"""
validated = []
for dataset_name, dataset_path in dataset_directories:
images_dir = os.path.join(dataset_path, input_images_folder_name)
if not os.path.isdir(images_dir):
raise FileNotFoundError(
f"Dataset {dataset_name!r} is missing required images folder: "
f"{images_dir}"
)
validated.append((dataset_name, images_dir))
return validated
def validate_rejected_dir(rejected_dir: str) -> None:
"""Ensures the rejected directory does not already exist.
Args:
rejected_dir: Path to the rejected directory.
Raises:
FileExistsError: If ``rejected_dir`` already exists.
"""View on GitHub (pinned to e006f5f0d5)