MCPcopy Create free account
hub / github.com/MetaSLAM/SphereVLAD / __call__

Method __call__

dataloader/data_augmentation.py:285–290  ·  view source on GitHub ↗
(self, coords)

Source from the content-addressed store, hash-verified

283 return x, y, w, h
284
285 def __call__(self, coords):
286 if random.random() < self.p:
287 x, y, w, h = self.get_params(coords) # Fronto-parallel cuboid to remove
288 mask = (x < coords[..., 0]) & (coords[..., 0] < x+w) & (y < coords[..., 1]) & (coords[..., 1] < y+h)
289 coords[mask] = torch.zeros_like(coords[mask])
290 return coords

Callers

nothing calls this directly

Calls 1

get_paramsMethod · 0.95

Tested by

no test coverage detected