源码地址
代码地址:https://github.com/castacks/DytanVO
环境配置
1.克隆github项目:
git clone https://github.com/castacks/DytanVO.git
2.利用yaml创建conda 环境:
修改yaml文件
name: dytanvo
channels:
- pytorch
- conda-forge
dependencies:
- python=3.8
- numba
- tqdm
- tbb
- joblib
- h5py
- pytorch=1.7.0
- torchvision=0.8.0
- cudatoolkit=11.0
- pip
- toml=0.10.2
- tomli=2.0.1
- kornia=0.5.3
cd DytanVO
conda env create -f environment.yml
conda activate dytanvo
3.创建一个requirements.txt,安装相关的库
absl-py==0.11.0
antlr4-python3-runtime==4.9.3
appdirs==1.4.4
beautifulsoup4==4.11.1
black==21.4b2
cachetools==4.1.1
chardet==3.0.4
charset-normalizer==2.1.1
cloudpickle==1.6.0
cupy-cuda110
cython==0.29.21
data==0.4
dataclasses==0.6
# dcnv2==0.1
decorator==5.1.1
fastrlock==0.8
filelock==3.8.0
funcsigs==1.0.2
future==0.18.2
fvcore==0.1.2.post20201122
gdown==4.5.1
google-auth==1.23.0
google-auth-oauthlib==0.4.2
grpcio==1.34.0
hydra-core==1.2.0
idna==2.10
imageio==2.9.0
importlib-resources==5.9.0
iopath==0.1.8
joblib==0.17.0
jsonpatch==1.32
jsonpointer==2.3
latex==0.7.0
lxml==4.9.1
markdown==3.3.3
mypy-extensions==0.4.3
# ngransac==0.0.0
numpy==1.23.2
oauthlib==3.1.0
omegaconf==2.2.3
opencv-python==4.4.0.46
packaging==21.3
pathspec==0.10.1
portalocker==2.0.0
protobuf==3.14.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
# pycocotools==2.0.4
pydot==1.4.1
pypng==0.0.20
pysocks==1.7.1
pytransform3d==1.14.0
pyzmq==23.2.1
regex==2022.8.17
requests==2.25.0
requests-oauthlib==1.3.0
rsa==4.6
shutilwhich==1.1.0
soupsieve==2.3.2.post1
splines==0.2.0
tabulate==0.8.7
tempdir==0.7.1
tensorboard==2.4.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.7.0
timm==0.6.7
toml==0.10.2
torchfile==0.1.0
tqdm==4.54.0
trimesh==3.9.3
urllib3==1.26.2
visdom==0.1.8.9
websocket-client==1.4.0
werkzeug==1.0.1
workflow==1.0
zipp==3.8.1
pip install -r requirements.txt
4.编译DCNv2
cd Network/rigidmask/networks/DCNv2/;
python setup.py install;
cd -
下载模型和数据集
根据github的链接来下载DynaKITTI
https://drive.google.com/file/d/1BDnraRWzNf938UsfprWIkcqCSfOUyGt9/view
(另外一个数据集AirDOS-Shibuya给的链接没办法下载)
下载后解压到对应文件夹
运行
创建一个放结果的文件夹
mkdir results
创建一个run.sh的脚本,在脚本里输入(修改了一下模型名称)
traj=00_1
python -W ignore::UserWarning vo_trajectory_from_folder.py --vo-model-name vonet.pkl \
--seg-model-name segnet-kitti.pth \
--kitti --kitti-intrinsics-file data/DynaKITTI/$traj/calib.txt \
--test-dir data/DynaKITTI/$traj/image_2 \
--pose-file data/DynaKITTI/$traj/pose_left.txt
运行脚本
bash run.sh
跑起来了,不容易呀,复现了这么久