MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / __call__

Method __call__

PATH/core/models/tta.py:105–124  ·  view source on GitHub ↗

Same input/output format as :meth:`SemanticSegmentor.forward`

(self, batched_inputs, current_step)

Source from the content-addressed store, hash-verified

103 return ret
104
105 def __call__(self, batched_inputs, current_step):
106 """
107 Same input/output format as :meth:`SemanticSegmentor.forward`
108 """
109 self.current_step = current_step # redundant param for api compliance
110 def _maybe_read_image(dataset_dict):
111 ret = copy.copy(dataset_dict)
112 if "image" not in ret:
113 raise
114 if "height" not in ret and "width" not in ret: # TODO: BUG HERE
115 raise
116 # ret["height"] = ret["ori_image"].shape[1]#ret["image"].shape[1]
117 # ret["width"] = ret["ori_image"].shape[2]
118 return ret
119
120 processed_results = []
121 # for x in batched_inputs:
122 result = self._inference_one_image(_maybe_read_image(batched_inputs))
123 processed_results.append(result)
124 return processed_results
125
126 def _inference_one_image(self, input):
127 """

Callers

nothing calls this directly

Calls 1

_inference_one_imageMethod · 0.95

Tested by

no test coverage detected