"examples/training/train_unconditional.py" did not exist on "302b86bd0b2679ae8b037f12c34f0d4a6f8823fa"
Commit 254077be authored by 高志华's avatar 高志华 Committed by Kai Chen
Browse files

Update inference.py (#329)

* Update inference.py

fix inference bug, the default keep_ratio is True...But SSD should be false

* Update inference.py

format correct

* Update inference.py

A more stable way

* Update inference.py

* Update inference.py
parent 8d2f0942
......@@ -10,7 +10,9 @@ from mmdet.core import get_classes
def _prepare_data(img, img_transform, cfg, device):
ori_shape = img.shape
img, img_shape, pad_shape, scale_factor = img_transform(
img, scale=cfg.data.test.img_scale)
img,
scale=cfg.data.test.img_scale,
keep_ratio=cfg.data.test.get('resize_keep_ratio', True))
img = to_tensor(img).to(device).unsqueeze(0)
img_meta = [
dict(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment