Giter Club home page Giter Club logo

icp's Issues

Resource Exhausted Error

I tried to use your code and my data is huge, but not that huge to exhaust the resource. I am getting the following error, can you help??
2020-03-26 20:08:52.756851: I tensorflow/core/common_runtime/bfc_allocator.cc:964] total_region_allocated_bytes_: 7977644800 memory_limit_: 7977644852 available bytes: 52 curr_region_allocation_bytes_: 15955290112
2020-03-26 20:08:52.756880: I tensorflow/core/common_runtime/bfc_allocator.cc:970] Stats:
Limit: 7977644852
InUse: 33248000
MaxInUse: 49112832
NumAllocs: 23
MaxAllocSize: 23797504

2020-03-26 20:08:52.756913: W tensorflow/core/common_runtime/bfc_allocator.cc:429] *___________________________________________________________________________________________________
2020-03-26 20:08:52.756986: W tensorflow/core/framework/op_kernel.cc:1655] OP_REQUIRES failed at matmul_op.cc:480 : Resource exhausted: OOM when allocating tensor with shape[47350,991553] and type double on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
Traceback (most recent call last):
File "Registration_ICP.py", line 104, in
icp_scale, icp_offset = icp.icp(dgt_points.T, sgt_points.T, dim_offset='all', dim_scale='all', num_iter=50, use_gpu = True)
File "/home/anam/self_localization/self_localization/self_localization/Codes/Registration_Codes/icp/icp/core.py", line 46, in icp
dist = src_squ - 2 * tf.matmul(src, dst, transpose_b=True) + tf.transpose(dst_squ)
File "/home/anam/anaconda3/envs/my_tf_env/lib/python3.7/site-packages/tensorflow_core/python/util/dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "/home/anam/anaconda3/envs/my_tf_env/lib/python3.7/site-packages/tensorflow_core/python/ops/math_ops.py", line 2798, in matmul
a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name)
File "/home/anam/anaconda3/envs/my_tf_env/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_math_ops.py", line 5616, in mat_mul
_ops.raise_from_not_ok_status(e, name)
File "/home/anam/anaconda3/envs/my_tf_env/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 6606, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[47350,991553] and type double on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [Op:MatMul] name: MatMul/

Mesh alignement

Hello @VincentStimper , thank you for your repository. I would like to understand how to use your code to align one mesh to another.

I tried loading the mesh and turning the vertex coordinates into arrays via a python package named pyVista. Then I tried to feed them to your algorithm. This is how i call the algorithm:

import pyvista as pv

template_mesh = pv.PolyData("template_norm.obj") # reference mesh
scene_mesh = pv.PolyData("scene_norm.obj") # mesh to be aligned (different scale and origin)

scale, offset = icp(np.array(scene_mesh.points, dtype="float64"), np.array(template_mesh.points, dtype="float64"), dim_offset="all", dim_scale="all", num_iter=50, use_gpu=False)

results:

Scale: [nan nan nan]
Offset: [nan nan nan]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.