gimlet-api 0.0.7__py3-none-any.whl → 0.0.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gml/tensor.py CHANGED
@@ -17,10 +17,11 @@
17
17
  import abc
18
18
  from typing import List, Literal, Optional, Tuple
19
19
 
20
- import gml.proto.src.api.corepb.v1.model_exec_pb2 as modelexecpb
21
20
  import google.protobuf.wrappers_pb2 as wrapperspb
22
21
  import numpy as np
23
22
 
23
+ import gml.proto.src.api.corepb.v1.model_exec_pb2 as modelexecpb
24
+
24
25
 
25
26
  def box_format_str_to_proto(box_format: str):
26
27
  match box_format.lower():
@@ -76,6 +77,10 @@ def chan_format_str_to_proto(chan_format: str):
76
77
  return (
77
78
  modelexecpb.DimensionSemantics.ImageChannelParams.IMAGE_CHANNEL_FORMAT_BGR
78
79
  )
80
+ case "gray":
81
+ return (
82
+ modelexecpb.DimensionSemantics.ImageChannelParams.IMAGE_CHANNEL_FORMAT_GRAYSCALE
83
+ )
79
84
  case _:
80
85
  raise ValueError("Invalid channel_format format: {}".format(chan_format))
81
86