Code Monkey home page Code Monkey logo

jgfdsjkjhghfg / aiassistonnx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dengqizhou30/aiassistonnx

0.0 0.0 0.0 53.44 MB

这是AI游戏助手的最新版代码库,其他的代码库已停止更新。AI游戏助手截取游戏屏幕进行对象识别,模拟自动瞄准/自动开枪等功能,提升玩家的游戏体验。这个版本使用onnx+yoyov6进行AI推理,微软的onnx在个人电脑上运行效率很高,配合美团的yoyov6对象检测模型,游戏图像检测速度快到飞起。

License: Apache License 2.0

C++ 94.79% Python 1.31% C 2.26% C# 0.38% PowerShell 1.26%

aiassistonnx's Introduction

游戏助手已发布三个项目,区别如下:
AIAssistOnnx 使用onnx进行AI推理,onnx在终端上运行时性能很高,实测比opencv dnn快2-3倍
这个版本使用onnx+yoyov6,游戏图像检测速度快到飞起。。。

已发布可运行程序:包含了相关运行库文件,可以到到项目Releases中下载AIAssist.rar,解压就可以直接运行。
注意请按照第四节中的使用技巧说明,使用这个辅助工具;
下载地址:https://github.com/dengqizhou30/AIAssistOnnx/releases/tag/%E5%88%9D%E5%A7%8B%E7%89%88%E6%9C%AC

重构内容:
1、替换AI推理依赖的库,使用onnx替换opencv dnn;

可以考虑的推理加速改进方向:
1、使用CPU推理,配置多核CPU,能上两块物理CPU更佳,可以使用一块CPU专用于推理;
2、使用GPU推理,onnx提供预编译的gpu版本,可以平替cpu版本,使用方便;

一、项目说明:
AIAssistC是一个AI游戏助手,使用OpenCv、onnx、yoyo、MFC等技术,截取游戏屏幕,使用AI模型进行对象识别,并实现自动瞄准/自动开枪等鼠标操作,提升玩家的游戏体验。

二、工程说明:
AIAssist:mfc前端UI子工程;
AIAssistLib:AI助手静态库子工程;
OnnxLib:onnx推理封装静态库子工程;
OnnxTest:onnx推理测试子工程;
Data:存放模型文件及工具文件的子工程;
DXGICaptureSample:DXGI Desktop Duplication API截屏测试子工程;
OpencvTest:openc功能验证测试子工程;

三、主要的运行库:
1、intel贡献的大神级图像处理框架OpenCv:
https://opencv.org/

2、微软onnx AI运行库,目前主流AI框架大都支持把模型转换为onnx格式:
https://onnxruntime.ai/
https://github.com/DefTruth/lite.ai.toolkit onnx c++样例代码比较难找,我主要参考了这个项目,作者封装了大量模型调用,NB加感谢

3、模型使用美团的yoyov6,准确率和性能就一个字,NB:
https://github.com/meituan/YOLOv6

四、使用注意:
1、使用技巧:目前基于AI图像检测,只做到了人员识别,无法区分敌我。为避免游戏中自动追踪并射击队友的尴尬,参考如下使用技巧。习惯这些操作方式后,这个工具使用体验相对好一些。:
a、进入游戏操作界面后,再启动辅助工具,否则有些有些中会无法实现自动鼠键操作;
b、一定要以管理员身份启动辅助工具,否则有些有些中会无法实现自动鼠键操作;
c、按V键关闭或者恢复自动操作:v键及鼠标中键可以关闭或恢复自动追踪/开火/压枪;开关错乱时按enter键关闭所有操作;建议每次交火前按v键切换视图,交火完毕后按v切回视图;

2、使用windows hook及鼠标键盘api实现了鼠标键盘操作模拟,HIDDriver驱动程序不再是必须项。在绝地求生、逆战、穿越火线三个游戏上测试,可以正常工作。推测现在的游戏安全检测侧重游戏内部的行为数据检测,游戏外部环境中windwos hook等通用操作机制不再管控

3、HIDDriver鼠标键盘模拟驱动已移除,这个驱动没有微软颁发的正式证书,只能在win 10测试模式下执行。如果要尝试,参考项目说明:
https://github.com/dengqizhou30/HIDDriver

五、游戏截图:
穿越火线游戏截图:
blockchain

aiassistonnx's People

Contributors

dengqizhou30 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.