Coder Social home page Coder Social logo

ustbcxk / aspp_depth Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 4.0 36.19 MB

基于pytorch框架的无监督单目图像深度估计算法,在Monodepth2基础上改进了网络框架以及训练算法,未经本人禁止转载,谢谢合作。

Python 94.63% Shell 5.37%

aspp_depth's Introduction

AsppDepth

本算法在MonoDepth2基础上进行开发,整体网络基于pytorch,实现更精准的无监督训练下的单目图像深度估计。

example input output gif

example input output gif

该代码为本人的work,禁止商业使用,如转载请标明出处,谢谢合作。

配置

如果使用了Anaconda,则使用以下指令安装依赖项:

conda install pytorch=0.4.1 torchvision=0.2.1 -c pytorch
pip install tensorboardX==1.4
conda install opencv=3.3.1   #评估时使用

训练与测试

训练和测试方法在与monodepth2流程相同,不过由于网络架构以及代码不同,需要载入您通过本算法训练得到的权重。

数据戳提取:

其中splits.py为提取kitti数据集划分目录脚本,详情参见代码。

训练:

默认情况下,模型和tensorboard文件保存到了

~/tmp/<model_name>

中,可以使用--log_dir缺省值进行更改。

(1)单目训练:

python train.py --model_name mono_model

(2)双目训练

python train.py --model_name stereo_model \
  --frame_ids 0 --use_stereo --split eigen_full

(3)单目+双目训练

python train.py --model_name mono+stereo_model \
  --frame_ids 0 -1 1 --use_stereo

注:如果您只用单个GPU,可以使用以下指令进行指定:

CUDA_VISIBLE_DEVICES=x python train.py --model_name mono_model #其中x为您的device编号

测试:

可以使用test_simple.py文件预测单张图像的深度:

python test_simple.py --image_path assets/test_image.jpg --model_name mono+stereo_640x192

其他细节,可以参考monodepth2中的说明文档:

aspp_depth's People

Contributors

ustbcxk avatar

Stargazers

 avatar Haobot avatar  avatar  avatar ZhaoChanghao avatar  avatar  avatar  avatar  avatar KinberAlan avatar 彭晓睿 avatar LiuTao avatar  avatar  avatar Chandler Zhou avatar TOT avatar YOLO On Me avatar Haobo Wang avatar  avatar  avatar

Watchers

 avatar

aspp_depth's Issues

输出图像很糊

北科大蔡徐坤你好,为什么把weights19输入到test_image中去输出图像是糊的呢

训练自己的数据

请问有办法训练自己的数据吗?找了网上大部分代码,好像都没办法实现训练自己的数据集;
目前的数据有左右双目的立体影像和在立体像对上得到的深度图。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.