MCPcopy Create free account
hub / github.com/drinkingcoder/NeuralMarker / expandImagePad

Method expandImagePad

core/utils/transformation.py:224–229  ·  view source on GitHub ↗
(self, image_batch, padding_factor)

Source from the content-addressed store, hash-verified

222 return image_batch
223
224 def expandImagePad(self, image_batch, padding_factor):
225 b, c, h, w = image_batch.size()
226 expand_image = torch.zeros([b, c, h * 2, w * 2])
227 expand_image[:, :, h//2: h//2 + h, w//2: w//2 + w] = image_batch
228
229 return expand_image
230
231
232

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected