fxia22 / kdnet.pytorch

implementation "Escape from Cells: Deep Kd-Networks for The Recognition of 3D Point Cloud Models" in pytorch
https://arxiv.org/abs/1704.01222
MIT License
117 stars 23 forks source link

c implementation of KDTree #5

Closed wassname closed 6 years ago

wassname commented 6 years ago

See issue #4

depth input points model params (K) ram usage (mb) gpu ram usage (mb) forward time (ms) kdtree time (ms)
11 2,018 3,705 1,986 468 3.6 268
13 8,192 3,715 2,104 413 3.7 1,000
14 16,384 3,727 1,956 501 3.8 2,000
16 65,536 3,801 2,176 621 8.0 8,000
17 131,072 3,899 2,221 815 11.4 17,000
19 524,288 4,500 2,574 1,723 100.0 60,000

With this PR

depth input points model params (K) ram usage (mb) gpu ram usage (mb) forward time (ms) kdtree time (ms)
14 16,384 3,727 1,956 501 3.8 128
17 131,072 3,899 2,221 815 11.4 2,800
19 524,288 4,500 2,574 1,723 100 12,200

I used scipy.spatial.cKDTree then recursively searched for indices and split dimensions. When the tree ended early I repeated that node. When a node has too few indices I padded it with the last value.

fxia22 commented 6 years ago

Great job, thank you for your contribution!