MapTR is an end-to-end framework for online vectorized HD map construction. Github: https://github.com/hustvl/MapTR/tree/main
Install mimiconda:
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
~/miniconda3/bin/conda init bash
Create file requirements.txt with content:
$ cat requirements.txt
mmcv-full==1.4.0
setuptools==59.5.0
pandas==1.4.4
matplotlib==3.6.3
nuscenes-devkit==1.1.8
mmsegmentation==0.14.1
mmdet==2.14.0
yapf==0.40.1
numpy==1.23
numba==0.48
timm==0.9.12
networkx==2.2
scikit-image==0.19.3
scikit-learn==1.2.2
trimesh==2.35.39
av2==0.2.1
virtualenv
spconv-cu111
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.9.1+cu111
torchvision==0.10.1+cu111
torchaudio==0.9.1
Install:
conda create --prefix /cluster/home/USERNAME/MyEnv1 python=3.8.16
conda activate /cluster/home/USERNAME/MyEnv1
pip install -r requirements.txt
git clone https://github.com/hustvl/MapTR.git
cd MapTR/mmdetection3d
python setup.py develop
cd ..
cd projects/mmdet3d_plugin/maptr/modules/ops/geometric_kernel_attn
python setup.py build install
cd ../../../../../../
pip install -r requirement.txt
mkdir ckpts
cd ckpts
wget https://download.pytorch.org/models/resnet50-19c8e357.pth
wget https://download.pytorch.org/models/resnet18-f37072fd.pth
Run:
conda activate /cluster/home/USERNAME/MyEnv1
cd MapTR
./tools/dist_train.sh ./projects/configs/maptr/maptr_tiny_fusion_24e.py 8
NOTE: miniconda will modify .bashrc file. You will need to comment or delete these lines if you need to work with another python release:
$ cat .bashrc
. . .
. . .
. . .
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/cluster/home/USERNAME/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/cluster/home/USERNAME/miniconda3/etc/profile.d/conda.sh" ]; then
. "/cluster/home/USERNAME/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/cluster/home/USERNAME/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<