Skip to content

Commit

Permalink
update point cloud process and add reminder in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MaverickPeter committed Aug 19, 2021
1 parent 1da7e3d commit 912e18a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ python setup.py build_ext --inplace
# or install in python/site_packages
python setup.py install
# to test
python test.py
(If you meet segmentation fault error, you may have overlarge number of points to process e.g. 67w. To tackle this problem you may need to change your system stack size by 'ulimit -s 81920' in your bash)
```

and now you will have a gputransform.cpythonxxx.so file and copy it to **[generating_queries](https://github.com/MaverickPeter/DiSCO-pytorch/tree/main/generating_queries)/[nclt](https://github.com/MaverickPeter/DiSCO-pytorch/tree/main/generating_queries/nclt) and main dir** where you can find a place holder. Note that the input of the wrapped point cloud process module you should scale the original point cloud to **[-1~1]** range for all axis. No extra process for point cloud such as downscale the points number.
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions multi-layer-polar-cython/cython/gputransform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assert sizeof(int) == sizeof(np.int32_t)

cdef extern from "src/manager.hh":
cdef cppclass C_GPUTransformer "GPUTransformer":
C_GPUTransformer(float *point, int size, int *ring, int *sector, int *height, int max_length, int num_ring, int num_sector, int num_height, int enough_large)
C_GPUTransformer(float *point, int size, int *ring, int *sector, int *height, int max_length, int max_height, int num_ring, int num_sector, int num_height, int enough_large)
void transform()
void retreive(float *point_trans)

Expand All @@ -16,15 +16,15 @@ cdef class GPUTransformer:
cdef int grid_size

def __cinit__(self, np.ndarray[float, ndim=1, mode = "c"] point not None,
int size, int max_length, int num_ring, int num_sector, int num_height, int enough_large):
int size, int max_length, int max_height, int num_ring, int num_sector, int num_height, int enough_large):

self.size = size
self.grid_size = num_ring * num_sector * num_height * enough_large
cdef np.ndarray[int, ndim=1, mode = "c"] sector = np.zeros(self.size, dtype=np.int32)
cdef np.ndarray[int, ndim=1, mode = "c"] ring = np.zeros(self.size, dtype=np.int32)
cdef np.ndarray[int, ndim=1, mode = "c"] height = np.zeros(self.size, dtype=np.int32)

self.g = new C_GPUTransformer(&point[0], self.size, &ring[0], &sector[0], &height[0], max_length, num_ring, num_sector, num_height, enough_large)
self.g = new C_GPUTransformer(&point[0], self.size, &ring[0], &sector[0], &height[0], max_length, max_height, num_ring, num_sector, num_height, enough_large)

def transform(self):
self.g.transform()
Expand Down

0 comments on commit 912e18a

Please sign in to comment.