From 2f1c4c1fb2cc3e570d3f79a00464302c9b2228a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Audren?= Date: Thu, 19 Apr 2018 15:33:31 +0900 Subject: [PATCH 1/5] Use setup.py to build custom layers --- ....cu.cc => average_distance_loss_op_gpu.cu} | 0 ..._op_gpu.cu.cc => backprojecting_op_gpu.cu} | 0 ..._op_gpu.cu.cc => computing_flow_op_gpu.cu} | 0 ...op_gpu.cu.cc => computing_label_op_gpu.cu} | 0 ..._gpu.cu.cc => gradient_reversal_op_gpu.cu} | 0 ...gpu_op.cu.cc => hough_voting_gpu_op_cc.cu} | 3 +- ...cu.cc => lifted_structured_loss_op_gpu.cu} | 0 lib/make.sh | 111 ------------------ lib/make_one.sh | 28 ----- ...ting_op_gpu.cu.cc => projecting_op_gpu.cu} | 0 ...ing_op_gpu.cu.cc => roi_pooling_op_gpu.cu} | 0 lib/setup.py | 77 +++++++++++- ...ss_op_gpu.cu.cc => triplet_loss_op_gpu.cu} | 0 13 files changed, 78 insertions(+), 141 deletions(-) rename lib/average_distance_loss/{average_distance_loss_op_gpu.cu.cc => average_distance_loss_op_gpu.cu} (100%) rename lib/backprojecting_layer/{backprojecting_op_gpu.cu.cc => backprojecting_op_gpu.cu} (100%) rename lib/computing_flow_layer/{computing_flow_op_gpu.cu.cc => computing_flow_op_gpu.cu} (100%) rename lib/computing_label_layer/{computing_label_op_gpu.cu.cc => computing_label_op_gpu.cu} (100%) rename lib/gradient_reversal_layer/{gradient_reversal_op_gpu.cu.cc => gradient_reversal_op_gpu.cu} (100%) rename lib/hough_voting_gpu_layer/{hough_voting_gpu_op.cu.cc => hough_voting_gpu_op_cc.cu} (99%) rename lib/lifted_structured_loss/{lifted_structured_loss_op_gpu.cu.cc => lifted_structured_loss_op_gpu.cu} (100%) delete mode 100755 lib/make.sh delete mode 100755 lib/make_one.sh rename lib/projecting_layer/{projecting_op_gpu.cu.cc => projecting_op_gpu.cu} (100%) rename lib/roi_pooling_layer/{roi_pooling_op_gpu.cu.cc => roi_pooling_op_gpu.cu} (100%) rename lib/triplet_loss/{triplet_loss_op_gpu.cu.cc => triplet_loss_op_gpu.cu} (100%) diff --git a/lib/average_distance_loss/average_distance_loss_op_gpu.cu.cc b/lib/average_distance_loss/average_distance_loss_op_gpu.cu similarity index 100% rename from lib/average_distance_loss/average_distance_loss_op_gpu.cu.cc rename to lib/average_distance_loss/average_distance_loss_op_gpu.cu diff --git a/lib/backprojecting_layer/backprojecting_op_gpu.cu.cc b/lib/backprojecting_layer/backprojecting_op_gpu.cu similarity index 100% rename from lib/backprojecting_layer/backprojecting_op_gpu.cu.cc rename to lib/backprojecting_layer/backprojecting_op_gpu.cu diff --git a/lib/computing_flow_layer/computing_flow_op_gpu.cu.cc b/lib/computing_flow_layer/computing_flow_op_gpu.cu similarity index 100% rename from lib/computing_flow_layer/computing_flow_op_gpu.cu.cc rename to lib/computing_flow_layer/computing_flow_op_gpu.cu diff --git a/lib/computing_label_layer/computing_label_op_gpu.cu.cc b/lib/computing_label_layer/computing_label_op_gpu.cu similarity index 100% rename from lib/computing_label_layer/computing_label_op_gpu.cu.cc rename to lib/computing_label_layer/computing_label_op_gpu.cu diff --git a/lib/gradient_reversal_layer/gradient_reversal_op_gpu.cu.cc b/lib/gradient_reversal_layer/gradient_reversal_op_gpu.cu similarity index 100% rename from lib/gradient_reversal_layer/gradient_reversal_op_gpu.cu.cc rename to lib/gradient_reversal_layer/gradient_reversal_op_gpu.cu diff --git a/lib/hough_voting_gpu_layer/hough_voting_gpu_op.cu.cc b/lib/hough_voting_gpu_layer/hough_voting_gpu_op_cc.cu similarity index 99% rename from lib/hough_voting_gpu_layer/hough_voting_gpu_op.cu.cc rename to lib/hough_voting_gpu_layer/hough_voting_gpu_op_cc.cu index 65cbbc1..9ceb0e4 100644 --- a/lib/hough_voting_gpu_layer/hough_voting_gpu_op.cu.cc +++ b/lib/hough_voting_gpu_layer/hough_voting_gpu_op_cc.cu @@ -6,7 +6,8 @@ #include #include #include -#include +#include +#include #include #include "hough_voting_gpu_op.h" diff --git a/lib/lifted_structured_loss/lifted_structured_loss_op_gpu.cu.cc b/lib/lifted_structured_loss/lifted_structured_loss_op_gpu.cu similarity index 100% rename from lib/lifted_structured_loss/lifted_structured_loss_op_gpu.cu.cc rename to lib/lifted_structured_loss/lifted_structured_loss_op_gpu.cu diff --git a/lib/make.sh b/lib/make.sh deleted file mode 100755 index bb3351e..0000000 --- a/lib/make.sh +++ /dev/null @@ -1,111 +0,0 @@ -TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') -echo $TF_INC - -TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())') - -CUDA_PATH=/usr/local/cuda - -cd average_distance_loss - -nvcc -std=c++11 -c -o average_distance_loss_op_gpu.cu.o average_distance_loss_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o average_distance_loss.so average_distance_loss_op.cc \ - average_distance_loss_op_gpu.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L$CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework - -cd .. -echo 'average_distance_loss' - -cd hough_voting_gpu_layer - -nvcc -std=c++11 -c -o hough_voting_gpu_op.cu.o hough_voting_gpu_op.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o hough_voting_gpu.so hough_voting_gpu_op.cc \ - hough_voting_gpu_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -lcublas -lopencv_imgproc -lopencv_calib3d -lopencv_core -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework - -cd .. -echo 'hough_voting_gpu_layer' - -cd hough_voting_layer - -g++ -std=c++11 -c -o Hypothesis.o Hypothesis.cpp -fPIC - -g++ -std=c++11 -c -o thread_rand.o thread_rand.cpp -fPIC - -g++ -std=c++11 -shared -o hough_voting.so hough_voting_op.cc \ - Hypothesis.o thread_rand.o -I $TF_INC -I$TF_INC/external/nsync/public \ - -fPIC -lcudart -lopencv_imgproc -lopencv_calib3d -lopencv_core -lgomp -lnlopt -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework - -cd .. -echo 'hough_voting_layer' - -cd roi_pooling_layer - -nvcc -std=c++11 -c -o roi_pooling_op.cu.o roi_pooling_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o roi_pooling.so roi_pooling_op.cc \ - roi_pooling_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -cd .. -echo 'roi_pooling_layer' - -cd triplet_loss - -nvcc -std=c++11 -c -o triplet_loss_op.cu.o triplet_loss_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o triplet_loss.so triplet_loss_op.cc \ - triplet_loss_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -cd .. -echo 'build triplet loss' - -cd lifted_structured_loss - -nvcc -std=c++11 -c -o lifted_structured_loss_op.cu.o lifted_structured_loss_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o lifted_structured_loss.so lifted_structured_loss_op.cc \ - lifted_structured_loss_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -cd .. -echo 'build lifted structured loss' - -cd computing_flow_layer - -nvcc -std=c++11 -c -o computing_flow_op.cu.o computing_flow_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o computing_flow.so computing_flow_op.cc \ - computing_flow_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -cd .. -echo 'build computing flow layer' - -cd backprojecting_layer - -nvcc -std=c++11 -c -o backprojecting_op.cu.o backprojecting_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o backprojecting.so backprojecting_op.cc \ - backprojecting_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -cd .. -echo 'build backprojecting layer' - -cd projecting_layer - -nvcc -std=c++11 -c -o projecting_op.cu.o projecting_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o projecting.so projecting_op.cc \ - projecting_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -cd .. -echo 'build projecting layer' - -cd computing_label_layer - -nvcc -std=c++11 -c -o computing_label_op.cu.o computing_label_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o computing_label.so computing_label_op.cc \ - computing_label_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -cd .. -echo 'build computing label layer' diff --git a/lib/make_one.sh b/lib/make_one.sh deleted file mode 100755 index 9fe4ed0..0000000 --- a/lib/make_one.sh +++ /dev/null @@ -1,28 +0,0 @@ -TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') -echo $TF_INC - -TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())') - -CUDA_PATH=/usr/local/cuda - -cd gradient_reversal_layer - -nvcc -std=c++11 -c -o gradient_reversal_op.cu.o gradient_reversal_op_gpu.cu.cc \ - -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -g++ -std=c++11 -shared -o gradient_reversal.so gradient_reversal_op.cc \ - gradient_reversal_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -lcublas -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework - -cd .. -echo 'gradient_reversal_layer' - -#cd hough_voting_gpu_layer - -#nvcc -std=c++11 -c -o hough_voting_gpu_op.cu.o hough_voting_gpu_op.cu.cc \ -# -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_50 - -#g++ -std=c++11 -shared -o hough_voting_gpu.so hough_voting_gpu_op.cc \ -# hough_voting_gpu_op.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -lcublas -lopencv_imgproc -lopencv_calib3d -lopencv_core -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework - -#cd .. -#echo 'hough_voting_gpu_layer' diff --git a/lib/projecting_layer/projecting_op_gpu.cu.cc b/lib/projecting_layer/projecting_op_gpu.cu similarity index 100% rename from lib/projecting_layer/projecting_op_gpu.cu.cc rename to lib/projecting_layer/projecting_op_gpu.cu diff --git a/lib/roi_pooling_layer/roi_pooling_op_gpu.cu.cc b/lib/roi_pooling_layer/roi_pooling_op_gpu.cu similarity index 100% rename from lib/roi_pooling_layer/roi_pooling_op_gpu.cu.cc rename to lib/roi_pooling_layer/roi_pooling_op_gpu.cu diff --git a/lib/setup.py b/lib/setup.py index 55667d7..df0120e 100644 --- a/lib/setup.py +++ b/lib/setup.py @@ -11,6 +11,8 @@ from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext +import tensorflow as tf +import subprocess def find_in_path(name, path): "Find a file in a search path" @@ -104,7 +106,80 @@ def build_extensions(self): customize_compiler_for_nvcc(self.compiler) build_ext.build_extensions(self) +def includes_from_flags(flags): + return [f[2:] for f in flags if f.startswith('-I')] + +def lib_libdir_from_flags(flags): + return [f[2:] for f in flags if f.startswith('-L')], [f[2:] for f in flags if f.startswith('-l')] + +tf_compile_flags = [f for f in tf.sysconfig.get_compile_flags() if not f.startswith('-I')] +tf_include_dirs = includes_from_flags(tf.sysconfig.get_compile_flags()) + +opencv_cflags = subprocess.check_output(['pkg-config', '--cflags', 'opencv-3.3.1-dev']).split() +opencv_includes = includes_from_flags(opencv_cflags) +opencv_libs = subprocess.check_output(['pkg-config', '--libs', 'opencv-3.3.1-dev']).split() +opencv_libdirs, opencv_libs = lib_libdir_from_flags(opencv_libs) + +def custom_tf_op(name, sources, use_opencv=False): + ext = Extension(name, sources, + library_dirs=[CUDA['lib64'], tf.sysconfig.get_lib()], + libraries=['cudart', 'tensorflow_framework'], + language='c++', + runtime_library_dirs=[CUDA['lib64']], + extra_compile_args={'gcc': ['-std=c++11', + '-D GOOGLE_CUDA=1']+tf_compile_flags, + 'nvcc': ['-std=c++11', + '-D GOOGLE_CUDA=1', + '-D_MWAITXINTRIN_H_INCLUDED'] + +tf_compile_flags+ + ['-Xcompiler', + '-fPIC', + '-arch=sm_50']}, + include_dirs = tf_include_dirs+[CUDA['include'], '/usr/include/eigen3'] + ) + if use_opencv: + ext.include_dirs += opencv_includes + ext.libraries += opencv_libs + ext.library_dirs += opencv_libdirs + return ext + ext_modules = [ + custom_tf_op('average_distance_loss.average_distance_loss', + ['average_distance_loss/average_distance_loss_op_gpu.cu', + 'average_distance_loss/average_distance_loss_op.cc']), + custom_tf_op('hough_voting_gpu_layer.hough_voting_gpu', + ['hough_voting_gpu_layer/hough_voting_gpu_op_cc.cu', + 'hough_voting_gpu_layer/hough_voting_gpu_op.cc'], + use_opencv=True), + custom_tf_op('hough_voting_layer.houg_voting', + ['hough_voting_layer/Hypothesis.cpp', + 'hough_voting_layer/thread_rand.cpp', + 'hough_voting_layer/hough_voting_op.cc'], + use_opencv = True), + custom_tf_op('roi_pooling_layer.roi_pooling_layer', + ['roi_pooling_layer/roi_pooling_op_gpu.cu', + 'roi_pooling_layer/roi_pooling_op.cc']), + custom_tf_op('triplet_loss.triplet_loss', + ['triplet_loss/triplet_loss_op_gpu.cu', + 'triplet_loss/triplet_loss_op.cc']), + custom_tf_op('lifted_structured_loss.lifted_structured_loss', + ['lifted_structured_loss/lifted_structured_loss_op_gpu.cu', + 'lifted_structured_loss/lifted_structured_loss_op.cc']), + custom_tf_op('computing_flow_layer.computing_flow_layer', + ['computing_flow_layer/computing_flow_op_gpu.cu', + 'computing_flow_layer/computing_flow_op.cc']), + custom_tf_op('backprojecting_layer.backprojecting', + ['backprojecting_layer/backprojecting_op_gpu.cu', + 'backprojecting_layer/backprojecting_op.cc']), + custom_tf_op('projecting_layer.projecting', + ['projecting_layer/projecting_op_gpu.cu', + 'projecting_layer/projecting_op.cc']), + custom_tf_op('computing_label_layer.computing_label', + ['computing_label_layer/computing_label_op_gpu.cu', + 'computing_label_layer/computing_label_op.cc']), + custom_tf_op('gradient_reversal_layer.gradient_reversal', + ['gradient_reversal_layer/gradient_reversal_op_gpu.cu', + 'gradient_reversal_layer/gradient_reversal_op.cc']), Extension('normals.gpu_normals', ['normals/compute_normals.cu', 'normals/gpu_normals.pyx'], library_dirs=[CUDA['lib64']], @@ -120,7 +195,7 @@ def build_extensions(self): '-c', '--compiler-options', "'-fPIC'"]}, - include_dirs = [numpy_include, CUDA['include'], '/usr/local/include/eigen3'] + include_dirs = [numpy_include, CUDA['include'], '/usr/include/eigen3'] ), Extension( "utils.cython_bbox", diff --git a/lib/triplet_loss/triplet_loss_op_gpu.cu.cc b/lib/triplet_loss/triplet_loss_op_gpu.cu similarity index 100% rename from lib/triplet_loss/triplet_loss_op_gpu.cu.cc rename to lib/triplet_loss/triplet_loss_op_gpu.cu From fdba3567d7440ec91b64945f01d0d7c6dccf264e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Audren?= Date: Thu, 19 Apr 2018 15:35:18 +0900 Subject: [PATCH 2/5] Fix compilation of kinect_fusion --- lib/kinect_fusion/src/transform/nonrigid.cu | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/kinect_fusion/src/transform/nonrigid.cu b/lib/kinect_fusion/src/transform/nonrigid.cu index e15fcfe..ca53b07 100644 --- a/lib/kinect_fusion/src/transform/nonrigid.cu +++ b/lib/kinect_fusion/src/transform/nonrigid.cu @@ -94,7 +94,7 @@ __global__ void warpMeshKernel(DeviceTensor blendedTransform; - const bool initialized = blendDualQuaternions(blendedTransform,newVertexInGridCoords,newVertexInWorldCoords, + const bool initialized = blendDualQuaternions(baseLevelTransforms(index), + newVertexInGridCoords,newVertexInWorldCoords, baseLevelVertices, baseLevelTransforms, nearestNeighborGrid, oneOverBlendingSigmaSquared); @@ -765,9 +765,7 @@ __global__ void initializeNewBaseLevelVertexTransformsKernel(const DeviceTensor1 printf("initialized %d\n",index); - blendedTransform.normalize(); - - baseLevelTransforms(index) = blendedTransform; + baseLevelTransforms(index).normalize(); } From 58755dd9827f0892535d2069dd6168dfbc0669d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Audren?= Date: Thu, 19 Apr 2018 15:40:14 +0900 Subject: [PATCH 3/5] Remove unnecessary absolute path --- lib/synthesize/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/synthesize/CMakeLists.txt b/lib/synthesize/CMakeLists.txt index f31c772..3cc0e00 100644 --- a/lib/synthesize/CMakeLists.txt +++ b/lib/synthesize/CMakeLists.txt @@ -1,6 +1,8 @@ project("synthesizer") cmake_minimum_required(VERSION 2.8) +cmake_policy(SET CMP0015 NEW) + if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() @@ -28,7 +30,7 @@ if (OPENMP_FOUND) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") endif() -set(xFusion_ROOT "/home/yuxiang/Projects/Deep_Pose/lib/kinect_fusion") +set(xFusion_ROOT "../kinect_fusion") set(xFusion_INCLUDE_DIRS ${xFusion_ROOT}/include) set(xFusion_LIBRARY_DIRS ${xFusion_ROOT}/build) set(xFusion_LIBRARIES kfusion) From 50ed70251ec7e4d2e23855c7a392703549cafac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Audren?= Date: Thu, 19 Apr 2018 15:44:47 +0900 Subject: [PATCH 4/5] Ignore build artifacts --- lib/.gitignore | 1 + lib/kinect_fusion/.gitignore | 1 + lib/nms/.gitignore | 1 + lib/normals/.gitignore | 1 + lib/synthesize/.gitignore | 1 + 5 files changed, 5 insertions(+) create mode 100644 lib/.gitignore create mode 100644 lib/kinect_fusion/.gitignore create mode 100644 lib/nms/.gitignore create mode 100644 lib/normals/.gitignore create mode 100644 lib/synthesize/.gitignore diff --git a/lib/.gitignore b/lib/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/lib/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/lib/kinect_fusion/.gitignore b/lib/kinect_fusion/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/lib/kinect_fusion/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/lib/nms/.gitignore b/lib/nms/.gitignore new file mode 100644 index 0000000..6b749b8 --- /dev/null +++ b/lib/nms/.gitignore @@ -0,0 +1 @@ +gpu_nms.cpp diff --git a/lib/normals/.gitignore b/lib/normals/.gitignore new file mode 100644 index 0000000..7b0e59e --- /dev/null +++ b/lib/normals/.gitignore @@ -0,0 +1 @@ +gpu_normals.cpp diff --git a/lib/synthesize/.gitignore b/lib/synthesize/.gitignore new file mode 100644 index 0000000..6909d7a --- /dev/null +++ b/lib/synthesize/.gitignore @@ -0,0 +1 @@ +synthesizer.cpp From 4bd056369b58fe4152107c201e4452e7118cd19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Audren?= Date: Thu, 19 Apr 2018 15:51:09 +0900 Subject: [PATCH 5/5] Update README --- README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7f62e13..cc35a4f 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,9 @@ If you find PoseCNN useful in your research, please consider citing: 1. Install [TensorFlow](https://www.tensorflow.org/get_started/os_setup). I usually compile the source code of tensorflow locally. -2. Compile the new layers under $ROOT/lib we introduce in PoseCNN. - ```Shell - cd $ROOT/lib - sh make.sh - ``` -3. Download the VGG16 weights from [here](https://drive.google.com/open?id=1UdmOKrr9t4IetMubX-y-Pcn7AVaWJ2bL) (528M). Put the weight file vgg16.npy to $ROOT/data/imagenet_models. +2. Download the VGG16 weights from [here](https://drive.google.com/open?id=1UdmOKrr9t4IetMubX-y-Pcn7AVaWJ2bL) (528M). Put the weight file vgg16.npy to $ROOT/data/imagenet_models. -4. Compile lib/synthesize with cmake (optional). This package contains a few useful tools such as generating synthetic image and ICP. +3. Compile lib/synthesize with cmake. This package contains a few useful tools such as generating synthetic image and ICP. Install dependencies: - [Pangolin](https://github.com/stevenlovegrove/Pangolin) @@ -51,7 +46,7 @@ If you find PoseCNN useful in your research, please consider citing: make ``` - Compile the Cython interface for lib/synthesize + Compile the Cython interface for lib/synthesize and custom layers ```Shell cd $ROOT/lib python setup.py build_ext --inplace