Segmentation pipeline class that maintains YOLO and SAM models state. This prevents initializing heavy models iteratively on every frame.
More...
#include <sam_seg_module.h>
Segmentation pipeline class that maintains YOLO and SAM models state. This prevents initializing heavy models iteratively on every frame.
Definition at line 47 of file sam_seg_module.h.
◆ SamSegPipeline()
| SamSegPipeline::SamSegPipeline |
( |
| ) |
|
◆ ~SamSegPipeline()
| SamSegPipeline::~SamSegPipeline |
( |
| ) |
|
|
default |
◆ initialize()
Initialize the YOLO and SAM models from configuration.
- Parameters
-
| config | Configuration containing model paths. |
Definition at line 31 of file sam_seg_module.cpp.
◆ process()
| SegmentationResult SamSegPipeline::process |
( |
const cv::Mat & |
img, |
|
|
const cv::Mat & |
depth_image = cv::Mat(), |
|
|
const std::string & |
ignore_label = "", |
|
|
bool |
verbose = false |
|
) |
| |
Process the input image and generate segmentation masks.
- Parameters
-
| img | The input RGB image to segment. |
| depth_image | Optionally, the filtered depth image to ignore bounding boxes outside our point cloud frustum. |
| ignore_label | Optionally, a specific YOLO label to skip inferring SAM on. |
| verbose | If true, measure and populate latency timings. |
- Returns
- SegmentationResult The generated masks, bounding boxes, labels, and confidences.
Definition at line 71 of file sam_seg_module.cpp.
◆ is_initialized_
◆ pimpl_
The documentation for this class was generated from the following files: