Skip to content

Commit

Permalink
Scripts for Jetson TX2 working
Browse files Browse the repository at this point in the history
  • Loading branch information
gineshidalgo99 committed Jan 16, 2019
1 parent a620d41 commit 6a6d668
Show file tree
Hide file tree
Showing 11 changed files with 398 additions and 45 deletions.
1 change: 1 addition & 0 deletions include/openpose/pose/enumClasses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace op
BODY_19E, /**< Experimental. Do not use. */
BODY_25B, /**< Experimental. Do not use. */
BODY_95, /**< Experimental. Do not use. */
BODY_135, /**< Experimental. Do not use. */
Size,
};

Expand Down
170 changes: 170 additions & 0 deletions include/openpose/pose/poseParametersRender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,176 @@ namespace op
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f
// BODY_135
const auto H135 = 25;
const auto F135 = H135 + 40;
#define POSE_BODY_135_PAIRS_RENDER_GPU \
0,1, 0,2, 1,3, 2,4, 5,7, 6,8, 7,9, 8,10, 5,11, 6,12, 11,13, 12,14, 13,15, 14,16, \
15,19, 19,20, 15,21, 16,22, 22,23, 16,24, 5,17, \
6,17, 17,18, 11,12, \
\
9,H135+0, H135+0,H135+1, H135+1,H135+2, H135+2,H135+3, 9,H135+4, H135+4,H135+5, H135+5,H135+6, H135+6,H135+7, \
9,H135+8, H135+8,H135+9, H135+9,H135+10, H135+10,H135+11, 9,H135+12, H135+12,H135+13, H135+13,H135+14, H135+14,H135+15, \
9,H135+16, H135+16,H135+17, H135+17,H135+18, H135+18,H135+19, \
\
10,H135+20, H135+20,H135+21, H135+21,H135+22, H135+22,H135+23, 10,H135+24, H135+24,H135+25, H135+25,H135+26, H135+26,H135+27, \
10,H135+28, H135+28,H135+29, H135+29,H135+30, H135+30,H135+31, 10,H135+32, H135+32,H135+33, H135+33,H135+34, H135+34,H135+35, \
10,H135+36, H135+36,H135+37, H135+37,H135+38, H135+38,H135+39, \
\
F135+0,F135+1, F135+1,F135+2, F135+2,F135+3, F135+3,F135+4, F135+4,F135+5, F135+5,F135+6, F135+6,F135+7, F135+7,F135+8, F135+8,F135+9, F135+9,F135+10, F135+10,F135+11, F135+11,F135+12, F135+12,F135+13, F135+13,F135+14, F135+14,F135+15, F135+15,F135+16, F135+17,F135+18, F135+18,F135+19, F135+19,F135+20, \
F135+20,F135+21, F135+22,F135+23, F135+23,F135+24, F135+24,F135+25, F135+25,F135+26, F135+27,F135+28, F135+28,F135+29, F135+29,F135+30, F135+31,F135+32, F135+32,F135+33, F135+33,F135+34, F135+34,F135+35, F135+36,F135+37, F135+37,F135+38, F135+38,F135+39, F135+39,F135+40, F135+40,F135+41, \
F135+41,F135+36, F135+42,F135+43, F135+43,F135+44, F135+44,F135+45, F135+45,F135+46, F135+46,F135+47, F135+47,F135+42, F135+48,F135+49, F135+49,F135+50, F135+50,F135+51, F135+51,F135+52, F135+52,F135+53, F135+53,F135+54, F135+54,F135+55, F135+55,F135+56, F135+56,F135+57, F135+57,F135+58, \
F135+58,F135+59, F135+59,F135+48, F135+60,F135+61, F135+61,F135+62, F135+62,F135+63, F135+63,F135+64, F135+64,F135+65, F135+65,F135+66, F135+66,F135+67, F135+67,F135+60
#define POSE_BODY_135_SCALES_RENDER_GPU \
1.f,1.f,1.f,1.f,1.f, 1.f,1.f,1.f,1.f,1.f, 1.f,1.f,1.f,1.f,1.f, 1.f,1.f, \
1.f,1.f, \
1.f,1.f,1.f,1.f,1.f,1.f, \
0.75f,0.75f,0.75f,0.75f,0.75f, 0.75f,0.75f,0.75f,0.75f,0.75f, 0.75f,0.75f,0.75f,0.75f,0.75f, 0.75f,0.75f,0.75f,0.75f,0.75f, \
0.75f,0.75f,0.75f,0.75f,0.75f, 0.75f,0.75f,0.75f,0.75f,0.75f, 0.75f,0.75f,0.75f,0.75f,0.75f, 0.75f,0.75f,0.75f,0.75f,0.75f, \
0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, \
0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, \
0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f, \
0.33f,0.33f,0.33f,0.33f,0.33f, 0.33f,0.33f,0.33f,0.33f,0.33f
#define POSE_BODY_135_COLORS_RENDER_GPU \
255.f, 0.f, 85.f, \
170.f, 0.f, 255.f, \
255.f, 0.f, 170.f, \
85.f, 0.f, 255.f, \
255.f, 0.f, 255.f, \
170.f, 255.f, 0.f, \
255.f, 85.f, 0.f, \
85.f, 255.f, 0.f, \
255.f, 170.f, 0.f, \
0.f, 255.f, 0.f, \
255.f, 255.f, 0.f, \
0.f, 170.f, 255.f, \
0.f, 255.f, 85.f, \
0.f, 85.f, 255.f, \
0.f, 255.f, 170.f, \
0.f, 0.f, 255.f, \
0.f, 255.f, 255.f, \
255.f, 0.f, 0.f, \
255.f, 0.f, 0.f, \
\
0.f, 0.f, 255.f, \
0.f, 0.f, 255.f, \
0.f, 0.f, 255.f, \
0.f, 255.f, 255.f, \
0.f, 255.f, 255.f, \
0.f, 255.f, 255.f, \
\
255.f, 0.f, 0.f, \
191.f, 47.f, 47.f, \
127.f, 63.f, 63.f, \
63.f, 47.f, 47.f, \
255.f, 76.f, 0.f, \
191.f, 57.f, 0.f, \
127.f, 38.f, 0.f, \
63.f, 19.f, 0.f, \
255.f, 152.f, 0.f, \
191.f, 114.f, 0.f, \
127.f, 76.f, 0.f, \
63.f, 38.f, 0.f, \
255.f, 255.f, 0.f, \
191.f, 191.f, 0.f, \
127.f, 127.f, 0.f, \
63.f, 63.f, 0.f, \
0.f, 255.f, 0.f, \
0.f, 191.f, 0.f, \
0.f, 127.f, 0.f, \
0.f, 63.f, 0.f, \
\
255.f, 0.f, 153.f, \
191.f, 0.f, 114.f, \
127.f, 0.f, 76.f, \
63.f, 0.f, 38.f, \
203.f, 0.f, 255.f, \
152.f, 0.f, 191.f, \
101.f, 0.f, 127.f, \
50.f, 0.f, 63.f, \
50.f, 0.f, 255.f, \
37.f, 0.f, 191.f, \
25.f, 0.f, 127.f, \
12.f, 0.f, 63.f, \
0.f, 102.f, 255.f, \
0.f, 76.f, 191.f, \
0.f, 51.f, 127.f, \
0.f, 25.f, 63.f, \
0.f, 255.f, 255.f, \
0.f, 191.f, 191.f, \
0.f, 127.f, 127.f, \
0.f, 63.f, 63.f, \
\
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f, \
255.f, 255.f, 255.f

