论文链接:SOLD2: Self-supervised Occlusion-aware Line Description and Detection
论文源码:GitHub - cvg/SOLD2: Joint deep network for feature line detection and description
- 下载源码到服务器上
- 创建一个虚拟环境(非必须)并激活
conda create -n sold2 python==3.9 conda activate sold2
- 下载依赖(txt文件中的kornia版本可能不兼容,此时需要换成0.6.7)
pip install -r requirements.txt pip install -e pip install kornia==0.6.7
- 下载预训练好的模型sold2_wireframe.tar,不用解压,在sold2文件目录下新建一个checkpoints文件夹,放进去,再新建一个output文件夹。
- config/project_config.py.文件中更改 DATASET_ROOT为自己数据集路径,更改EXP_PATH为上一步预训练模型的路径。把数据集放入数据集目录之后,在此目录下新建一个txt文件。形如:
- config/export_line_features.yaml,更改config_path为服务器上该文件位置
- 运行命令(img_list是包含txt文件的路径,ckp_path也是包含模型文件名的路径)
python -m sold2.export_line_features --img_list <list to a txt file containing the path to all the images> --output_folder <path to the output folder> --checkpoint_path <path to your best checkpoint,>