monodepth2 安裝python+pytorch 環境及準備資料
https://github.com/nianticlabs/monodepth2
A. 同yolov7 的安裝
B.
pip install tensorboardX
pip install scikit-image
pip install wget
C. test
python test_simple.py --image_path assets/test_image.jpg --model_name mono+stereo_640x192
*會自動download pre-trained weights, output 在- assets\test_image_disp.jpeg
D. training
python train.py --model_name mono_model
*缺training data set, 請使用D. dowload images.
---------
D. download images,
需要以下的小程式, 先將目錄切到 .\monodepth2-master\splits
以下存成 wget.py
>> python wget.py
import wget, tarfile
import os
## readlines()
file1 = open('kitti_archives_to_download.txt', 'r')
Lines = file1.readlines()
os.chdir("../kitti_data")
count = 0
# Strips the newline character
for line in Lines:
#print("Line{}: {}".format(count, line.strip()))
wget.download(line)
E. 解壓到 D:\depth\monodepth2-master\kitti_data
將png 轉換為jpg.
... 未完!!!! 之後補齊