// CAR_12
#define POSE_CAR_12_PAIRS_RENDER_GPU \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exitIfError



executeShInItsFolder "install_openpose_JetsonTX2_JetPack3.3.sh" "./scripts/ubuntu/" "./"
executeShInItsFolder "./scripts/ubuntu/install_openpose_JetsonTX2_JetPack3.3.sh" "./" "./"
exitIfError


Expand Down
9 changes: 1 addition & 8 deletions scripts/ubuntu/install_openpose_JetsonTX2_JetPack3.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,9 @@ function executeShInItsFolder {



echo "------------------------- Checking Ubuntu Version -------------------------"
# If you respected the installation assumptions, nothing to do.
echo "------------------------- Ubuntu Version Checked -------------------------"
echo ""



echo "------------------------- Compiling OpenPose -------------------------"
# Copy Makefile & Makefile.config
cp scripts/ubuntu/Makefile.example_openpose Makefile
cp scripts/ubuntu/Makefile.example Makefile
cp scripts/ubuntu/Makefile.config.Ubuntu16_cuda9_JetsonTX2_JetPack33 Makefile.config
# Compile OpenPose
make all -j`nproc`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exitIfError



executeShInItsFolder "install_openpose_if_cuda8.sh" "./scripts/ubuntu_deprecated/" "./"
executeShInItsFolder "./scripts/ubuntu_deprecated/install_openpose_if_cuda8.sh" "./" "./"
exitIfError


Expand Down
2 changes: 1 addition & 1 deletion scripts/ubuntu_deprecated/install_openpose_if_cuda8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function executeShInItsFolder {



executeShInItsFolder "scripts/ubuntu_deprecated/copy_makefile_files.sh" "../.." "./"
executeShInItsFolder "scripts/ubuntu_deprecated/copy_makefile_files.sh" "./" "./"



Expand Down
3 changes: 2 additions & 1 deletion src/openpose/filestream/cocoJsonSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ namespace op
indexesInCocoOrder = std::vector<int>{0, 14,13,16,15, 4,1,5,2,6, 3,10,7,11, 8, 12, 9};
else if (numberBodyParts == 18)
indexesInCocoOrder = std::vector<int>{0, 15,14,17,16, 5,2,6,3,7, 4,11,8,12, 9, 13,10};
else if (mPoseModel == PoseModel::BODY_25B || mPoseModel == PoseModel::BODY_95)
else if (mPoseModel == PoseModel::BODY_25B || mPoseModel == PoseModel::BODY_95
|| mPoseModel == PoseModel::BODY_135)
indexesInCocoOrder = std::vector<int>{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
else if (numberBodyParts == 19 || numberBodyParts == 25 || numberBodyParts == 59)
indexesInCocoOrder = std::vector<int>{0, 16,15,18,17, 5,2,6,3,7, 4,12,9,13,10, 14,11};
Expand Down
Loading

0 comments on commit 6a6d668

Please sign in to comment.