| |
- __builtin__.object
-
- tensorNet
-
- detectNet
- imageNet
- segNet
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 detectNet,
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:
* ssd-mobilenet-v1
* ssd-mobilenet-v2 (default)
* ssd-inception-v2
* pednet
* multiped
* facenet
* 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)
--alpha ALPHA overlay alpha blending value, range 0-255 (default: 120)
--profile enable layer profiling in TensorRT |
|
- 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 (str) -- combination of box,labels,none flags (default is 'box')
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
- SetOverlayAlpha(...)
- Set the alpha blending value used during overlay visualization for all classes
Parameters:
alpha (float) -- desired alpha value, between 0.0 and 255.0
Returns: (none)
- 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)
- GetNetworkFPS(...)
- Return the runtime of the network (in frames per second)
- 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)
--profile enable layer profiling in TensorRT |
|
- 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)
- GetNetworkFPS(...)
- Return the runtime of the network (in frames per second)
- 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 segNet(tensorNet) |
|
Semantic Segmentation DNN - segments an image with per-pixel classification
Examples (jetson-inference/python/examples)
segnet-console.py
segnet-camera.py
__init__(...)
Loads an semantic segmentation model.
Parameters:
network (string) -- name of a built-in network to use,
see below for available options.
argv (strings) -- command line arguments passed to segNet,
see below for available options.
segNet arguments:
--network NETWORK pre-trained model to load, one of the following:
* fcn-resnet18-cityscapes-512x256
* fcn-resnet18-cityscapes-1024x512
* fcn-resnet18-cityscapes-2048x1024
* fcn-resnet18-deepscene-576x320
* fcn-resnet18-deepscene-864x480
* fcn-resnet18-mhp-512x320
* fcn-resnet18-mhp-640x360
* fcn-resnet18-voc-320x320 (default)
* fcn-resnet18-voc-512x320
* fcn-resnet18-sun-512x400
* fcn-resnet18-sun-640x512
--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
--colors COLORS path to text file containing the colors for each class
--input_blob INPUT name of the input layer (default: 'data')
--output_blob OUTPUT name of the output layer (default: 'score_fr_21classes')
--batch_size BATCH maximum batch size (default is 1)
--alpha ALPHA overlay alpha blending value, range 0-255 (default: 120)
--profile enable layer profiling in TensorRT |
|
- Method resolution order:
- segNet
- tensorNet
- __builtin__.object
Methods defined here:
- 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
- GetNetworkName(...)
- Return the name of the built-in network used by the model.
Parameters: (none)
Returns:
(string) -- name of the network (e.g. 'FCN_ResNet18', 'FCN_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
- Mask(...)
- Produce a colorized RGBA segmentation mask of the output.
Parameters:
image (capsule) -- output CUDA memory capsule
width (int) -- width of the image (in pixels)
height (int) -- height of the image (in pixels)
filter_mode (string) -- optional string indicating the filter mode, 'point' or 'linear' (default: 'linear')
Returns: (none)
- Overlay(...)
- Produce the segmentation overlay alpha blended on top of the original image.
Parameters:
image (capsule) -- output CUDA memory capsule
width (int) -- width of the image (in pixels)
height (int) -- height of the image (in pixels)
filter_mode (string) -- optional string indicating the filter mode, 'point' or 'linear' (default: 'linear')
Returns: (none)
- Process(...)
- Perform the initial inferencing processing of the segmentation.
The results can then be visualized using the Overlay() and Mask() functions.
Parameters:
image (capsule) -- CUDA memory capsule
width (int) -- width of the image (in pixels)
height (int) -- height of the image (in pixels)
ignore_class (string) -- optional label name of class to ignore in the classification (default: 'void')
Returns: (none)
- SetOverlayAlpha(...)
- Set the alpha blending value used during overlay visualization for all classes
Parameters:
alpha (float) -- desired alpha value, between 0.0 and 255.0
explicit_exempt (optional, bool) -- if True, the global alpha doesn't apply to classes that have an alpha value explicitly set in the colors file (default: True)
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
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)
- GetNetworkFPS(...)
- Return the runtime of the network (in frames per second)
- 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)
- GetNetworkFPS(...)
- Return the runtime of the network (in frames per second)
- 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
| |