Hi,
Thanks for your patience.
Here is steps to generate MaskRCNN uff on the Jetson.
1. Install prerequisite
sudo apt-get update
sudo apt-get install -y build-essential libatlas-base-dev gfortran libfreetype6-dev python3-setuptools
sudo apt-get install -y protobuf-compiler libprotobuf-dev openssl libssl-dev libcurl4-openssl-dev
2. Upgrade cmake
wget http://www.cmake.org/files/v3.13/cmake-3.13.0.tar.gz
tar xpvf cmake-3.13.0.tar.gz cmake-3.13.0/
cd cmake-3.13.0/
./bootstrap --system-curl
make -j8
echo 'export PATH=/home/nvidia/cmake-3.13.0/bin/:$PATH' >> ~/.bashrc
source ~/.bashrc
3. Install scipy
wget https://github.com/scipy/scipy/releases/download/v1.3.3/scipy-1.3.3.tar.gz
tar -xzvf scipy-1.3.3.tar.gz scipy-1.3.3
cd scipy-1.3.3/
python3 setup.py install --user
4. Compile TensorRT OSS
git clone https://github.com/nvidia/TensorRT TensorRT
cd TensorRT
git submodule update --init --recursive
mkdir -p build && cd build
cmake -DCUBLASLT_LIB=/usr/local/cuda-10.0/targets/aarch64-linux/lib/libcublas.so ..
make -j8
5. Run SampleMaskRCNN
Install requirement
pip install -r $TRT_SOURCE/samples/opensource/sampleUffMaskRCNN/converted/requirements.txt
Modify /usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter_functions.py
uff_graph.conv_transpose(
inputs[0], inputs[2], inputs[1],
strides, padding,
dilation=None, number_groups=number_groups,
left_format=lhs_fmt, right_format=rhs_fmt,
name=name, fields=fields
)
Setting Mast_RCNN
git clone https://github.com/matterport/Mask_RCNN.git
export PYTHONPATH=$PYTHONPATH:$PWD/Mask_RCNN
cd Mask_RCNN
git checkout 3deaec5
git am $TRT_SOURCE/samples/opensource/sampleUffMaskRCNN/converted/0001-Update-the-Mask_RCNN-model-from-NHWC-to-NCHW.patch
Download data
cd /path/to/data
wget https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5
cp /usr/src/tensorrt/data/faster-rcnn/001763.ppm .
cp /usr/src/tensorrt/data/faster-rcnn/004545.ppm .
Run
cd $TRT_SOURCE/samples/opensource/sampleUffMaskRCNN/converted/
python3 mrcnn_to_trt_single.py -w /path/to/data/mask_rcnn_coco.h5 -o /path/to/data/mrcnn_nchw.uff -p ./config.py
cd $TRT_SOURCE/build
./sample_uff_maskRCNN -d /path/to/data
Please noticed that we found there is issue when running the sample with PyramidROIAlign plugin.
This issue is passed to our internal team and will be updated here if we got any response.
Thanks.