MCPcopy Create free account
hub / github.com/KumarRobotics/sloam / Segmentation

Method Segmentation

sloam/src/segmentation/inference.cpp:5–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3
4namespace seg {
5Segmentation::Segmentation(const std::string modelFilePath,
6 const float fov_up, const float fov_down, const int img_w, const int img_h, const int img_d, bool do_destagger) {
7 _fov_up = fov_up / 180.0 * M_PI; // field of view up in radians
8 _fov_down = fov_down / 180.0 * M_PI; // field of view down in radians
9 _fov = std::abs(_fov_down) + std::abs(_fov_up); // get field of view total in radians
10 _img_w = img_w;
11 _img_h = img_h;
12 _img_d = img_d;
13 _verbose = false;
14 _do_destagger = do_destagger;
15
16 const std::string sessionName = "SLOAMSeg";
17 // specify number of CPU threads allowed for semantic segmentation inference to use
18 _startONNXSession(sessionName, modelFilePath, false, 3);
19}
20
21void Segmentation::_startONNXSession(const std::string sessionName, const std::string modelFilePath, bool useCUDA, size_t numThreads){
22 Ort::SessionOptions sessionOptions;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected