IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Detectors Class Reference

Layered detector part of puzzle scene perceiver grouping. More...

Inheritance diagram for Detectors:
Inheritance graph
[legend]
Collaboration diagram for Detectors:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, detCfg=None, detInst=None, processors=None)
 Constructor for layered puzzle scene detector. More...
 
def adapt (self)
 Adapt the layer detection models. More...
 
def correct (self)
 Apply correction process to the individual detectors. More...
 
def detect (self, I)
 Apply predict, measure, correct process to source image. More...
 
def emptyDebug (self)
 
def emptyState (self)
 Get and empty state to recover its basic structure. More...
 
def getDebug (self)
 
def getState (self)
 Get the complete detector state, which involves the states of the individual layer detectors. More...
 
def info (self)
 
def loadFrom (fPtr)
 
def measure (self, I)
 Apply detection to the source image pass. More...
 
def predict (self)
 Generate prediction of expected measurement. More...
 
def process (self, I)
 Apply entire predict to adapt process to source image. More...
 
def saveTo (self, fPtr)
 Save the instantiated Detector to given HDF5 file. More...
 

Static Public Member Functions

def buildFromCfg (theConfig)
 Instantiate from stored configuration file (YAML). More...
 
def calibrate2config (theStream, outFile)
 
def load (inFile)
 

Public Attributes

 depth
 
 glove
 
 imGlove
 First, perform any specified pre-processing. More...
 
 imPuzzle
 
 mask
 
 workspace
 

Detailed Description

Layered detector part of puzzle scene perceiver grouping.

Requires RGBD input stream.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  detCfg = None,
  detInst = None,
  processors = None 
)

Constructor for layered puzzle scene detector.

Parameters
[in]detCfgDetector configuration.
[in]processorsImage processors for the different layers.
[in]detInstDetection instances for the different layers.

Reimplemented in Calibrator.

Member Function Documentation

◆ adapt()

def adapt (   self)

Adapt the layer detection models.

This part is tricky as there may be dependencies across the layers in terms of what should be updated and what should not be. Applying simple filtering to establish what pixels should adapt and which ones shouldn't.

Reimplemented in Calibrator.

◆ buildFromCfg()

def buildFromCfg (   theConfig)
static

Instantiate from stored configuration file (YAML).

◆ calibrate2config()

def calibrate2config (   theStream,
  outFile 
)
static

◆ correct()

def correct (   self)

Apply correction process to the individual detectors.

Apply naive correction on a per detector basis. As a layered system, there might be interdependencies that would impact the correction step. Ignoring that for now since it does not immediately come to mind what needs to be done.

Reimplemented in Calibrator.

◆ detect()

def detect (   self,
  I 
)

Apply predict, measure, correct process to source image.

Running detect alone elects not to adapt or update the underlying models. The static model is presumed to be sufficient and applied to the RGBD stream.

Parameters
[in]ISource RGB-D image (structure/dataclass).

Reimplemented in Calibrator.

◆ emptyDebug()

def emptyDebug (   self)

Reimplemented in Calibrator.

◆ emptyState()

def emptyState (   self)

Get and empty state to recover its basic structure.

Parameters
[out]estateThe empty state.

Reimplemented in Calibrator.

◆ getDebug()

def getDebug (   self)

Reimplemented in Calibrator.

◆ getState()

def getState (   self)

Get the complete detector state, which involves the states of the individual layer detectors.

Parameters
[out]stateThe detector state for each layer, by layer.

Reimplemented in Calibrator.

◆ info()

def info (   self)

Reimplemented in Calibrator.

◆ load()

def load (   inFile)
static

◆ loadFrom()

def loadFrom (   fPtr)

◆ measure()

def measure (   self,
  I 
)

Apply detection to the source image pass.

Parameters
[in]IAn RGB-D image (structure/dataclass).

Reimplemented in Calibrator.

◆ predict()

def predict (   self)

Generate prediction of expected measurement.

The detectors are mostly going to be static models, which means that prediction does nothing. Just in case though, the prediction methods are called for them.

Reimplemented in Calibrator.

◆ process()

def process (   self,
  I 
)

Apply entire predict to adapt process to source image.

Parameters
[in]ISource RGB-D image (structure/dataclass).

Reimplemented in Calibrator.

◆ saveTo()

def saveTo (   self,
  fPtr 
)

Save the instantiated Detector to given HDF5 file.

The save process saves the necessary information to re-instantiate a Detectors class object.

Parameters
[in]fPtrAn HDF5 file point.

Reimplemented in Calibrator.

Member Data Documentation

◆ depth

depth

◆ glove

glove

◆ imGlove

imGlove

First, perform any specified pre-processing.

Note
Not dealing with pre-processor, but it might be important.
Todo:
Figure out how to use the improcessor.

Second, invoke the layer detectors and post-processor to differentiate the actual semantic layers of the scene. The layer detectors should be considered as raw detectors that need further polishing to extract the desired semantic layer information. These layers are further processed by customized track pointers and filters. The post processing here is hard-coded rather than a private member function invocation.

Shrink region associated to the surface just to clean up potential sources of confusion and promote recovery of puzzle pieces that are fully captured. Package the processed layers started with the glove. Next, remove any parts of the not surface layer that intersect with the expanded glove region. May remove adjacent puzzle piece area; that's OK since we can't rely on those pieces having been fully measured/captured. After that

◆ imPuzzle

imPuzzle

◆ mask

mask

◆ workspace

workspace

The documentation for this class was generated from the following file: