The codebases are built on top of Detectron2, and need to be built from source.
- Linux or macOS with Python ≥ 3.6
- PyTorch ≥ 1.6 and torchvision that matches the PyTorch installation. Install them together at pytorch.org to make sure of this
gcc & g++ ≥ 5.4 are required. ninja is recommended for faster build. After having them, git clonge this repository and run:
# To install it from a local clone:
git clone https://github.com/Gaoyiminggithub/Graphonomy-Panoptic.git
cd Graphonomy-Panoptic
python -m pip install -e detectron2
# On macOS, you may need to prepend the above commands with a few environment variables:
CC=clang CXX=clang++ ARCHFLAGS="-arch x86_64" python -m pip install ...
To rebuild detectron2 that's built from a local clone, use rm -rf build/ **/*.so
to clean the
old build first. You often need to rebuild detectron2 after reinstalling PyTorch.
Install panopticapi by:
pip install git+https://github.com/cocodataset/panopticapi.git
Check offical page for common installation issues.