forked from SilverComet7/yolov5-DNF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93ad4e5
commit 0c56330
Showing
10 changed files
with
479 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
# yolov5 | ||
|
||
1. 代码中涉及到使用opencv对小地图和技能栏进行模板匹配和二值化等操作,注意,不同游戏分辨率和电脑显示器分辨率是不一致的,代码中给出的(0,0,1280,800)是本人游戏中的分辨率,而small_recgonize.py和skill_recgonize.py中的img[45:65, 1107:1270], img[733: 793, 538:750, 2]是根据不同显示器的分辨率决定的,使用时需要自己调整。 | ||
|
||
2. 本人训练的yolov5模型还有待提高,我的训练集只有294张图片,因此效果一般。 | ||
详细教学请移步b站,有很详细的讲解:https://www.bilibili.com/video/BV18r4y1A7BF/ | ||
|
||
|
||
1. 屏幕检测 | ||
2. 怪物,材料的图像识别 | ||
3. 控制打怪和捡材料 | ||
4. 下一关 | ||
|
||
|
||
1. 识别地图中怪物 | ||
2. 寻找位置,释放技能,清理残余,寻找下一个门,进图 | ||
3. | ||
2. 寻找位置,释放技能,清理残余,寻找下一个门,进图 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import cv2 | ||
from ..grabscreen import grab_screen | ||
|
||
img = grab_screen((0, 0, 1280, 800)) | ||
img0 = cv2.cvtColor(img, cv2.COLOR_BGRA2BGR) | ||
dnf = cv2.imread(img0) | ||
cv2.imshow('rgb', dnf) | ||
# BGR = cv2.cvtColor(dnf,cv2.COLOR_RGB2BGR) | ||
# cv2.imshow('BGR',BGR) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters