RAPP Platform
v0.6.0
RAPP Platform is a collection of ROS nodes and back-end processes that aim to deliver ready-to-use generic services to robots
|
Contains the necessary functions for classifying an images and requesting registration to the ontology. More...
Public Member Functions | |
def | __init__ |
Initializes Caffe. More... | |
def | classifyImage |
Implements the imageClassificationSrv service main function. More... | |
def | getImageClass |
Obtains the name of the class of the image from the caffe image classes file. More... | |
def | getOntologyClass |
Calls the caffe wrapper service that registers the image to the ontology. More... | |
def | registerToOntology |
Calls the caffe wrapper service that registers the image to the ontology. More... | |
Public Attributes | |
caffe_root | |
labels | |
net | |
transformer | |
Contains the necessary functions for classifying an images and requesting registration to the ontology.
Definition at line 46 of file image_classification.py.
def image_classification.ImageClassification.__init__ | ( | self | ) |
Initializes Caffe.
Definition at line 49 of file image_classification.py.
def image_classification.ImageClassification.classifyImage | ( | self, | |
req | |||
) |
Implements the imageClassificationSrv service main function.
req | [rapp_platform_ros_communications::imageClassificationSrvRequest::Request&] The ROS service request |
Exception | IndexError |
Exception | IOError |
Exception | AppError |
Exception | KeyError |
Definition at line 86 of file image_classification.py.
def image_classification.ImageClassification.getImageClass | ( | self, | |
req | |||
) |
Obtains the name of the class of the image from the caffe image classes file.
req | [rapp_platform_ros_communications::ontologyClassBridgeSrvRequest::Request&] The ROS service request |
Definition at line 163 of file image_classification.py.
def image_classification.ImageClassification.getOntologyClass | ( | self, | |
caffeObjectClass | |||
) |
Calls the caffe wrapper service that registers the image to the ontology.
caffeObjectClass | [string] The caffe object class |
Exception | AppError |
Definition at line 124 of file image_classification.py.
def image_classification.ImageClassification.registerToOntology | ( | self, | |
req, | |||
caffeObjectClass, | |||
ontologyClass, | |||
currentImagePath | |||
) |
Calls the caffe wrapper service that registers the image to the ontology.
req | [rapp_platform_ros_communications::ontologyClassBridgeSrvRequest::Request&] The ROS service request |
caffeObjectClass | [string] The caffe object class |
ontologyClass | [string] The ontology object class |
currentImagePath | [string] The path of the image file |
Exception | AppError |
Definition at line 145 of file image_classification.py.
image_classification.ImageClassification.caffe_root |
Definition at line 50 of file image_classification.py.
image_classification.ImageClassification.labels |
Definition at line 76 of file image_classification.py.
image_classification.ImageClassification.net |
Definition at line 60 of file image_classification.py.
image_classification.ImageClassification.transformer |
Definition at line 66 of file image_classification.py.