Demo of Mesh R-CNN with PyTorch
In this section, we will use the Mesh R-CNN repository to run the demo. We will try the model on our image and render the output .obj
file to see how the model predicts the 3D shape. Moreover, we will discuss the training process of the model.
Installing Mesh R-CNN is pretty straightforward. You need to install Detectron2 and PyTorch3D first, then build Mesh R-CNN. Detectron2
is a library from Facebook Research that provides state-of-the-art detection and segmentation models. It includes Mask R-CNN as well, the model on which Mesh R-CNN was built. You can install detectron2
by running the following command:
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
If this doesn’t work for you, check the website for alternative ways to install it. Next, you need to install PyTorch3D, as described earlier in this book. When both requirements are ready, you just need to build Mesh R-CNN:
git clone https...