相对于原始图像大小pytorch调整新图像的大小

时间:2020-07-01 02:41:38

标签: pytorch object-detection dimensions

old_dims = torch.FloatTensor([image.width, image.height, image.width, image.height]).unsqueeze(0)

我有old_dims与

   old_dims = torch.FloatTensor([image.width, image.height, image.width, image.height]).unsqueeze(0)

想要使用新尺寸调整框的大小

boxes-> tensor([[ 487., 1766.,  666., 2039.],
        [ 658., 1741.,  834., 2031.],
        [ 704., 1886.,  927., 2072.],
        [ 830., 1275., 1459., 2068.],
        [1028., 1943., 1848., 2307.]], dtype=torch.float64)
old_dim-> tensor([[5354., 3735., 5354., 3735.]])
new size ->(3,300,300) 

新尺寸为(3,300,300) 显示我应该达到这个目标吗?

0 个答案:

没有答案