3 ms·
I have one of these powering my open source four wheel drive robot. [1] I've started doing machine learning experiments with it finally. (See [1] for details)
by TaylorAlexander 7y ago
I have one of these powering my open source four wheel drive robot. [1]
I've started doing machine learning experiments with it finally. (See [1] for details)
There's a few tricks to getting the best performance. You want to convert your neural network to run with NVIDIA's TensorRT library instead of just tensorflow or torch. TensorRT does all the optimized goodness that gets you the most out of the hardware. Not all possible network operations can run in TensorRT (though nvidia updates the framework regularly). This means some networks can't be easily converted to something fully optimized for this platform. Facebook's detectron2 for example uses some operations that don't readily convert. [2]
But then if you're new like me you've got to both find some code that will ultimately produce something you can convert to TensorRT, and you also need something that you can easily train. I've learned that training using your own dataset is often non-obvious. A lot of example code shows how to use an existing dataset but they totally gloss over the specific label format those datasets use. That means you've got to do some digging to figure out how to make your own dataset load properly in to the training code.
After trying a few different things, I've gotten some good results training using Bonnet(al) [3]. I was able to make enough sense of its training code to use my own dataset, and it looks like it will readily convert to TensorRT. Then you load the converted network using NVIDIA's Deepstream library for maximum pipeline efficiency [4].
The performance numbers for the AGX Xavier are very good, and I am hopeful I will get my application fully operation soon enough.
[1] https://reboot.love/t/new-cameras-on-rover/ https://reboot.love/t/new-cameras-on-rover/
[2] https://github.com/facebookresearch/detectron2/issues/192 https://github.com/facebookresearch/detectron2/issues/192
[3] https://github.com/PRBonn/bonnetal https://github.com/PRBonn/bonnetal
[4] https://developer.nvidia.com/deepstream-sdk https://developer.nvidia.com/deepstream-sdk
- m3at 7y agoCool robot! For dealing with layers not supported by TensorRT, you might want to try to export to onnx instead and then use tvm[1] to compile your model for the hardware. I have not used it on nvidia boards yet, but I had good experience on other less powerful ARM boards, and as tvm docs show some examples running on jetson tx I imagine the AGX Xavier is likely fine too. [1] https://tvm.apache.org/ https://tvm.apache.org/