原文地址:https://github.com/SJTU-ViSYS/FeatureBooster?tab=readme-ov-file
一、前期准备
1.1 配置环境(Ubuntu20.04)
已完成 https://blog.csdn.net/qq_56288100/article/details/141358723?spm=1001.2014.3001.5501
Ubuntu20.04
OpenCV-4.5.0
1.2 克隆存储库并创建虚拟环境
1. 克隆存储库(建议翻墙)
git clone --recursive https://github.com/SJTU-ViSYS/FeatureBooster.git
2. 创建虚拟环境并进入
cd FeatureBooster/
conda env create -f environment.yml
conda activate featurebooster
1.3 安装pyCOLMAP
前提条件:已经安装COLMAP
pip install pycolmap
1.4 安装ORBSLAM2
cd extractors/orbslam2_features/
mkdir build
cd build
cmake -DPYTHON_LIBRARY=~/anaconda3/envs/featurebooster/lib/libpython3.8.so \
-DPYTHON_INCLUDE_DIR=~/anaconda3/envs/featurebooster/include/python3.8 \
-DPYTHON_EXECUTABLE=~/anaconda3/envs/featurebooster/bin/python3.8 ..
make -j32
二、特征提取
报错:
module ‘cv2.dnn’ has no attribute ‘DictValue’
解决办法:
升级OpenCV-Python的版本至4.7及以上(以升级到4.8.0.74为例)
pip install --upgrade opencv-python==4.8.0.74
三、模型训练
3.1 下载数据集
进入官网下载MegaDepth数据集(共199G)
可到夸克网盘自取:https://pan.quark.cn/s/f858d10f3cf6