Skip to content

Commit

Permalink
Updated submodules and TX2 JetPack scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gineshidalgo99 committed Jan 15, 2019
1 parent 2fe8292 commit a620d41
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 224 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/caffe
Submodule caffe updated 47 files
+9 −4 CMakeLists.txt
+11 −1 Makefile
+2 −0 Makefile.config.Ubuntu14_cuda8.example
+129 −0 Makefile.config.Ubuntu16_cuda9_JetsonTX2_JetPack33
+12 −0 cmake/ConfigGen.cmake
+4 −2 cmake/Cuda.cmake
+8 −0 cmake/Dependencies.cmake
+1 −1 cmake/Modules/FindMKL.cmake
+2 −0 cmake/Summary.cmake
+1 −1 docs/tutorial/interfaces.md
+1 −0 docs/tutorial/layers.md
+20 −0 docs/tutorial/layers/clip.md
+75 −0 include/caffe/layers/clip_layer.hpp
+1 −0 include/caffe/layers/pooling_layer.hpp
+3 −3 include/caffe/net.hpp
+3 −2 include/caffe/sgd_solvers.hpp
+4 −3 include/caffe/solver.hpp
+2 −2 include/caffe/syncedmem.hpp
+2 −0 include/caffe/util/hdf5.hpp
+1 −1 include/caffe/util/signal_handler.h
+3 −12 install_caffe_JetsonTX2_JetPack3.1.sh
+60 −0 install_caffe_JetsonTX2_JetPack3.3.sh
+4 −13 install_caffe_if_cuda8.sh
+13 −9 python/caffe/_caffe.cpp
+11 −0 python/caffe/test/test_solver.py
+1 −1 python/train.py
+4 −4 scripts/travis/install-deps.sh
+3 −1 src/caffe/CMakeLists.txt
+1 −0 src/caffe/layer_factory.cpp
+51 −0 src/caffe/layers/clip_layer.cpp
+67 −0 src/caffe/layers/clip_layer.cu
+2 −0 src/caffe/layers/hdf5_data_layer.cpp
+2 −0 src/caffe/layers/hdf5_data_layer.cu
+2 −0 src/caffe/layers/hdf5_output_layer.cpp
+2 −0 src/caffe/layers/hdf5_output_layer.cu
+1 −1 src/caffe/layers/inner_product_layer.cpp
+18 −5 src/caffe/layers/pooling_layer.cpp
+17 −4 src/caffe/net.cpp
+17 −4 src/caffe/proto/caffe.proto
+3 −7 src/caffe/solver.cpp
+16 −0 src/caffe/solvers/sgd_solver.cpp
+2 −0 src/caffe/test/test_hdf5_output_layer.cpp
+2 −0 src/caffe/test/test_hdf5data_layer.cpp
+61 −0 src/caffe/test/test_neuron_layer.cpp
+2 −2 src/caffe/test/test_syncedmem.cpp
+2 −0 src/caffe/util/hdf5.cpp
+1 −1 src/caffe/util/signal_handler.cpp
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ if (UNIX OR APPLE)
list(LENGTH CAFFE_DIR_VALID CAFFE_DIR_VALID_LENGTH)
if (CAFFE_DIR_VALID_LENGTH EQUAL 0)
execute_process(COMMAND git submodule update --init ${CMAKE_SOURCE_DIR}/3rdparty/caffe)
# execute_process(COMMAND git submodule update --init --recursive) # This would initialize them all
# execute_process(COMMAND git submodule update --init --recursive --remote) # This would initialize them all
else (CAFFE_DIR_VALID_LENGTH EQUAL 0)
message(STATUS "Caffe has already been downloaded.")
endif (CAFFE_DIR_VALID_LENGTH EQUAL 0)
Expand Down Expand Up @@ -923,7 +923,7 @@ if (BUILD_PYTHON)
elseif (UNIX OR APPLE)
if (Caffe_FOUND)
execute_process(COMMAND git submodule update --init ${CMAKE_SOURCE_DIR}/3rdparty/pybind11/)
# execute_process(COMMAND git submodule update --init --recursive) # This would initialize them all
# execute_process(COMMAND git submodule update --init --recursive --remote) # This would initialize them all
add_subdirectory(3rdparty/pybind11)
add_subdirectory(python)
endif (Caffe_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion doc/installation_deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Alternatively to the script installation, if you want to use CUDA 7, avoid using
2. Compile Caffe and OpenPose by running these lines:
```
### Install Caffe ###
git submodule update --init --recursive
git submodule update --init --recursive --remote
cd 3rdparty/caffe/
# Select your desired Makefile file (run only one of the next 4 commands)
cp Makefile.config.Ubuntu14_cuda7.example Makefile.config # Ubuntu 14, cuda 7
Expand Down
2 changes: 1 addition & 1 deletion doc/installation_jetson_tx2_jetpack3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Notes:
## Installation
Use the following script for installation of both caffe and OpenPose:
```
./scripts/ubuntu/install_caffe_and_openpose_JetsonTX2_JetPack3.1.sh
bash ./scripts/ubuntu/install_caffe_and_openpose_JetsonTX2_JetPack3.1.sh
```


Expand Down
2 changes: 1 addition & 1 deletion doc/installation_jetson_tx2_jetpack3.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Notes:
## Installation
Use the following script for installation of both caffe and OpenPose:
```
./scripts/ubuntu/install_caffe_and_openpose_JetsonTX2_JetPack3.3.sh
bash ./scripts/ubuntu/install_caffe_and_openpose_JetsonTX2_JetPack3.3.sh
```


Expand Down
4 changes: 2 additions & 2 deletions examples/tutorial_api_python/1_body_from_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append(dir_path + '/../../python/openpose/Release');
os.environ['PATH'] = os.environ['PATH'] + ';' + dir_path + '/../../x64/Release;' + dir_path + '/../../bin;'
import openpose_python as op
import pyopenpose as op
else:
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append('../../python');
# If you run `make install` (default path is `/usr/local/python` for Ubuntu), you can also access the OpenPose/python module from there. This will install OpenPose and the python library at your desired installation path. Ensure that this is in your python path in order to use it.
# sys.path.append('/usr/local/python')
from openpose import openpose_python as op
from openpose import pyopenpose as op
except:
raise Exception('Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?')

Expand Down
4 changes: 2 additions & 2 deletions examples/tutorial_api_python/2_whole_body_from_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append(dir_path + '/../../python/openpose/Release');
os.environ['PATH'] = os.environ['PATH'] + ';' + dir_path + '/../../x64/Release;' + dir_path + '/../../bin;'
import openpose_python as op
import pyopenpose as op
else:
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append('../../python');
# If you run `make install` (default path is `/usr/local/python` for Ubuntu), you can also access the OpenPose/python module from there. This will install OpenPose and the python library at your desired installation path. Ensure that this is in your python path in order to use it.
# sys.path.append('/usr/local/python')
from openpose import openpose_python as op
from openpose import pyopenpose as op
except:
raise Exception('Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?')

Expand Down
4 changes: 2 additions & 2 deletions examples/tutorial_api_python/3_heatmaps_from_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append(dir_path + '/../../python/openpose/Release');
os.environ['PATH'] = os.environ['PATH'] + ';' + dir_path + '/../../x64/Release;' + dir_path + '/../../bin;'
import openpose_python as op
import pyopenpose as op
else:
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append('../../python');
# If you run `make install` (default path is `/usr/local/python` for Ubuntu), you can also access the OpenPose/python module from there. This will install OpenPose and the python library at your desired installation path. Ensure that this is in your python path in order to use it.
# sys.path.append('/usr/local/python')
from openpose import openpose_python as op
from openpose import pyopenpose as op
except:
raise Exception('Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?')

Expand Down
2 changes: 1 addition & 1 deletion examples/tutorial_api_python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Add Python Test
configure_file(openpose_test.py openpose_test.py)
configure_file(openpose_python.py openpose_python.py)
configure_file(1_body_from_image.py 1_body_from_image.py)
configure_file(2_whole_body_from_image.py 2_whole_body_from_image.py)
configure_file(3_heatmaps_from_image.py 3_heatmaps_from_image.py)
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append(dir_path + '/../../python/openpose/Release');
os.environ['PATH'] = os.environ['PATH'] + ';' + dir_path + '/../../x64/Release;' + dir_path + '/../../bin;'
import openpose_python as op
import pyopenpose as op
else:
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append('../../python');
# If you run `make install` (default path is `/usr/local/python` for Ubuntu), you can also access the OpenPose/python module from there. This will install OpenPose and the python library at your desired installation path. Ensure that this is in your python path in order to use it.
# sys.path.append('/usr/local/python')
from openpose import openpose_python as op
from openpose import pyopenpose as op
except:
raise Exception('Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?')

Expand Down
8 changes: 4 additions & 4 deletions python/openpose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ set(PYTHON_FILES
__init__.py
openpose_python.cpp)

pybind11_add_module(openpose_python openpose_python.cpp)
pybind11_add_module(pyopenpose openpose_python.cpp)

target_link_libraries(openpose_python PRIVATE pybind11::module openpose ${OpenPose_3rdparty_libraries})
SET_TARGET_PROPERTIES(openpose_python PROPERTIES PREFIX "")
target_link_libraries(pyopenpose PRIVATE pybind11::module openpose ${OpenPose_3rdparty_libraries})
SET_TARGET_PROPERTIES(pyopenpose PROPERTIES PREFIX "")
configure_file(__init__.py __init__.py)

# install(TARGETS openpose_python DESTINATION python)
# install(TARGETS pyopenpose DESTINATION python)
# install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION python/openpose FILES_MATCHING PATTERN "*.so")
# install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION python/openpose FILES_MATCHING PATTERN "*.py")
2 changes: 1 addition & 1 deletion python/openpose/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import openpose_python as openpose_python
from . import pyopenpose as pyopenpose
2 changes: 1 addition & 1 deletion python/openpose/openpose_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class WrapperPython{
}
};

PYBIND11_MODULE(openpose_python, m) {
PYBIND11_MODULE(pyopenpose, m) {

// Functions for Init Params
m.def("init_int", &init_int, "Init Function");
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [[ $RUN_EXAMPLES == true ]] ; then
if [[ $WITH_PYTHON == true ]] ; then
echo "Python API C++: OpenPose demo..."
cd build/examples/tutorial_api_python
python openpose_test.py --net_resolution -1x32 --image_dir ../../../examples/media/ --write_json output/ --display 0 --render_pose 0
python openpose_python.py --net_resolution -1x32 --image_dir ../../../examples/media/ --write_json output/ --display 0 --render_pose 0
echo " "
# Note: All Python examples require GUI
fi
Expand Down
129 changes: 0 additions & 129 deletions scripts/ubuntu/Makefile.config.Ubuntu16_cuda9_JetsonTX2_caffe

This file was deleted.

60 changes: 0 additions & 60 deletions scripts/ubuntu/install_caffe_JetsonTX2_JetPack3.3.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function executeShInItsFolder {



git submodule update --init --recursive
git submodule update --init --recursive --remote
executeShInItsFolder "install_caffe_JetsonTX2_JetPack3.1.sh" "./3rdparty/caffe" "../.."
exitIfError

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ function executeShInItsFolder {
}


rm -r ./3rdparty/caffe
git submodule update --init --recursive
mv ./scripts/ubuntu/install_caffe_JetsonTX2_JetPack3.3.sh ./3rdparty/caffe/install_caffe_JetsonTX2_JetPack3.3.sh
mv ./scripts/ubuntu/Makefile.config.Ubuntu16_cuda9_JetsonTX2_caffe ./3rdparty/caffe/Makefile.config.Ubuntu16_cuda9_JetsonTX2_caffe

rm -rf ./3rdparty/caffe && mkdir ./3rdparty/caffe
git submodule update --init --recursive --remote
executeShInItsFolder "install_caffe_JetsonTX2_JetPack3.3.sh" "./3rdparty/caffe" "../.."
exitIfError

Expand Down
2 changes: 0 additions & 2 deletions scripts/ubuntu/install_openpose_JetsonTX2_JetPack3.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ echo ""


echo "------------------------- Compiling OpenPose -------------------------"
# Go back to main folder
cd ../..
# Copy Makefile & Makefile.config
cp scripts/ubuntu/Makefile.example Makefile
cp scripts/ubuntu/Makefile.config.Ubuntu16_cuda8_JetsonTX2 Makefile.config
Expand Down
Loading

0 comments on commit a620d41

Please sign in to comment.