• DytanVO 代码复现(服务器端复现rtx3090)


    源码地址

    代码地址https://github.com/castacks/DytanVO

    环境配置

    1.克隆github项目

    git clone https://github.com/castacks/DytanVO.git
    
    • 1

    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
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    cd DytanVO
    conda env create -f environment.yml
    conda activate dytanvo
    
    • 1
    • 2
    • 3

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    pip install -r requirements.txt
    
    • 1

    4.编译DCNv2

    cd Network/rigidmask/networks/DCNv2/; 
    python setup.py install; 
    cd -
    
    • 1
    • 2
    • 3

    下载模型和数据集

    根据github的链接来下载DynaKITTI
    https://drive.google.com/file/d/1BDnraRWzNf938UsfprWIkcqCSfOUyGt9/view

    (另外一个数据集AirDOS-Shibuya给的链接没办法下载)

    下载后解压到对应文件夹

    运行

    创建一个放结果的文件夹

    mkdir results
    
    • 1

    创建一个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 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    运行脚本

    bash run.sh
    
    • 1

    跑起来了,不容易呀,复现了这么久
    在这里插入图片描述
    AirDOs

    traj=RoadCrossing03
    python -W ignore::UserWarning vo_trajectory_from_folder.py --flow-model-name flownet.pkl  \
    							   --pose-model-name posenet.pkl  \
    							   --seg-model segnet-sf.pth  \
    							   --airdos  \
    							   --test-dir data/AirDOS_shibuya/$traj/image_0  \
    							   --pose-file data/AirDOS_shibuya/$traj/gt_pose.txt 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    SceFLow跑好像要出问题
    真值的格式不一样,不能直接用
    –save-flow经测试其实并不行,代码写的有问题

    img=Driving/frames_finalpass/15mm_focallength/scene_forwards/fast/left 
    pose=Driving/camera_data/15mm_focallength/scene_forwards/fast/camera_data.txt 
    python -W ignore::UserWarning vo_trajectory_from_folder.py --flow-model-name flownet.pkl  \
    							   --pose-model-name posenet.pkl  \
    							   --seg-model segnet-sf.pth  \
    							   --sceneflow  \
    							   --test-dir data/SceneFlow/$img  \
    							   --pose-file data/SceneFlow/$pose 
    							#    --save-flow \
    							#    --batch-size 10 \
    							#    --worker-num 5
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
  • 相关阅读:
    推荐系统笔记(十三):SGL算法的代码实现
    Outlook 教程,如何在 Outlook 中使用颜色类别和提醒?
    Qt 自定义主题颜色,颜色选择器
    嵌入式养成计划-32-网络编程----域套接字模型------抓包工具--wireshark
    自然语言处理实战项目19-基于ALBERT模型进行微调的项目-文本分类中的合同类型描述的分类
    leetcode每日一题复盘(10.2~10.8)
    涨工资不是程序员跳槽的理由
    为什么软件可以操作硬件
    2024五一杯数学建模B题思路分析
    Mybatis学习笔记-映射文件,标签,插件
  • 原文地址:https://blog.csdn.net/qin_liang/article/details/132413741