用于解决一个月都要来一次的问题
-
python>=3.7 -
aiofiles -
httpx -
httpx-socks[asyncio] -
intel-map-client==0.2.1 -
opencv-python -
tqdm -
pyopencl [optional] -
silx [optional]
如果需要使用 GPU 加速的 sift 算法,请安装上面可选依赖和显卡对应的驱动,并使用 clinfo 等工具检查 opencl 的状态,确保可用。安装 pyopencl 的方式可以参考 这里 。
从 GitHub 上下载该项目
git clone https://github.com/67au/ifssolver.git推荐使用虚拟环境 venv
pip install -r requirements.txt或者安装可选依赖
pip install -r requirements-silx.txt$ python3 ifssolver.py --help
usage: ifssolver.py [-h] [--config filename] [--download-csv | --download-img | --download-all] [--split]
[--draw] [--metadata METADATA] [--method opencv] [--no-clean] [--save-progress]
ifssolver
options:
-h, --help show this help message and exit
--config filename Configure File, default = 'config.ini'
--download-csv download metadata
--download-img download image by metadata
--download-all download image after updating metadata
--metadata METADATA use specified METADATA
--method opencv sift algorithm provider, opencv or silx
--no-clean no clean cache file
--save-progress save split progress
--split split ifs image
--draw draw result
参考提供的config.sample.ini,使用--config参数指定配置文件,默认:config.ini
下载地图的元数据(需要Cookies)
python3 ifssolver.py --download-csv下载元数据中包含的照片
python3 ifssolver.py --download-img顺序执行上面两步
python3 ifssolver.py --download-all识别结果输出到指定目录 <OUTPUT_DIR>
python3 ifssolver.py --splitpython3 ifssolver.py --drawpython3 ifssolver.py --auto--method: 指定匹配用的方法,参数:opencv 或 silx,默认为 opencv。opencv: opencv-python 中的 siftsilx: silx-kit 项目中支持 GPU 加速的 sift
--no-clean: 默认禁用,使用该参数可以跳过覆盖缓存文件。--metadata: 指定METADATAcsv 文件以代替利用 Cookies 从 IntelMap 上下载的数据--save-progress: 将保存 split 的进度
- 只有下载地图元数据部分需要 Cookies
--meatadata参数只兼容 IITC-Ingress-Portal-CSV-Export 这个插件
- @ROrdo
- UESTC-Ingress/IFSolver
- pierrepaleo/sift_pyocl
- opencv: Introduction to SIFT (Scale-Invariant Feature Transform)
- opencv: Feature Matching + Homography to find Objects
MIT License