MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / set_raw_scale

Method set_raw_scale

rtpose_wrapper/python/caffe/io.py:221–234  ·  view source on GitHub ↗

Set the scale of raw features s.t. the input blob = input * scale. While Python represents images in [0, 1], certain Caffe models like CaffeNet and AlexNet represent images in [0, 255] so the raw_scale of these models must be 255. Parameters --------

(self, in_, scale)

Source from the content-addressed store, hash-verified

219 self.channel_swap[in_] = order
220
221 def set_raw_scale(self, in_, scale):
222 """
223 Set the scale of raw features s.t. the input blob = input * scale.
224 While Python represents images in [0, 1], certain Caffe models
225 like CaffeNet and AlexNet represent images in [0, 255] so the raw_scale
226 of these models must be 255.
227
228 Parameters
229 ----------
230 in_ : which input to assign this scale factor
231 scale : scale coefficient
232 """
233 self.__check_input(in_)
234 self.raw_scale[in_] = scale
235
236 def set_mean(self, in_, mean):
237 """

Callers 2

__init__Method · 0.80
__init__Method · 0.80

Calls 1

__check_inputMethod · 0.95

Tested by

no test coverage detected