tensorflow/models · error · ImportError

The 'sam3' package is not installed or available in python p

Error message

The 'sam3' package is not installed or available in python path. Cannot build the SAM3 processor.

What it means

Error "The 'sam3' package is not installed or available in python path. Cannot build the SAM3 processor." thrown in tensorflow/models.

Source

Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/filter_sparse_images.py:128

def build_sam3_processor(
    detection_config: config_loader.DetectionConfig,
    sam3_checkpoint_path: str,
) -> tuple[Any, Any]:
  """Builds the SAM3 model and its processor.

  Args:
      detection_config: Validated detection thresholds for the active prompt.
      sam3_checkpoint_path: Absolute path to the SAM3 checkpoint.

  Returns:
      A tuple of ``(sam3_model, sam3_processor)``.

  Raises:
      ImportError: If the ``sam3`` package is not installed or available on
          the Python path.
  """
  if sam3_model_builder is None or sam3_image_processor is None:
    raise ImportError(
        "The 'sam3' package is not installed or available in python path. "
        "Cannot build the SAM3 processor."
    )
  sam3_model = sam3_model_builder.build_sam3_image_model(
      checkpoint_path=sam3_checkpoint_path
  )
  sam3_model.to(device=DEVICE)
  sam3_processor = sam3_image_processor.Sam3Processor(
      sam3_model,
      confidence_threshold=detection_config.confidence_threshold,
  )
  return sam3_model, sam3_processor


# ── Dataset discovery and validation ──────────────────────────────────────────


def discover_dataset_directories(root_dir: str) -> list[tuple[str, str]]:

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/filter_sparse_images.py:128 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/b32588e245e2ce46. Report an issue: GitHub.