RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
ObjectRecognitionCaffe.py
Go to the documentation of this file.
1
from
RappCloud.Objects
import
(
2
File,
3
Payload)
4
5
from
Cloud
import
(
6
CloudMsg,
7
CloudRequest,
8
CloudResponse)
9
10
11
class
ObjectRecognitionCaffe
(CloudMsg):
12
""" Object Recognition Cloud Message object"""
13
14
class
Request
(CloudRequest):
15
""" Object Recognition (Caffe) Cloud Request object.
16
17
ObjectRecognitionCaffe.Request
18
"""
19
def
__init__
(self, **kwargs):
20
"""!
21
Constructor
22
23
@param **kwargs - Keyword arguments. Apply values to the request attributes.
24
- @ref imageFilepath
25
"""
26
## File path to the image to load. This is the image to perform
27
# qr-detection on.
28
self.
imageFilepath
=
''
29
super(
ObjectRecognitionCaffe.Request
, self).
__init__
(**kwargs)
30
31
32
def
make_payload
(self):
33
""" Create and return the Payload of the Request. """
34
return
Payload()
35
36
37
def
make_files
(self):
38
""" Create and return Array of File objects of the Request. """
39
return
[File(self.
imageFilepath
, postfield=
'file'
)]
40
41
42
class
Response
(CloudResponse):
43
""" Object Recognition (Caffe) Cloud Response object.
44
45
ObjectRecognitionCaffe.Response
46
"""
47
def
__init__
(self, **kwargs):
48
"""!
49
Constructor
50
51
@param **kwargs - Keyword arguments. Apply values to the request attributes.
52
- @ref error
53
- @ref object_class
54
"""
55
56
## Error message
57
self.
error
=
''
58
## Recognized object class.
59
self.
object_class
=
''
60
super(
ObjectRecognitionCaffe.Response
, self).
__init__
(**kwargs)
61
62
63
def
__init__
(self, **kwargs):
64
"""!
65
Constructor
66
67
@param **kwargs - Keyword arguments. Apply values to the request attributes.
68
- @ref Request.imageFilepath
69
"""
70
71
# Create and hold the Request object for this CloudMsg
72
self.
req
=
ObjectRecognitionCaffe.Request
()
73
# Create and hold the Response object for this CloudMsg
74
self.
resp
=
ObjectRecognitionCaffe.Response
()
75
super(ObjectRecognitionCaffe, self).
__init__
(
76
svcname=
'object_recognition_caffe'
, **kwargs)
77
78
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Request
Definition:
ObjectRecognitionCaffe.py:14
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Response.object_class
object_class
Recognized object class.
Definition:
ObjectRecognitionCaffe.py:59
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.resp
resp
Definition:
ObjectRecognitionCaffe.py:74
RappCloud.Objects
Definition:
__init__.py:1
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe
Definition:
ObjectRecognitionCaffe.py:11
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Response.__init__
def __init__
Constructor.
Definition:
ObjectRecognitionCaffe.py:47
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.req
req
Definition:
ObjectRecognitionCaffe.py:72
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Response
Definition:
ObjectRecognitionCaffe.py:42
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.__init__
def __init__
Constructor.
Definition:
ObjectRecognitionCaffe.py:63
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Request.make_payload
def make_payload
Definition:
ObjectRecognitionCaffe.py:32
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Response.error
error
Error message.
Definition:
ObjectRecognitionCaffe.py:57
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Request.__init__
def __init__
Constructor.
Definition:
ObjectRecognitionCaffe.py:19
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Request.imageFilepath
imageFilepath
File path to the image to load.
Definition:
ObjectRecognitionCaffe.py:28
RappCloud.CloudMsgs.ObjectRecognitionCaffe.ObjectRecognitionCaffe.Request.make_files
def make_files
Definition:
ObjectRecognitionCaffe.py:37
python
RappCloud
CloudMsgs
ObjectRecognitionCaffe.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6