jetson.inference
index
/usr/lib/python2.7/dist-packages/jetson/inference/__init__.py

 
Package Contents
       

 
Classes
       
__builtin__.object
tensorNet
detectNet
imageNet

 
class detectNet(tensorNet)
    Object Detection DNN - locates objects in an image
 
Examples (jetson-inference/python/examples)
     detectnet-console.py
     detectnet-camera.py
 
__init__(...)
     Loads an object detection model.
 
     Parameters:
       network (string) -- name of a built-in network to use
                           see below for available options.
 
       argv (strings) -- command line arguments passed to imageNet,
                         see below for available options.
 
       threshold (float) -- minimum detection threshold.
                            default value is 0.5
 
detectNet arguments: 
  --network NETWORK     pre-trained model to load, one of the following:
                            * pednet (default)
                            * multiped
                            * facenet
                            * ssd-mobilenet-v1
                            * ssd-mobilenet-v2
                            * ssd-inception-v2
                            * coco-airplane
                            * coco-bottle
                            * coco-chair
                            * coco-dog
  --model MODEL         path to custom model to load (.caffemodel, .uff, or .onnx)
  --prototxt PROTOTXT   path to custom prototxt to load (for .caffemodel only)
  --class_labels LABELS path to text file containing the labels for each class
  --threshold THRESHOLD minimum threshold for detection (default is 0.5)
  --input_blob INPUT    name of the input layer (default is 'data')
  --output_cvg COVERAGE name of the coverge output layer (default is 'coverage')
  --output_bbox BOXES   name of the bounding output layer (default is 'bboxes')
  --mean_pixel PIXEL    mean pixel value to subtract from input (default is 0.0)
  --batch_size BATCH    maximum batch size (default is 1)
 
 
Method resolution order:
detectNet
tensorNet
__builtin__.object

Methods defined here:
Detect(...)
Detect objects in an RGBA image and return a list of detections.
 
Parameters:
  image   (capsule) -- CUDA memory capsule
  width   (int)  -- width of the image (in pixels)
  height  (int)  -- height of the image (in pixels)
  overlay (bool) -- true to overlay the bounding boxes (default is true)
 
Returns:
  [Detections] -- list containing the detected objects (see detectNet.Detection)
GetClassDesc(...)
Return the class description for the given object class.
 
Parameters:
  (int) -- index of the class, between [0, GetNumClasses()]
 
Returns:
  (string) -- the text description of the object class
GetClassSynset(...)
Return the synset data category string for the given class.
The synset generally maps to the class training data folder.
 
Parameters:
  (int) -- index of the class, between [0, GetNumClasses()]
 
Returns:
  (string) -- the synset of the class, typically 9 characters long
GetNumClasses(...)
Return the number of object classes that this network model is able to detect.
 
Parameters:  (none)
 
Returns:
  (int) -- number of object classes that the model supports
GetThreshold(...)
Return the minimum detection threshold.
 
Parameters:  (none)
 
Returns:
  (float) -- the threshold for detection
SetThreshold(...)
Return the minimum detection threshold.
 
Parameters:
  (float) -- detection threshold
 
Returns:  (none)
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Static methods defined here:
Usage(...)
Return the command line parameters accepted by __init__()
 
Parameters:  (none)
 
Returns:
  (string) -- usage string documenting command-line options

Data and other attributes defined here:
Detection = <type 'jetson.inference.detectNet.Detection'>
Object Detection Result
 
----------------------------------------------------------------------
Data descriptors defined here:
 
Area
    Area of bounding box
 
Bottom
    Bottom bounding box coordinate
 
Center
    Center (x,y) coordinate of bounding box
 
ClassID
    Class index of the detected object
 
Confidence
    Confidence value of the detected object
 
Height
    Height of bounding box
 
Instance
    Instance index of the detected object
 
Left
    Left bounding box coordinate
 
Right
    Right bounding box coordinate
 
Top
    Top bounding box coordinate
 
Width
     Width of bounding box

