:py:mod:`viam.proto.service.vision` =================================== .. py:module:: viam.proto.service.vision .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: viam.proto.service.vision.UnimplementedVisionServiceBase viam.proto.service.vision.VisionServiceBase viam.proto.service.vision.VisionServiceStub viam.proto.service.vision.Classification viam.proto.service.vision.Detection viam.proto.service.vision.GetClassificationsFromCameraRequest viam.proto.service.vision.GetClassificationsFromCameraResponse viam.proto.service.vision.GetClassificationsRequest viam.proto.service.vision.GetClassificationsResponse viam.proto.service.vision.GetDetectionsFromCameraRequest viam.proto.service.vision.GetDetectionsFromCameraResponse viam.proto.service.vision.GetDetectionsRequest viam.proto.service.vision.GetDetectionsResponse viam.proto.service.vision.GetObjectPointCloudsRequest viam.proto.service.vision.GetObjectPointCloudsResponse .. py:class:: UnimplementedVisionServiceBase Bases: :py:obj:`VisionServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetDetectionsFromCamera(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetDetectionsFromCameraRequest, service.vision.v1.vision_pb2.GetDetectionsFromCameraResponse]) -> None :async: .. py:method:: GetDetections(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetDetectionsRequest, service.vision.v1.vision_pb2.GetDetectionsResponse]) -> None :async: .. py:method:: GetClassificationsFromCamera(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetClassificationsFromCameraRequest, service.vision.v1.vision_pb2.GetClassificationsFromCameraResponse]) -> None :async: .. py:method:: GetClassifications(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetClassificationsRequest, service.vision.v1.vision_pb2.GetClassificationsResponse]) -> None :async: .. py:method:: GetObjectPointClouds(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetObjectPointCloudsRequest, service.vision.v1.vision_pb2.GetObjectPointCloudsResponse]) -> None :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :async: .. py:class:: VisionServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetDetectionsFromCamera(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetDetectionsFromCameraRequest, service.vision.v1.vision_pb2.GetDetectionsFromCameraResponse]) -> None :abstractmethod: :async: .. py:method:: GetDetections(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetDetectionsRequest, service.vision.v1.vision_pb2.GetDetectionsResponse]) -> None :abstractmethod: :async: .. py:method:: GetClassificationsFromCamera(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetClassificationsFromCameraRequest, service.vision.v1.vision_pb2.GetClassificationsFromCameraResponse]) -> None :abstractmethod: :async: .. py:method:: GetClassifications(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetClassificationsRequest, service.vision.v1.vision_pb2.GetClassificationsResponse]) -> None :abstractmethod: :async: .. py:method:: GetObjectPointClouds(stream: grpclib.server.Stream[service.vision.v1.vision_pb2.GetObjectPointCloudsRequest, service.vision.v1.vision_pb2.GetObjectPointCloudsResponse]) -> None :abstractmethod: :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :abstractmethod: :async: .. py:method:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: VisionServiceStub(channel: grpclib.client.Channel) .. py:class:: Classification(*, class_name: str = ..., confidence: float = ...) Bases: :py:obj:`google.protobuf.message.Message` the general form of the output from a classifier .. py:attribute:: class_name :type: str the class name .. py:attribute:: confidence :type: float the confidence score of the classification .. py:class:: Detection(*, x_min: int | None = ..., y_min: int | None = ..., x_max: int | None = ..., y_max: int | None = ..., confidence: float = ..., class_name: str = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: x_min :type: int the four corners of the box .. py:attribute:: y_min :type: int .. py:attribute:: x_max :type: int .. py:attribute:: y_max :type: int .. py:attribute:: confidence :type: float the confidence of the detection .. py:attribute:: class_name :type: str label associated with the detected object .. py:method:: HasField(field_name: Literal[_x_max, b'_x_max', _x_min, b'_x_min', _y_max, b'_y_max', _y_min, b'_y_min', x_max, b'x_max', x_min, b'x_min', y_max, b'y_max', y_min, b'y_min']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:method:: WhichOneof(oneof_group: Literal[_x_max, b'_x_max']) -> Literal[x_max] | None WhichOneof(oneof_group: Literal[_x_min, b'_x_min']) -> Literal[x_min] | None WhichOneof(oneof_group: Literal[_y_max, b'_y_max']) -> Literal[y_max] | None WhichOneof(oneof_group: Literal[_y_min, b'_y_min']) -> Literal[y_min] | None Returns the name of the field that is set inside a oneof group. If no field is set, returns None. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:class:: GetClassificationsFromCameraRequest(*, name: str = ..., camera_name: str = ..., n: int = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str name of the vision service .. py:attribute:: camera_name :type: str the image encoded as bytes .. py:attribute:: n :type: int the number of classifications desired .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetClassificationsFromCameraResponse(*, classifications: collections.abc.Iterable[global___Classification] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: classifications :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Classification] .. py:class:: GetClassificationsRequest(*, name: str = ..., image: bytes = ..., width: int = ..., height: int = ..., mime_type: str = ..., n: int = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str name of the vision service .. py:attribute:: image :type: bytes the image encoded as bytes .. py:attribute:: width :type: int the width of the image .. py:attribute:: height :type: int the height of the image .. py:attribute:: mime_type :type: str the actual MIME type of image .. py:attribute:: n :type: int the number of classifications desired .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetClassificationsResponse(*, classifications: collections.abc.Iterable[global___Classification] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: classifications :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Classification] .. py:class:: GetDetectionsFromCameraRequest(*, name: str = ..., camera_name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct .. py:attribute:: name :type: str name of the vision service .. py:attribute:: camera_name :type: str name of camera source to use as input .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetDetectionsFromCameraResponse(*, detections: collections.abc.Iterable[global___Detection] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: detections :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Detection] the bounding boxes and labels .. py:class:: GetDetectionsRequest(*, name: str = ..., image: bytes = ..., width: int = ..., height: int = ..., mime_type: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str name of the vision service .. py:attribute:: image :type: bytes the image, encoded as bytes .. py:attribute:: width :type: int the width of the image .. py:attribute:: height :type: int the height of the image .. py:attribute:: mime_type :type: str the actual MIME type of image .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetDetectionsResponse(*, detections: collections.abc.Iterable[global___Detection] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: detections :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Detection] the bounding boxes and labels .. py:class:: GetObjectPointCloudsRequest(*, name: str = ..., camera_name: str = ..., mime_type: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str .. py:attribute:: camera_name :type: str Name of a camera .. py:attribute:: mime_type :type: str Requested MIME type of response .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetObjectPointCloudsResponse(*, mime_type: str = ..., objects: collections.abc.Iterable[viam.gen.common.v1.common_pb2.PointCloudObject] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: objects :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[viam.gen.common.v1.common_pb2.PointCloudObject] List of objects in the scene .. py:attribute:: mime_type :type: str Actual MIME type of response