File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
image_recognition_openpose Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ Example for the following picture:
31
31
![ Example] ( doc/example.jpg )
32
32
33
33
``` bash
34
- export MODEL_FOLDER=~ /openpose/models
35
- rosrun image_recognition_openpose detect_poses $MODEL_FOLDER image ` rospack find image_recognition_openpose` /doc/example.jpg
34
+ rosrun image_recognition_openpose detect_poses image ` rospack find image_recognition_openpose` /doc/example.jpg
36
35
```
37
36
38
37
Output:
@@ -87,8 +86,7 @@ optional arguments:
87
86
Run the image_recognition_openpose node in one terminal, e.g.:
88
87
89
88
``` bash
90
- export MODEL_FOLDER=~ /openpose/models
91
- rosrun image_recognition_openpose openpose_node _model_folder:=$MODEL_FOLDER
89
+ rosrun image_recognition_openpose openpose_node
92
90
```
93
91
94
92
Next step is starting the image_recognition_Rqt test gui (https://github.com/tue-robotics/image_recognition_rqt )
Original file line number Diff line number Diff line change 2
2
3
3
import argparse
4
4
import logging
5
+ import os
5
6
import sys
6
7
7
8
import cv2
8
-
9
9
from image_recognition_openpose import OpenposeWrapper
10
10
11
11
parser = argparse .ArgumentParser (description = 'Detect poses in an image' ,
12
12
formatter_class = argparse .ArgumentDefaultsHelpFormatter )
13
- parser .add_argument ('model_folder' , help = 'Path where the models are stored' )
13
+ parser .add_argument ('--model_folder' , help = 'Path where the models are stored' ,
14
+ default = os .path .expanduser ('~/openpose/models' ))
14
15
parser .add_argument ('--pose_model' , help = 'What pose model to use' , default = "BODY_25" )
15
16
parser .add_argument ('--net_input_size' , help = 'Net input size' , default = "-1x368" )
16
17
parser .add_argument ('--net_output_size' , help = 'Net output size' , default = "-1x-1" )
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ if __name__ == '__main__':
139
139
140
140
try :
141
141
node = OpenposeNode (
142
- rospy .get_param ("~model_folder" ),
142
+ rospy .get_param ("~model_folder" , default = os . path . expanduser ( '~/openpose/models' ) ),
143
143
rospy .get_param ("~pose_model" , "BODY_25" ),
144
144
rospy .get_param ("~net_input_size" , "-1x368" ),
145
145
rospy .get_param ("~net_output_size" , "-1x-1" ),
You can’t perform that action at this time.
0 commit comments