Revised API to align with recent changes
This commit is contained in:
parent
0de97497fa
commit
75af46d273
|
@ -85,8 +85,6 @@ class ClassificationList:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
classifications: List[Classification]
|
classifications: List[Classification]
|
||||||
tensor_index: Optional[int] = None
|
|
||||||
tensor_name: Optional[str] = None
|
|
||||||
|
|
||||||
@doc_controls.do_not_generate_docs
|
@doc_controls.do_not_generate_docs
|
||||||
def to_pb2(self) -> _ClassificationListProto:
|
def to_pb2(self) -> _ClassificationListProto:
|
||||||
|
@ -95,9 +93,7 @@ class ClassificationList:
|
||||||
classification=[
|
classification=[
|
||||||
classification.to_pb2()
|
classification.to_pb2()
|
||||||
for classification in self.classifications
|
for classification in self.classifications
|
||||||
],
|
])
|
||||||
tensor_index=self.tensor_index,
|
|
||||||
tensor_name=self.tensor_name)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@doc_controls.do_not_generate_docs
|
@doc_controls.do_not_generate_docs
|
||||||
|
@ -110,9 +106,7 @@ class ClassificationList:
|
||||||
classifications=[
|
classifications=[
|
||||||
Classification.create_from_pb2(classification)
|
Classification.create_from_pb2(classification)
|
||||||
for classification in pb2_obj.classification
|
for classification in pb2_obj.classification
|
||||||
],
|
])
|
||||||
tensor_index=pb2_obj.tensor_index,
|
|
||||||
tensor_name=pb2_obj.tensor_name)
|
|
||||||
|
|
||||||
def __eq__(self, other: Any) -> bool:
|
def __eq__(self, other: Any) -> bool:
|
||||||
"""Checks if this object is equal to the given object.
|
"""Checks if this object is equal to the given object.
|
||||||
|
|
|
@ -80,7 +80,7 @@ def _get_expected_gesture_recognition_result(
|
||||||
classifications=[
|
classifications=[
|
||||||
_Classification(label=gesture_label, index=gesture_index,
|
_Classification(label=gesture_label, index=gesture_index,
|
||||||
display_name='')
|
display_name='')
|
||||||
], tensor_index=0, tensor_name='')
|
])
|
||||||
return _GestureRecognitionResult(
|
return _GestureRecognitionResult(
|
||||||
gestures=[gesture],
|
gestures=[gesture],
|
||||||
handedness=[landmarks_detection_result.classifications],
|
handedness=[landmarks_detection_result.classifications],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user