nianticlabs/monodepth2 hiện có 4.5k sao trên GitHub, viết chủ yếu bằng Jupyter Notebook. [ICCV 2019] Monocular depth estimation from a single image
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This is the reference PyTorch implementation for training and testing depth estimation models using the method described in
Digging into Self-Supervised Monocular Depth Estimation
Clément Godard, Oisin Mac Aodha, Michael Firman and Gabriel J. Brostow
ICCV 2019 (arXiv pdf)
This code is for non-commercial use; please see the license file for terms.
If you find our work useful in your research please consider citing our paper:
@inproceedings{godard2019monodepth2,
title = {Digging into Self-Supervised Monocular Depth Estimation},
author = {Cl{\'e}ment Godard and
Oisin {Mac Aodha} and
Michael Firman and
Gabriel J. Brostow},
booktitle = {International Conference on Computer Vision (ICCV)},
year = {2019},
}
⚙️ Setup
Assuming a fresh Anaconda distribution, you can install the dependencies with:
conda install pytorch=0.4.1 torchvision=0.2.1 -c pytorch
pip install tensorboardX==1.4
conda install opencv=3.3.1 # just needed for evaluation
We ran our experiments with PyTorch 0.4.1, CUDA 9.1, Python 3.6.6 and Ubuntu 18.04.
We have also successfully trained models with PyTorch 1.0, and our code is compatible with Python 2.7. You may have issues installing OpenCV version 3.3.1 if you use Python 3.7, we recommend to create a virtual environment with Python 3.6.6 conda create -n monodepth2 python=3.6.6 anaconda .
🖼️ Prediction for a single image
You can predict scaled disparity for a single image with:
On its first run either of these commands will download the mono+stereo_640x192 pretrained model (99MB) into the models/ folder.
We provide the following options for --model_name:
--model_name
Training modality
Imagenet pretrained?
Model resolution
KITTI abs. rel. error
delta < 1.25
mono_640x192
Mono
Yes
640 x 192
0.115
0.877
stereo_640x192
Stereo
Yes
640 x 192
0.109
0.864
mono+stereo_640x192
Mono + Stereo
Yes
640 x 192
0.106
0.874
mono_1024x320
Mono
Yes
1024 x 320
0.115
0.879
stereo_1024x320
Stereo
Yes
1024 x 320
0.107
0.874
mono+stereo_1024x320
Mono + Stereo
Yes
1024 x 320
0.106
0.876
mono_no_pt_640x192
Mono
No
640 x 192
0.132
0.845
stereo_no_pt_640x192
Stereo
No
640 x 192
0.130
0.831
mono+stereo_no_pt_640x192
Mono + Stereo
No
640 x 192
0.127
0.836
You can also download models trained on the odometry split with monocular and mono+stereo training modalities.
Finally, we provide resnet 50 depth estimation models trained with ImageNet pretrained weights and trained from scratch.
Make sure to set --num_layers 50 if using these.
💾 KITTI training data
You can download the entire raw KITTI dataset by running:
or you can skip this conversion step and train from raw png files by adding the flag --png when training, at the expense of slower load times.
The above conversion command creates images which match our experiments, where KITTI .png images were converted to .jpg on Ubuntu 16.04 with default chroma subsampling 2x2,1x1,1x1.
We found that Ubuntu 18.04 defaults to 2x2,2x2,2x2, which gives different results, hence the explicit parameter in the conversion command.
You can also place the KITTI dataset wherever you like and point towards it with the --data_path flag during training and evaluation.
Splits
The train/test/validation splits are defined in the splits/ folder.
By default, the code will train a depth model using Zhou's subset of the standard Eigen split of KITTI, which is designed for monocular training.
You can also train a model using the new benchmark split or the odometry split by setting the --split flag.
Custom dataset
You can train on a custom monocular or stereo dataset by writing a new dataloader class which inherits from MonoDataset – see the KITTIDataset class in datasets/kitti_dataset.py for an example.
⏳ Training
By default models and tensorboard event files are saved to ~/tmp/<model_name>.
This can be changed with the --log_dir flag.
Monocular training:
python train.py --model_name mono_model
Stereo training:
Our code defaults to using Zhou's subsampled Eigen training data. For stereo-only training we have to specify that we want to use the full Eigen training set – see paper for details.
If you train your own model with our code you are likely to see slight differences to the publication results due to randomization in the weights initialization and data loading.
An additional parameter --eval_split can be set.
The three different values possible for eval_split are explained here:
--eval_split
Test set size
For models trained with...
Description
eigen
697
--split eigen_zhou (default) or --split eigen_full
The standard Eigen test files
eigen_benchmark
652
--split eigen_zhou (default) or --split eigen_full
Evaluate with the improved ground truth from the new KITTI depth benchmark
benchmark
500
--split benchmark
The new KITTI depth benchmark test files.
Because no ground truth is available for the new KITTI depth benchmark, no scores will be reported when --eval_split benchmark is set.
Instead, a set of .png images will be saved to disk ready for upload to the evaluation server.
External disparities evaluation
Finally you can also use evaluate_depth.py to evaluate raw disparities (or inverse depth) from other methods by using the --ext_disp_to_eval flag:
Our stereo models are trained with an effective baseline of 0.1 units, while the actual KITTI stereo rig has a baseline of 0.54m. This means a scaling of 5.4 must be applied for evaluation.
In addition, for models trained with stereo supervision we disable median scaling.
Setting the --eval_stereo flag when evaluating will automatically disable median scaling and scale predicted depths by 5.4.
⤴️⤵️ Odometry evaluation
We include code for evaluating poses predicted by models trained with --split odom --dataset kitti_odom --data_path /path/to/kitti/odometry/dataset.
For this evaluation, the KITTI odometry dataset (color, 65GB) and ground truth poses zip files must be downloaded.
As above, we assume that the pngs have been converted to jpgs.
If this data has been unzipped to folder kitti_odom, a model can be evaluated with:
nianticlabs/monodepth2 thuộc nhóm AI Tools trên TopGit, cùng 7 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về nianticlabs/monodepth2 ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/nianticlabs/monodepth2 là nguồn chính thức.
nianticlabs/monodepth2 có bao nhiêu sao?
nianticlabs/monodepth2 có 4.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/nianticlabs/monodepth2. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
nianticlabs/monodepth2 có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho nianticlabs/monodepth2. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
nianticlabs/monodepth2 còn đang phát triển không?
Commit gần nhất trên nianticlabs/monodepth2 là 20 ngày trước (theo timestamp GitHub). Repo có 986 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
nianticlabs/monodepth2 là gì?
nianticlabs/monodepth2 (nianticlabs/monodepth2) là dự án Jupyter Notebook trên GitHub. Theo mô tả gốc: [ICCV 2019] Monocular depth estimation from a single image
nianticlabs/monodepth2 viết bằng ngôn ngữ gì?
nianticlabs/monodepth2 chủ yếu viết bằng Jupyter Notebook. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc monodepth2 có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về monodepth2.