gameauto


Namegameauto JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://github.com/NakanoSanku
SummaryAndroid Game Auto Pypi
upload_time2023-06-08 05:27:54
maintainer
docs_urlNone
authorKateTseng
requires_python>=3
licenseMIT
keywords game
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gameauto
## Core
### miniFindimage
        """找图函数示例
        Args:
            - template_path (Str/Mat): 图像地址或者opencv格式的图像 小图
            - target_path (Str/Mat): 图像地址或者opencv格式的图像 大图
            - region (list, optional): 模板匹配的区域左上角和右下角两点坐标[Xmin,Ymin,Xmax,Ymax]. Defaults to None.
            - threshold (float, optional): 图像相似度. Defaults to 0.8.
            - is_color (bool, optional): 是否匹配图像颜色. Defaults to False.
            - color_threshold (int, optional): 颜色相似度. Defaults to 30.
            - use_sift (bool, optional): 是否使用sift算法匹配. Defaults to False.
            - is_click (bool, optional): 是否点击图像. Defaults to False.
           
        Returns:
            list/None: 图像所在区域[Xmin,Ymin,Xmax,Ymax]
        """

```python
#推荐使用方法
args={
    "template_path":"./1.png",
    "target_path":"./2.png",
}
miniFindImage(**args,is_click=True)
```

### miniRandomClick
```
随机点击 建议重写
        Args:
            - region (array): [x_min, y_min, x_max, y_max]
            - point (tuple, optional): 坐标点. Defaults to None.
            - method (int, optional): Defaults to 1.
                1. 范围随机点击
                2. 定点点击. 
                
```
### miniSmlMove
曲线滑动
```
三次贝塞尔曲线滑动 建议重写
        Args:
            - qx (int): 起点
            - qy (int): 
            - zx (int): 终点
            - zy (int): 
            - time (int, optional): 滑动时长. Defaults to 500.
```

## YoloV3
    ncnn加载yolov3模型
        Args:
            - param_path (str): yolov3模型param地址
            - bin_path (str): yolov3模型bin地址
            - class_names (list): 类名列表
            - tiny (bool, optional): 是否启用tiny模型. Defaults to False.
            - num_threads (int, optional): 启用线程数量. Defaults to 1.
            - use_gpu (bool, optional): 是否启用gpu计算 Defaults to False.
### yolo_filter
    模型计算结果筛选
    Args:
        - class_name (str): 筛选的类名
        - class_names (list): 模型类名列表
        - objects (list): 模型计算返回的结果
        - min_prob (float, optional): 结果置信度阈值. Defaults to 0.0.

    Returns:
        - list: objects
            - object:
                - rect.x 左上角横坐标
                - rect.y 左上角纵坐标   
                - rect.w 区域宽
                - rect.h 区域高
                - prob  置信度
                - label 类名

