Skip to content

67au/ifssolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ifssolver

用于解决一个月都要来一次的问题

Requirements

  • 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 的方式可以参考 这里

Installation

从 GitHub 上下载该项目

git clone https://github.com/67au/ifssolver.git

安装依赖

推荐使用虚拟环境 venv

pip install -r requirements.txt

或者安装可选依赖

pip install -r requirements-silx.txt

Usage

$ 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 --split

生成 Passcode

python3 ifssolver.py --draw

AUTO

python3 ifssolver.py --auto

可选参数

  • --method: 指定匹配用的方法,参数:opencv 或 silx,默认为 opencv。
    • opencv: opencv-python 中的 sift
    • silx: silx-kit 项目中支持 GPU 加速的 sift
  • --no-clean: 默认禁用,使用该参数可以跳过覆盖缓存文件。
  • --metadata: 指定 METADATA csv 文件以代替利用 Cookies 从 IntelMap 上下载的数据
  • --save-progress: 将保存 split 的进度

Note

Credit

License

MIT License

About

用于解决每月都要来一次的问题

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages