Closed Shreeyak closed 6 years ago
For the first rosrun
command - if you are running it on Jetson, the first time it might take up to 3-5 minutes for TensorRT to compile the model. Just wait a bit more...
The second rosrun
command contains a typo at the end: _output_layer:fc25
(missing =
) - so the argument is ignored and default output layer name, prob
, is used as reported by the node.
The third rosrun
command does not have leading /
REDTAIL_MODEL_DIR
env variable, so the current path used instead which is probably not what you want.
As for the tests - check your paths etc.
Aah, how did I miss those! Thank you for the quick response, @Alexey-Kamenev ! I just made the changes and they seem to go beyond the error stage! I'm getting this on my PC (Cuda 9, TensorRT 4.0):
$ ./launch_caffe_ros.sh
...
[ INFO] [1534447173.129896414]: Loaded model from: /home/shrek/stroll-e/redtail/models/pretrained/yolo-relu.prototxt, /home/shrek/stroll-e/redtail/models/pretrained/yolo-relu.caffemodel
[ INFO] [1534447173.129936623]: Building CUDA engine...
[ INFO] [1534447211.052500550]: Done building.
[ INFO] [1534447211.065483520]: Saving cached model to: /home/shrek/stroll-e/redtail/models/pretrained/yolo-relu.caffemodel.cache
[ INFO] [1534447211.483300622]: Created CUDA engine and context.
[ INFO] [1534447211.483328679]: Input : (W: 448, H: 448, C: 3).
[ INFO] [1534447211.483883560]: Output: (W: 1, H: 1, C:1470).
$ rostopic list
/camera/image_raw
/rosout
/rosout_agg
/yolo_dnn/network/output
This is the script I'm using to launch:
rosrun caffe_ros caffe_ros_node __name:=yolo_dnn \
_prototxt_path:=/home/shrek/redtail/models/pretrained/yolo-relu.prototxt \
_model_path:=/home/shrek/redtail/models/pretrained/yolo-relu.caffemodel \
_input_layer:=data \
_output_layer:=fc25
Thank you! It's running on both the TX2 and on my PC. TX2 took a few minutes to create the CUDA engine, as you said. Any idea if the model is supposed to work on Cuda 9, TensorRT 4.0? I've been thinking of going with Tensorflow of simplicity of development, but maybe I just need to learn DIGITS/caffe.
Current redtail code tested and confirmed to work in the following configurations:
As for Caffe vs TensorFlow: the reason we had to use Caffe is back in 2016 when we started the project, Caffe was the only framework supported by TensorRT. These days you can load pretty much any model in TRT (e.g. using ONNX parser or TF-TRT etc). I would definitely use TF or pytrorch for any new project.
Thank you, this is great news! Also appreciate the inputs on tensorflow. I will try to get something up in tensorflow soon and share information.
At this point, would you have any suggestions for models for segmentation? I'm considering SegNet or Unet at the moment. I was wondering if you'd be aware of any other tensorflow implementations for semantic segmentation that would be suited for the TX2.
For semantic segmentation, I would recommend checking out MobileNet-based DeepLab nets - they should work well on TX2. However, I haven't tried that so I cannot say for sure. Our team is also working on semantic/instance segmentation optimized for Jetson but we are not ready to release our work yet.
Thank you, I truly appreciate your inputs!
Closing, feel free to re-open or create a new one.
same problem what you did not notice is that there is an Assertion error ,which I embraced.
I have set the time limit to 1000, still no results got out.
rostest caffe_ros tests_basic.launch test_data_dir:=$REDTAIL_TEST_DIR model_dir:=$REDTAIL_MODEL_DIR trail_prototxt_path:=$REDTAIL_MODEL_DIR/TrailNet_SResNet-18.prototxt trail_model_path:=$REDTAIL_MODEL_DIR/TrailNet_SResNet-18.caffemodel object_prototxt_path:=$REDTAIL_MODEL_DIR/yolo-relu.prototxt object_model_path:=$REDTAIL_MODEL_DIR/yolo-relu.caffemodel
... logging to /home/nvidia/.ros/log/rostest-tegra-ubuntu-6698.log
[ROSUNIT] Outputting test results to /home/nvidia/.ros/test_results/caffe_ros/rostest-tests_tests_basic.xml
caffe_ros_tests: /usr/include/boost/smart_ptr/shared_ptr.hpp:641: typename boost::detail::sp_dereference
///////////////////////////////////////////////////////////// Assertion `px != 0' failed. //////////////////////////////////////////////
[ROSTEST]-----------------------------------------------------------------------
SUMMARY
rostest log file is in /home/nvidia/.ros/log/rostest-tegra-ubuntu-6698.log
@Alexey-Kamenev any suggestions for my question? thanks
I tried running the caffe_ros node on my Host 16.04 with Cuda 9 as well as a jetson on Cuda 9. The model does not execute/pass tests on either. How do I update the code for use with Cuda 9?
Here is the error from Jetson TX2 (flashed with Jetpack 3.2.1):
This is the error code from my host (Ubuntu 16.04, TensorRT 4.0, Cuda 9):