MCPcopy Create free account
hub / github.com/MultimediaTechLab/YOLO / update

Method update

yolo/utils/bounding_box_utils.py:364–372  ·  view source on GitHub ↗

image_size: W, H

(self, image_size)

Source from the content-addressed store, hash-verified

362 return strides
363
364 def update(self, image_size):
365 """
366 image_size: W, H
367 """
368 if self.image_size == image_size:
369 return
370 anchor_grid, scaler = generate_anchors(image_size, self.strides)
371 self.image_size = image_size
372 self.anchor_grid, self.scaler = anchor_grid.to(self.device), scaler.to(self.device)
373
374 def __call__(self, predicts):
375 preds_cls, preds_anc, preds_box = [], [], []

Callers 6

test_vec2box_autoanchorFunction · 0.95
on_train_epoch_startMethod · 0.45
download_fileFunction · 0.45
__call__Method · 0.45
on_train_batch_endMethod · 0.45

Calls 1

generate_anchorsFunction · 0.85

Tested by 1

test_vec2box_autoanchorFunction · 0.76