Michele Sanna
f8acecb6b3
a formula for bin size for images over 64x64 (#90)
Summary:
Signed-off-by: Michele Sanna <sanna@arrival.com>
fixes the bin_size calculation with a formula for any image_size > 64. Matches the values chosen so far.
simple test:
```
import numpy as np
import matplotlib.pyplot as plt
image_size = np.arange(64, 2048)
bin_size = np.where(image_size <= 64, 8, (2 ** np.maximum(np.ceil(np.log2(image_size)) - 4, 4)).astype(int))
print(image_size)
print(bin_size)
for ims, bins in zip(image_size, bin_size):
if ims <= 64:
assert bins == 8
elif ims <= 256:
assert bins == 16
elif ims <= 512:
assert bins == 32
elif ims <= 1024:
assert bins == 64
elif ims <= 2048:
assert bins == 128
assert (ims + bins - 1) // bins < 22
plt.plot(image_size, bin_size)
plt.grid()
plt.show()
```

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/90
Reviewed By: jcjohnson
Differential Revision: D21160372
Pulled By: nikhilaravi
fbshipit-source-id: 660cf5832f4ca5be243c435a6bed969596fc0188
2020-04-24 14:56:41 -07:00
..
2020-04-20 14:54:16 -07:00
2020-01-23 11:53:46 -08:00
2020-03-29 14:51:02 -07:00
2020-04-24 09:11:04 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-04-14 17:22:56 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-04-23 19:38:35 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-04-17 07:44:16 -07:00
2020-04-11 00:21:24 -07:00
2020-03-29 14:51:02 -07:00
2020-04-17 07:44:16 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-04-24 09:11:04 -07:00
2020-04-16 14:02:16 -07:00
2020-03-29 14:51:02 -07:00
2020-04-20 12:19:45 -07:00
2020-04-17 04:38:14 -07:00
2020-04-24 09:11:04 -07:00
2020-04-17 07:44:16 -07:00
2020-04-24 09:11:04 -07:00
2020-04-24 09:11:04 -07:00
2020-04-24 09:11:04 -07:00
2020-04-24 09:11:04 -07:00
2020-04-24 09:11:04 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-04-11 00:21:24 -07:00
2020-04-23 19:38:35 -07:00
2020-04-06 06:41:00 -07:00
2020-04-24 09:11:04 -07:00
2020-04-17 07:44:16 -07:00
2020-04-16 18:36:19 -07:00
2020-04-24 09:11:04 -07:00
2020-04-11 00:21:24 -07:00
2020-04-17 10:50:22 -07:00
2020-04-16 18:36:19 -07:00
2020-04-24 14:56:41 -07:00
2020-04-24 14:56:41 -07:00
2020-03-29 14:51:02 -07:00
2020-04-20 14:54:16 -07:00
2020-04-20 14:54:16 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-04-24 09:11:04 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-03-29 14:51:02 -07:00
2020-04-05 14:44:27 -07:00
2020-04-17 10:39:43 -07:00
2020-01-23 11:53:46 -08:00