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

Function refine_grid

core/utils/utils.py:237–242  ·  view source on GitHub ↗
(grid)

Source from the content-addressed store, hash-verified

235 return reverse_mask
236
237def refine_grid(grid):
238 H, W, _ = grid.shape
239 grid[:,:,0] = (grid[:,:,0] + 1/2) * W
240 grid[:,:,1] = (grid[:,:,1] + 1/2) * H
241
242 return grid
243
244def convert_flow_to_mapping(flow, output_channel_first=True):
245 if not isinstance(flow, np.ndarray):

Callers 1

__call__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected