{"id":13442185,"url":"https://github.com/wormtql/yas","last_synced_at":"2025-05-14T01:04:53.340Z","repository":{"id":41500179,"uuid":"414124987","full_name":"wormtql/yas","owner":"wormtql","description":"Blazingly fast Genshin Impact/Honkai: Starrail artifacts scanner","archived":false,"fork":false,"pushed_at":"2025-02-03T13:39:21.000Z","size":52705,"stargazers_count":1321,"open_issues_count":27,"forks_count":187,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-03T15:52:58.639Z","etag":null,"topics":["genshin-impact","genshin-impact-scanner","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wormtql.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-06T08:10:53.000Z","updated_at":"2025-04-03T06:07:42.000Z","dependencies_parsed_at":"2023-12-19T14:25:24.859Z","dependency_job_id":"f997c5ce-5337-4588-9cf9-3c71ba062603","html_url":"https://github.com/wormtql/yas","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Fyas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Fyas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Fyas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Fyas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wormtql","download_url":"https://codeload.github.com/wormtql/yas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281389,"owners_count":21077423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["genshin-impact","genshin-impact-scanner","rust"],"created_at":"2024-07-31T03:01:42.668Z","updated_at":"2025-04-10T19:24:53.134Z","avatar_url":"https://github.com/wormtql.png","language":"Rust","funding_links":[],"categories":["HarmonyOS","Rust","Record export"],"sub_categories":["Windows Manager"],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Yas\n\nYet Another Scanner\n又一个原神圣遗物导出器\n\n\u003c/div\u003e\n\n## 介绍\n\n基于 SVTR（基本上是 MobileNetV3_Small + Transformer）字符识别模型，使用原神字体对原神中会出现的字符串进行训练，达到更高的速度和更精确的结果。相比 CRNN（旧版Yas使用的模型），SVTR 可以达到更小的体积及更好的识别率。导出结果可以导入分析工具（例如 [莫娜占卜铺](https://mona-uranai.com/) ）进行配装或者其他计算。由于使用了 [Rust](https://www.rust-lang.org/) 进行编写，运行效率和文件体积都得到了很大的提升。\n\n### 相关资料\n\n- [MobileNetV3](https://arxiv.org/pdf/1905.02244.pdf)\n- [CRNN](https://arxiv.org/pdf/1507.05717.pdf)\n- [SVTR](https://arxiv.org/pdf/2205.00159.pdf)\n- [Transformer](https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf)\n\n### 识别模型\n\nSVTR 原文使用了多个 Local/Global Mixing，其中 Global Mixing 就是 Transformer 层，而根据*PaddleOCR*的代码，其 SVTR 识别模型也并未完全遵照 SVTR 原模型，而是骨干网络 + Transformer 的结构。*Yas*同样采用 PaddleOCR 的做法，使用 MobileNetV3_Small + Global Mixing，相当于将 CRNN 的 RNN 替换为 Transformer。由于训练集更加定制化，模型输入张量更小，网络结构简单，Yas模型相比PaddleOCR的V4轻量级模型，推理速度提升了6倍（仅在作者个人电脑上测试）。\n\n## 使用\n`yas.exe`把不同游戏的功能都集成到了一个exe中，因此需要使用命令行指定游戏，例如：\n```shell\nyas.exe genshin\n```\n运行`yas.exe --help`查看所有指令，运行`yas.exe help genshin`查看游戏特定的指令。\n\n也可以下载特定游戏的版本，例如`yas_artifact.exe`只能用于扫描原神的圣遗物。\n\n### Windows\n\n- 打开原神/星铁，并切换到背包页面，将背包拉到最上面\n- 如果是`yas.exe`，需要用命令行运行`yas.exe genshin`，如果是`yas_artifact.exe`，直接运行即可\n- 扫描过程中，鼠标右键终止\n\n### Linux\n- 还没有经过详细测试\n- 首先请确保自己在 x11 下或者 GNOME/Wayland 下（其他 wayland de 下[会有很坏的性能](https://github.com/poly000/screenshots-rs/blob/d96dff76c5f5cbd849d80451f0df8f415f8e5f4b/src/linux/wayland_screenshot.rs#L109)）\n- 用 wine 窗口化运行原神（或者全屏+虚拟桌面），打开圣遗物界面，拉到最顶\n- 启动 yas\n- Alt+Tab 切换到原神窗口，并且在鼠标变为十字后点击一下（还没做窗口聚焦），注意保证原神窗口整体在屏幕内\n- 等待扫描结束。\n\n### 注意\n\n- 默认 4 星以下圣遗物不扫描\n- 不是所有窗口比例都支持，推荐 16:9 的分辨率（如 1600x900, 1920x1080, 3840x2160）\n- 扫描过程中不要对鼠标做任何操作\n- 当前仅支持中文环境，若默认系统为非中文，请前往游戏设置界面修改 Language 为“简体中文”，否则无法读取原神窗口\n- 当前仅支持键鼠作为控制设备，暂不支持手柄。\n\n### 命令行使用\n\n假设你知道如何使用命令行工具。\n\n\n查看选项：\n```shell\nyas --help\nyas help genshin\nyas help starrail\n```\n\n只扫描五星圣遗物：\n```shell\nyas genshin --min-star=5\n```\n\n只扫描一行：\n```shell\nyas genshin --max-row=1\n```\n\n## 编译\n\n在构建前，请确保安装`Git LFS`，并运行`git lfs pull`。否则[yas 在运行时会使用错误的模型](https://github.com/wormtql/yas/pull/102#issuecomment-1375503803)。\n\n```shell\n# Linux 下需要首先安装 rustup 以及 mingw-w64 ，然后再安装对应的 rust target，\n# 构建到Linux需要 `libxdo` 和 `libxcb`\nrustup default stable\nrustup target add x86_64-pc-windows-gnu\ncargo build --release --locked --target=x86_64-pc-windows-gnu\n```\n\n如果使用 macOS，为了保证正常捕捉窗口，需要在编译后运行 `codesign.sh` 对二进制文件进行签名\n\n## 训练\n\n[yas-train](https://github.com/wormtql/yas-train)\n\n## 反馈\n\n- Issue\n- QQ 群：801106595\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwormtql%2Fyas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwormtql%2Fyas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwormtql%2Fyas/lists"}