Summary: better design between LLM and SAM3 due to the embedding issue of SAM3
Reviewed By: mchorton
Differential Revision: D101818594
fbshipit-source-id: b51c36defc6ed4adae5406e8eba31280e05cac9a
Summary: Fix SAM3 io_utils.py to handle extensionless video files from OIL (Object Image Library). Previously, the code would immediately raise NotImplementedError when encountering files without recognized video extensions. This change attempts to load such files as videos using the video loader, only raising an exception if the actual decoding fails. This enables SAM3 to process OIL-stored video paths that don't include file extensions.
Differential Revision: D99228861
fbshipit-source-id: c93d089ad4b7eac9e0eb629d7a71b021604db410
Summary:
D98651970 accidentally included changes to sam3_image.py,
shopping_segmentation_images config, inference_engine, and tests
that were not part of the shared segmentation inputs refactor.
This reverts only those unintended files.
Reviewed By: omriharosh
Differential Revision: D98875697
fbshipit-source-id: 3e47fa686364f645295ddff094a5eff2237e9b33
Summary:
All three segment tracking demo pages duplicate the same input widgets
(Everstore Handle, Text Queries, Confidence Threshold, Prediction Tier,
and optionally Thumbnail Size). Extract them into a SegmentationInputs
dataclass with a create() staticmethod that renders all shared Gradio
widgets and returns them as a typed bundle.
This eliminates duplication and ensures widget consistency across the
Segmentation, Query Comparison, and Incremental Query pages.
Differential Revision: D98651970
fbshipit-source-id: 60540a719b888095c5c8d0ba5e9bb321a4bd7cf1
Summary:
Move the top-level `from decord import cpu, VideoReader` in sam3_image_dataset.py to a lazy import inside the .mp4 video loading block. This avoids import errors for consumers that only need image inference and don't have decord installed.
Also add a new `sam3_inference_image_only` BUCK target that excludes decord from pypi_deps for downstream projects that only need image inference.
Reviewed By: haithamkhedr
Differential Revision: D96809398
fbshipit-source-id: 67c5f0be965d8420b244ff4c45d849314352d3cc
Summary:
## Context
When cv2.VideoCapture opens a video but cannot decode any frames (e.g., due to an unsupported codec), the frames list is empty and np.stack crashes with "need at least one array to stack" — an unhelpful error message that obscures the real problem.
## This Diff
- Add explicit check for empty frames list after cap.release() and before np.stack
- Raise RuntimeError with descriptive message about possible causes (corrupted file, empty video, or unsupported codec)
Differential Revision: D94142839
fbshipit-source-id: 89a973d067d83439039734712d18727b06d0706d