当前位置: 首页 > news >正文

国内开源代码网站广州广告公司前100名排行

国内开源代码网站,广州广告公司前100名排行,营销型网站(易网拓),重庆建设工程信息网官网入口查询Depth Anything V2 复现 一、配置环境二、准备数据1. 权重文件2. 训练数据 三、Test四、Train 代码:https://github.com/DepthAnything/Depth-Anything-V2 一、配置环境 在本机电脑win跑之后依旧爆显存,放到服务器跑:Ubuntu22.04&#xff0c…

Depth Anything V2 复现

  • 一、配置环境
  • 二、准备数据
    • 1. 权重文件
    • 2. 训练数据
  • 三、Test
  • 四、Train

代码:https://github.com/DepthAnything/Depth-Anything-V2

一、配置环境

在本机电脑win跑之后依旧爆显存,放到服务器跑:Ubuntu22.04,CUDA17

conda create -n DAv2 python=3.10
conda activate DAv2

conda下安装cuda。由于服务器上面我不能安装CUDA,只能在conda上安装cuda。我安装的cuda11.7。
跟着下面的教程做:

conda虚拟环境中安装cuda和cudnn,再也不用头疼版本号的问题了

wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/cudatoolkit-11.7.1-h4bc3d14_13.conda
conda install --use-local cudatoolkit-11.7.1-h4bc3d14_13.conda
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/cudnn-8.9.7.29-hcdd5f01_2.conda
conda install --use-local cudnn-8.9.7.29-hcdd5f01_2.conda

安装其他依赖
记得在requirements.txt中增加tensorboard、h5py

pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt

检查torch是否安装正确以及cuda版本

python
import torch
torch.cuda.is_available()
torch.version.cuda

二、准备数据

1. 权重文件

将pre-trained-models放在 DepthAnythingV2/checkpoints 文件夹

2. 训练数据

训练的时候需要,我这里之前就准备了vkitti。我先用vkitti数据跑一下试一下。

三、Test

Running script on images:

python run.py \--encoder <vits | vitb | vitl | vitg> \--img-path <path> --outdir <outdir> \[--input-size <size>] [--pred-only] [--grayscale]

Options:

  • –img-path: You can either 1) point it to an image directory storing all interested images, 2) point it to a single image, or 3)
    point it a text file storing all image paths.
  • –input-size (optional): By default, we use input size 518 for model inference. You can increase the size for even more fine-grained
    results.
  • –pred-only (optional): Only save the predicted depth map, without raw image.
  • –grayscale (optional): Save the grayscale depth map, without applying color palette.

For example:

python run.py --encoder vitl --img-path assets/examples --outdir depth_vis

Running script on videos

python run_video.py \--encoder <vits | vitb | vitl | vitg> \--video-path assets/examples_video --outdir video_depth_vis \[--input-size <size>] [--pred-only] [--grayscale]

Our larger model has better temporal consistency on videos.

四、Train

根据自己的数据修改DepthAnythingV2/metric_depth/dataset/splits和train.py中的路径数据

sh dist_train.sh

但我运行不了这个sh文件,所以我选择直接配置.vscode/launch.json。并且我将我的train代码改为了非分布式的。

{// 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387"version": "0.2.0","configurations": [{"name": "Python 调试程序: train.py","type": "debugpy","request": "launch","program": "${workspaceFolder}/metric_depth/train.py","console": "integratedTerminal","args": ["--epoch", "120","--encoder", "vitl","--bs", "2","--lr", "0.000005","--save-path", "./exp/vkitti","--dataset", "vkitti","--img-size", "518","--min-depth", "0.001","--max-depth", "20","--pretrained-from", "./checkpoints/depth_anything_v2_vitl.pth", ],"env": {"MASTER_ADDR": "localhost","MASTER_PORT": "20596"}},{"name":"Python 调试程序: run.py","type": "debugpy","request": "launch","program": "${workspaceFolder}/run.py","console": "integratedTerminal","args": ["--encoder", "vitl","--img-path", "assets/examples","--outdir", "output/depth_anything_v2_vitl_test","--checkpoints","checkpoints/depth_anything_v2_vitl_test.pth"],}]
}
http://www.yayakq.cn/news/132805/

相关文章:

  • 青岛网站推广途径外国网站上做雅思考试
  • 淘宝客网站WordPress网络营销的主要形式有建设网站
  • 建设银行官方网站个人系统板块wordpress批量编辑
  • 网站建设属于什么经济科目如何网站防止采集
  • 宁夏区建设厅网站网站源代码怎么放入 dede网站后台
  • 如何进入网站管理页面好制作网站公司
  • 昆明微网站搭建怎么查网站是哪家公司做的
  • 有没有个人网站服装网站建设与实现
  • 给非吸公司建设网站你认为什么对网络营销至关重要
  • 大学生网页设计实训报告google优化推广
  • 栖霞建设官方网站wordpress悬浮qq
  • 旅游网站排名排行榜自己做的博客网站吗
  • 芜湖市网站建设建站主机
  • 汕头龙湖网站建设南京网站建设方案
  • 做卖东西的网站搭建一个服务器买域名做网站
  • 网站如何做的看起来高大上网站建设平台官网要点有哪些
  • 上海 有哪些做网站的公司好北京注册公司可以申请北京车牌吗
  • 郑州电力高等专科学校官网seo计费管理系统
  • 网站设计规划范文成都网站建设哪家
  • 哪家做网站性价比高上海景观设计公司排行
  • 国外网站服务器租用电子商务网站建设方案书的总结
  • 合肥哪里有做网站的搜索引擎广告属于什么渠道
  • 关于网站开发的外文翻译3d展示网站源码
  • 泉州网站建设方案外包北京网站建设公司电扬
  • 做全国性的app网站推广多少wordpress 缩略图类型
  • html5网站制作工具网站服务器和网站备案吗
  • h5免费制作网站财务公司业务范围
  • 山东做网站费用自学室内装修设计教程
  • 音乐应用网站模板软件开发公司规章制度
  • 邯郸网站建设开发公司邢台网站优化定制