### yolo使用方法
```python
    m = cv2.imread("screenshotemulator-5554.png")
    #加载模型
    net = YoloV3(
        param_path="yolov3-tiny_6700-opt.param",
        bin_path="yolov3-tiny-opt.bin",
        #类名此处记得将第一个元素留空,所有元素往后一个(ncnn的问题好像是(有空改改))
        class_names=["", "exp", "hd", "jb"],
        num_threads=4,
        use_gpu=True,
    )
    #输入mat格式图像进行计算
    objects = net(m)
    #过滤结果
    yolo_filter("exp",net.class_names,objects,0.8)
```




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NakanoSanku",
    "name": "gameauto",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "game",
    "author": "KateTseng",
    "author_email": "Kate.TsengK@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/2e/31/7ebd4d915efdd7476fb7fe26815f0aa0cc26d43d267630b744cad1f669b7/gameauto-1.0.5.tar.gz",
    "platform": null,
    "description": "# gameauto\r\n## Core\r\n### miniFindimage\r\n        \"\"\"\u627e\u56fe\u51fd\u6570\u793a\u4f8b\r\n        Args:\r\n            - template_path (Str/Mat): \u56fe\u50cf\u5730\u5740\u6216\u8005opencv\u683c\u5f0f\u7684\u56fe\u50cf \u5c0f\u56fe\r\n            - target_path (Str/Mat): \u56fe\u50cf\u5730\u5740\u6216\u8005opencv\u683c\u5f0f\u7684\u56fe\u50cf \u5927\u56fe\r\n            - region (list, optional): \u6a21\u677f\u5339\u914d\u7684\u533a\u57df\u5de6\u4e0a\u89d2\u548c\u53f3\u4e0b\u89d2\u4e24\u70b9\u5750\u6807[Xmin,Ymin,Xmax,Ymax]. Defaults to None.\r\n            - threshold (float, optional): \u56fe\u50cf\u76f8\u4f3c\u5ea6. Defaults to 0.8.\r\n            - is_color (bool, optional): \u662f\u5426\u5339\u914d\u56fe\u50cf\u989c\u8272. Defaults to False.\r\n            - color_threshold (int, optional): \u989c\u8272\u76f8\u4f3c\u5ea6. Defaults to 30.\r\n            - use_sift (bool, optional): \u662f\u5426\u4f7f\u7528sift\u7b97\u6cd5\u5339\u914d. Defaults to False.\r\n            - is_click (bool, optional): \u662f\u5426\u70b9\u51fb\u56fe\u50cf. Defaults to False.\r\n           \r\n        Returns:\r\n            list/None: \u56fe\u50cf\u6240\u5728\u533a\u57df[Xmin,Ymin,Xmax,Ymax]\r\n        \"\"\"\r\n\r\n```python\r\n#\u63a8\u8350\u4f7f\u7528\u65b9\u6cd5\r\nargs={\r\n    \"template_path\":\"./1.png\",\r\n    \"target_path\":\"./2.png\",\r\n}\r\nminiFindImage(**args,is_click=True)\r\n```\r\n\r\n### miniRandomClick\r\n```\r\n\u968f\u673a\u70b9\u51fb \u5efa\u8bae\u91cd\u5199\r\n        Args:\r\n            - region (array): [x_min, y_min, x_max, y_max]\r\n            - point (tuple, optional): \u5750\u6807\u70b9. Defaults to None.\r\n            - method (int, optional): Defaults to 1.\r\n                1. \u8303\u56f4\u968f\u673a\u70b9\u51fb\r\n                2. \u5b9a\u70b9\u70b9\u51fb. \r\n                \r\n```\r\n### miniSmlMove\r\n\u66f2\u7ebf\u6ed1\u52a8\r\n```\r\n\u4e09\u6b21\u8d1d\u585e\u5c14\u66f2\u7ebf\u6ed1\u52a8 \u5efa\u8bae\u91cd\u5199\r\n        Args:\r\n            - qx (int): \u8d77\u70b9\r\n            - qy (int): \r\n            - zx (int): \u7ec8\u70b9\r\n            - zy (int): \r\n            - time (int, optional): \u6ed1\u52a8\u65f6\u957f. Defaults to 500.\r\n```\r\n\r\n## YoloV3\r\n    ncnn\u52a0\u8f7dyolov3\u6a21\u578b\r\n        Args:\r\n            - param_path (str): yolov3\u6a21\u578bparam\u5730\u5740\r\n            - bin_path (str): yolov3\u6a21\u578bbin\u5730\u5740\r\n            - class_names (list): \u7c7b\u540d\u5217\u8868\r\n            - tiny (bool, optional): \u662f\u5426\u542f\u7528tiny\u6a21\u578b. Defaults to False.\r\n            - num_threads (int, optional): \u542f\u7528\u7ebf\u7a0b\u6570\u91cf. Defaults to 1.\r\n            - use_gpu (bool, optional): \u662f\u5426\u542f\u7528gpu\u8ba1\u7b97 Defaults to False.\r\n### yolo_filter\r\n    \u6a21\u578b\u8ba1\u7b97\u7ed3\u679c\u7b5b\u9009\r\n    Args:\r\n        - class_name (str): \u7b5b\u9009\u7684\u7c7b\u540d\r\n        - class_names (list): \u6a21\u578b\u7c7b\u540d\u5217\u8868\r\n        - objects (list): \u6a21\u578b\u8ba1\u7b97\u8fd4\u56de\u7684\u7ed3\u679c\r\n        - min_prob (float, optional): \u7ed3\u679c\u7f6e\u4fe1\u5ea6\u9608\u503c. Defaults to 0.0.\r\n\r\n    Returns:\r\n        - list: objects\r\n            - object:\r\n                - rect.x \u5de6\u4e0a\u89d2\u6a2a\u5750\u6807\r\n                - rect.y \u5de6\u4e0a\u89d2\u7eb5\u5750\u6807   \r\n                - rect.w \u533a\u57df\u5bbd\r\n                - rect.h \u533a\u57df\u9ad8\r\n                - prob  \u7f6e\u4fe1\u5ea6\r\n                - label \u7c7b\u540d\r\n\r\n### yolo\u4f7f\u7528\u65b9\u6cd5\r\n```python\r\n    m = cv2.imread(\"screenshotemulator-5554.png\")\r\n    #\u52a0\u8f7d\u6a21\u578b\r\n    net = YoloV3(\r\n        param_path=\"yolov3-tiny_6700-opt.param\",\r\n        bin_path=\"yolov3-tiny-opt.bin\",\r\n        #\u7c7b\u540d\u6b64\u5904\u8bb0\u5f97\u5c06\u7b2c\u4e00\u4e2a\u5143\u7d20\u7559\u7a7a,\u6240\u6709\u5143\u7d20\u5f80\u540e\u4e00\u4e2a(ncnn\u7684\u95ee\u9898\u597d\u50cf\u662f(\u6709\u7a7a\u6539\u6539))\r\n        class_names=[\"\", \"exp\", \"hd\", \"jb\"],\r\n        num_threads=4,\r\n        use_gpu=True,\r\n    )\r\n    #\u8f93\u5165mat\u683c\u5f0f\u56fe\u50cf\u8fdb\u884c\u8ba1\u7b97\r\n    objects = net(m)\r\n    #\u8fc7\u6ee4\u7ed3\u679c\r\n    yolo_filter(\"exp\",net.class_names,objects,0.8)\r\n```\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Android Game Auto Pypi",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://github.com/NakanoSanku"
    },
    "split_keywords": [
        "game"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "622e86c5a982f01d64557b2639d44f4c8b4c6309dc12f1e715149a18402baf28",
                "md5": "ca68ddea0f3c3d1170cb8d398073f698",
                "sha256": "72673f8fc0321b7b7a5150b751f9fa09e63ff3b484a1100855c53bcd06714154"
            },
            "downloads": -1,
            "filename": "gameauto-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ca68ddea0f3c3d1170cb8d398073f698",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 8740,
            "upload_time": "2023-06-08T05:27:52",
            "upload_time_iso_8601": "2023-06-08T05:27:52.401664Z",
            "url": "https://files.pythonhosted.org/packages/62/2e/86c5a982f01d64557b2639d44f4c8b4c6309dc12f1e715149a18402baf28/gameauto-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e317ebd4d915efdd7476fb7fe26815f0aa0cc26d43d267630b744cad1f669b7",
                "md5": "9db375dfe108b21607dd373cc755e286",
                "sha256": "ff1c0360f4c46722dff372b5ee1b58b6c3d53bb3cfb6a29434c0c23213a4176c"
            },
            "downloads": -1,
            "filename": "gameauto-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "9db375dfe108b21607dd373cc755e286",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 7417,
            "upload_time": "2023-06-08T05:27:54",
            "upload_time_iso_8601": "2023-06-08T05:27:54.973320Z",
            "url": "https://files.pythonhosted.org/packages/2e/31/7ebd4d915efdd7476fb7fe26815f0aa0cc26d43d267630b744cad1f669b7/gameauto-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-08 05:27:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gameauto"
}
        
Elapsed time: 0.21320s