Methods inherited from tensorNet:
EnableDebug(...)
Enable TensorRT debug messages and device synchronization
EnableLayerProfiler(...)
Enable the profiling of network layer execution times
GetModelPath(...)
Return the path to the network model file on disk
GetModelType(...)
Return the type of model format (caffe, ONNX, UFF, or custom)
GetNetworkTime(...)
Return the runtime of the network (in milliseconds)
GetPrototxtPath(...)
Return the path to the network prototxt file on disk
PrintProfilerTimes(...)
Print out performance timing info

Data and other attributes inherited from tensorNet:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
class imageNet(tensorNet)
    Image Recognition DNN - classifies an image
 
Examples (jetson-inference/python/examples)
     my-recognition.py
     imagenet-console.py
     imagenet-camera.py
 
__init__(...)
     Loads an image recognition model.
 
     Parameters:
       network (string) -- name of a built-in network to use,
                           see below for available options.
 
       argv (strings) -- command line arguments passed to imageNet,
                         see below for available options.
 
imageNet arguments: 
  --network NETWORK    pre-trained model to load, one of the following:
                           * alexnet
                           * googlenet (default)
                           * googlenet-12
                           * resnet-18
                           * resnet-50
                           * resnet-101
                           * resnet-152
                           * vgg-16
                           * vgg-19
                           * inception-v4
  --model MODEL        path to custom model to load (.caffemodel, .uff, or .onnx)
  --prototxt PROTOTXT  path to custom prototxt to load (for .caffemodel only)
  --labels LABELS      path to text file containing the labels for each class
  --input_blob INPUT   name of the input layer (default is 'data')
  --output_blob OUTPUT name of the output layer (default is 'prob')
  --batch_size BATCH   maximum batch size (default is 1)
 
 
Method resolution order:
imageNet
tensorNet
__builtin__.object

Methods defined here:
Classify(...)
Classify an RGBA image and return the object's class and confidence.
 
Parameters:
  image  (capsule) -- CUDA memory capsule
  width  (int) -- width of the image (in pixels)
  height (int) -- height of the image (in pixels)
 
Returns:
  (int, float) -- tuple containing the object's class index and confidence
GetClassDesc(...)
Return the class description for the given object class.
 
Parameters:
  (int) -- index of the class, between [0, GetNumClasses()]
 
Returns:
  (string) -- the text description of the object class
GetClassSynset(...)
Return the synset data category string for the given class.
The synset generally maps to the class training data folder.
 
Parameters:
  (int) -- index of the class, between [0, GetNumClasses()]
 
Returns:
  (string) -- the synset of the class, typically 9 characters long
GetNetworkName(...)
Return the name of the built-in network used by the model.
 
Parameters:  (none)
 
Returns:
  (string) -- name of the network (e.g. 'googlenet', 'alexnet')
              or 'custom' if using a custom-loaded model
GetNumClasses(...)
Return the number of object classes that this network model is able to classify.
 
Parameters:  (none)
 
Returns:
  (int) -- number of object classes that the model supports
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Static methods defined here:
Usage(...)
Return the command line parameters accepted by __init__()
 
Parameters:  (none)
 
Returns:
  (string) -- usage string documenting command-line options

Methods inherited from tensorNet:
EnableDebug(...)
Enable TensorRT debug messages and device synchronization
EnableLayerProfiler(...)
Enable the profiling of network layer execution times
GetModelPath(...)
Return the path to the network model file on disk
GetModelType(...)
Return the type of model format (caffe, ONNX, UFF, or custom)
GetNetworkTime(...)
Return the runtime of the network (in milliseconds)
GetPrototxtPath(...)
Return the path to the network prototxt file on disk
PrintProfilerTimes(...)
Print out performance timing info

Data and other attributes inherited from tensorNet:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
class tensorNet(__builtin__.object)
    TensorRT DNN Base Object
 
  Methods defined here:
EnableDebug(...)
Enable TensorRT debug messages and device synchronization
EnableLayerProfiler(...)
Enable the profiling of network layer execution times
GetModelPath(...)
Return the path to the network model file on disk
GetModelType(...)
Return the type of model format (caffe, ONNX, UFF, or custom)
GetNetworkTime(...)
Return the runtime of the network (in milliseconds)
GetPrototxtPath(...)
Return the path to the network prototxt file on disk
PrintProfilerTimes(...)
Print out performance timing info

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
Data
        VERSION = '1.0.0'