This is the pretraining code for ''Pretrained Prior for Map Refinement'' of Driver2Map
Adapted from P-MapNet
- Create conda environment:
conda env create -f environment.yml
conda activate pmapnet
- Install pytorch:
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
- Install dependencies
pip install -r requirements.txt
Download nuScenes and put it to ./dataset/ folder.
Driver2Map-pretrain
|-- config/
|-- data_osm/
|-- model/
|-- random_masks/
|-- tools/
|-- dataset/
| ├── maps/
│ ├── samples/
│ ├── sweeps/
| ├── v1.0-trainval/
- Get the base parameter file, which is trained on ImageNet:
-
Edit
./config/hd_pretrain_60m.py. Make changes todataroot,version, etc. Especially change thevit_baseto the path ofpretrain-base.ptyou had just downloaded. -
Run:
CUDA_VISIBLE_DEVICES=0 python train_HDPrior_pretrain.py --config ./config/hd_pretrain_60m.py