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
Summary:
When running with compile=True, we were getting the following error: P2186079344
Swapping to not use cudagraphs for a quik fix. Will follow up with swapping the Position embedding impl to not cache.
Reviewed By: raedle
Differential Revision: D93508585
fbshipit-source-id: 0eaa29fcf826611b6a652811a6f2472399014b84