Learning to Segment Rigid Motions from Two Frames 代码复现

环境配置

https://github.com/gengshan-y/rigidmask

1.拉取代码

bash 复制代码
git clone https://github.com/gengshan-y/rigidmask.git
cd rigidmask

2.创建conda环境,修改rigidmask.yml

bash 复制代码
name: rigidmask
channels:
  - pytorch
  - pytorch3d
  - conda-forge
  - defaults
dependencies:
  - python=3.7
  - numba
  - tqdm
  - tbb
  - joblib
  - h5py
  - pytorch=1.7.0
  - torchvision=0.8.0
  - cudatoolkit=11.0
  - pip:
    - absl-py==0.11.0
    - cachetools==4.1.1
    - chardet==3.0.4
    - cloudpickle==1.6.0
    - cython==0.29.21
    - dataclasses==0.6
#    - dcnv2==0.1
    - future==0.18.2
    - fvcore==0.1.2.post20201122
    - google-auth==1.23.0
    - google-auth-oauthlib==0.4.2
    - grpcio==1.34.0
    - idna==2.10
    - joblib==0.17.0
#    - kornia==0.4.2+74cc0cf
    - markdown==3.3.3
#    - ngransac==0.0.0
    - oauthlib==3.1.0
  # - opencv-python==4.4.0.46
    - portalocker==2.0.0
    - protobuf==3.14.0
    - pyasn1==0.4.8
    - pyasn1-modules==0.2.8
#    - pycocotools==2.0.2
    - pydot==1.4.1
    - pypng==0.0.20
    - pyyaml==5.3.1
    - requests==2.25.0
    - requests-oauthlib==1.3.0
    - rsa==4.6
    - tabulate==0.8.7
    - tensorboard==2.4.0
    - tensorboard-plugin-wit==1.7.0
    - termcolor==1.1.0
    - tqdm==4.54.0
    - urllib3==1.26.2
    - werkzeug==1.0.1
    - yacs==0.1.8
    - imageio==2.9.0
    - trimesh==3.9.3
bash 复制代码
conda env create -f rigidmask.yml
conda activate rigidmask
bash 复制代码
pip install scipy==1.2.0
pip install timm==0.6.5
pip install pytorch3d-0.2.5
pip install opencv-python==3.4.9.33
pip install opencv-contrib-python==3.4.9.33
bash 复制代码
conda install -c conda-forge kornia=0.5.3 # install a compatible korna version
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/index.html
bash 复制代码
# sudo apt-get install libopencv-dev
conda install libopencv

DCNv2和ngransac

bash 复制代码
cd models/networks/DCNv2/; python setup.py install; cd -
cd models/ngransac/; python setup.py install; cd -

测试

1.下载数据集和模型

KITTI-SF: https://s3.eu-central-1.amazonaws.com/avg-kitti/data_scene_flow.zip

Sintel rigidity map : http://files.is.tue.mpg.de/jwulff/mrflow/sintel_rigiditymaps.zip

bash 复制代码
gdown https://drive.google.com/uc?id=1Up2cPCjzd_HGafw1AB2ijGmiKqaX5KTi -O ./input.tar.gz
gdown https://drive.google.com/uc?id=12C7rl5xS66NpmvtTfikr_2HWL5SakLVY -O ./rigidmask-sf-precomputed.zip
tar -xzvf ./input.tar.gz 
unzip ./rigidmask-sf-precomputed.zip -d precomputed/

2.测试一下

bash 复制代码
# modelname=rigidmask-sf
# CUDA_VISIBLE_DEVICES=1 
# python submission.py --dataset seq-coral --datapath input/imgs/coral/   --outdir ./weights/$modelname/ --loadmodel ./weights/$modelname/weights.pth --testres 1
# python eval/generate_visual.py --datapath weights/$modelname/seq-coral/ --imgpath input/imgs/coral


modelname=rigidmask-sf
CUDA_VISIBLE_DEVICES=1 
python submission.py --dataset seq-kitti --datapath input/imgs/kitti_2011_09_30_drive_0028_sync_11xx/   --outdir ./weights/$modelname/ --loadmodel ./weights/$modelname/weights.pth --testres 1.2 --refine
python eval/generate_visual.py --datapath weights/$modelname/seq-kitti/ --imgpath input/imgs/kitti_2011_09_30_drive_0028_sync_11xx
# python eval/render_scene.py --inpath weights/rigidmask-sf/seq-kitti/pc0-0000001110.ply
相关推荐
m0_646429971 小时前
LangGraph 学习笔记(一):StateGraph 与状态管理
python·langgraph
Dmz丶1 小时前
前端转 AI 100 天 Day 57:RAG 项目实战(六)——上线后迭代,从“能用”到“越用越好”
python
小小-猿2 小时前
用 Python 写昇腾算子:pyasc 是怎么回事
开发语言·python·昇腾·cann·pyasc
蓝蓝的代码人2 小时前
用 Python、Qt 和 Vue 做一个 Windows 股票看盘工具,观潮的行情小窗与桌面提醒
vue.js·python·qt·开源·桌面应用
富贵儿9983 小时前
NL2SQL 实践手记 10:从命令行到网页查询——把整个系列串起来
数据库·python·sql·ai·自然语言处理·langchain
fengkai45453 小时前
Python对接LangChain智能体开发(Tool工具调用与 Agent智能体)
运维·开发语言·python·langchain·llm·ai agent·tool
小白的高手之路3 小时前
【LeetCode 热题 100】560. 和为 K 的子数组|前缀和、哈希表(Python)
数据结构·笔记·python·算法·leetcode·力扣·散列表
专注仿真3 小时前
仿真智能体训练(评估篇):鲁棒性/泛化测试算法详解与实战
人工智能·python·算法·afsim智能体训练·评估算法·鲁棒性算法·泛化测试算法
SummerJokes4 小时前
Java 集合 List 全套实验|从基础增删改查到实体类存储
java·python·list
车软学堂4 小时前
Docker在隔离什么:namespace、cgroup、chroot三道墙
linux·python·docker·容器·车载系统·汽车·测试用例