EvTexture环境配置

本篇文章主要介绍EvTexture环境配置过程,复现的步骤可以参考之前发布的博客:

EvTexture: Event-driven Texture Enhancement for Video Super-Resolution(ICML 2024)复现-优快云博客

推理环境安装

这里我选择的是python3.10,而不是官方的3.7,因为后面如果要用自己的数据进行推理的话,环境配置的时候需要>=3.8的要求,所以一开始装3.10就没有问题了

conda create -y -n evtexture python=3.10

conda activate evtexture

pip install torch-1.11.0+cu113-cp310-cp310m-linux_x86_64.whl

pip install torchvision-0.12.0+cu113-cp310-cp310m-linux_x86_64.whl

git clone https://github.com/DachunKai/EvTexture.git

cd EvTexture && pip install -r requirements.txt && python setup.py develop

其实到这里为止环境配置都很简单,主要麻烦的是如果要用自己的数据进行推理的话,需要将图像转换为事件,这一步需要一个叫作esim_py的包,它非常麻烦,下面就着重介绍esim_py的安装。

安装esim_py

https://github.com/uzh-rpg/rpg_vid2e/tree/master/esim_py

通过上面的仓库下载esim_py,解压到Evtexture文件夹下:

然后编译:

pip install .

这个时候出现了报错:

FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'

这是告诉我们没有cmake

cmake安装

// 下载

wget https://cmake.org/files/v3.20/cmake-3.20.2.tar.gz 

// 解压

tar zxvf cmake-3.20.2.tar.gz 

// 进入cmake-3.20.2

cd cmake-3.20.2

// 安装过程

./bootstrap

./configure --prefix=/home/zhz/app2/cmake   --这里自己定义目录

在Linux服务器上安装cmake遇到的小问题_linux cmake file in wrong format-优快云博客

make

make install

// 修改环境变量

vim ~/.bashrc

// 在最下面添加

export PATH=/home/zhz/app2/cmake/bin:$PATH

// 修改生效

source ~/.bashrc

//查看版本

cmake -version

这样就算是安装成功了。

再次对esim_py编译pip install .    发现又报错了:

By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has

        asked CMake to find a package configuration file provided by "pybind11",

        but CMake did not find one.

      

        Could not find a package configuration file provided by "pybind11" with any of the following names:

pybind11安装

pip install pytest

先下载pybind11的源代码:GitHub - pybind/pybind11: Seamless operability between C++11 and Python

cd  pybind11

mkdir build

cd build

export PYTHON_EXECUTABLE= /mnt/12T/zhz/anaconda3/envs/evtexture_2/bin/python3.8

cmake ..

如果这里经常不行,就删掉build,重新新建一个build文件夹

make check -j 4 

sudo make install  #(如果使用python2需要禁用/usr/bin/下的python3)

opencv和eigen3安装

sudo apt-get install libopencv-dev

sudo apt install libeigen3-dev

编译esim_py

最后在esim_py文件夹下面pip install .

上面显示的就是成功安装esim的信息。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值