Initial commit: DNF automated script with YOLO8m

This commit is contained in:
root
2025-03-26 17:02:29 +00:00
parent 317ca5058d
commit 9cee098fd0
21 changed files with 138 additions and 48 deletions

17
.gitignore vendored
View File

@@ -1,5 +1,4 @@
# 创建.gitignore文件排除不需要的文件
cat > .gitignore << EOF
# Python缓存文件
__pycache__/
*.py[cod]
*$py.class
@@ -7,17 +6,23 @@ __pycache__/
.env
venv/
ENV/
# 编辑器配置
.vscode/
.idea/
# 日志和模型文件
*.log
*.pt
*.pth
logs/
# 训练数据(避免上传大量图像)
data/training/images/*
data/training/labels/*
!data/training/images/.gitkeep
!data/training/labels/.gitkeep
EOF
# 确保创建空目录占位符
mkdir -p data/training/images data/training/labels
touch data/training/images/.gitkeep data/training/labels/.gitkeep
# 系统文件
.DS_Store
Thumbs.db

1
config/encryption.key Normal file
View File

@@ -0,0 +1 @@
W5q7WV5ITm9C3UfY1w8FMHgHk6Mv5PysDo0D2r2hXSE=

View File

@@ -1,7 +1,7 @@
path: data/training
train: data/training/images/train
val: data/training/images/val
test: data/training/images/test
path: /workspace/dnf-auto-cloud/data/training
train: /workspace/dnf-auto-cloud/data/training/images/train
val: /workspace/dnf-auto-cloud/data/training/images/val
test: /workspace/dnf-auto-cloud/data/training/images/test
nc: 10
names:
- monster

BIN
models/weights/F1_curve.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

BIN
models/weights/PR_curve.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
models/weights/P_curve.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
models/weights/R_curve.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

BIN
models/weights/labels.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

101
models/weights/results.csv Normal file
View File

@@ -0,0 +1,101 @@
epoch, train/box_loss, train/obj_loss, train/cls_loss, metrics/precision, metrics/recall, metrics/mAP_0.5,metrics/mAP_0.5:0.95, val/box_loss, val/obj_loss, val/cls_loss, x/lr0, x/lr1, x/lr2
0, 0.11062, 0.044713, 0.062774, 0.012864, 0.25694, 0.044005, 0.011607, 0.09363, 0.041389, 0.055328, 0.0883, 0.0013, 0.0013
1, 0.084386, 0.052809, 0.045843, 0.012305, 0.58135, 0.037866, 0.01087, 0.081148, 0.041847, 0.040951, 0.075673, 0.0026733, 0.0026733
2, 0.080052, 0.046154, 0.039956, 0.55511, 0.13355, 0.073915, 0.019121, 0.075842, 0.027031, 0.031986, 0.063019, 0.0040188, 0.0040188
3, 0.078225, 0.032642, 0.03222, 0.89008, 0.1593, 0.2019, 0.093216, 0.081309, 0.020676, 0.028984, 0.050337, 0.0053367, 0.0053367
4, 0.075672, 0.030229, 0.030481, 0.38578, 0.42212, 0.20752, 0.055837, 0.088352, 0.018589, 0.026398, 0.037627, 0.0066268, 0.0066268
5, 0.081446, 0.027271, 0.0294, 0.73021, 0.30357, 0.3954, 0.14948, 0.085555, 0.016193, 0.023893, 0.024889, 0.0078891, 0.0078891
6, 0.075361, 0.023581, 0.027368, 0.45782, 0.62595, 0.29554, 0.1066, 0.090591, 0.017099, 0.022596, 0.012124, 0.0091238, 0.0091238
7, 0.076797, 0.022953, 0.026967, 0.46326, 0.63058, 0.37613, 0.10864, 0.080876, 0.019985, 0.021849, 0.009307, 0.009307, 0.009307
8, 0.069277, 0.021624, 0.025897, 0.44857, 0.52412, 0.39575, 0.1484, 0.08447, 0.027252, 0.023365, 0.009307, 0.009307, 0.009307
9, 0.069657, 0.021723, 0.025119, 0.68102, 0.69233, 0.66763, 0.25607, 0.061653, 0.018906, 0.018222, 0.009208, 0.009208, 0.009208
10, 0.057849, 0.020393, 0.025134, 0.58782, 0.6286, 0.62221, 0.38337, 0.053783, 0.017891, 0.017056, 0.009109, 0.009109, 0.009109
11, 0.055896, 0.018569, 0.020781, 0.65791, 0.70455, 0.84397, 0.38415, 0.054539, 0.015846, 0.015294, 0.00901, 0.00901, 0.00901
12, 0.055146, 0.019553, 0.020457, 0.61275, 0.61576, 0.69215, 0.35269, 0.054875, 0.01627, 0.015222, 0.008911, 0.008911, 0.008911
13, 0.051287, 0.01728, 0.019606, 0.61733, 0.67584, 0.77896, 0.44407, 0.054481, 0.015491, 0.012888, 0.008812, 0.008812, 0.008812
14, 0.049833, 0.017423, 0.017959, 0.77359, 0.65157, 0.79625, 0.32758, 0.050235, 0.015112, 0.011866, 0.008713, 0.008713, 0.008713
15, 0.046434, 0.015612, 0.018171, 0.7663, 0.66557, 0.86331, 0.38905, 0.043334, 0.013628, 0.013504, 0.008614, 0.008614, 0.008614
16, 0.046136, 0.016711, 0.01776, 0.83936, 0.64404, 0.90648, 0.43725, 0.043066, 0.013478, 0.012336, 0.008515, 0.008515, 0.008515
17, 0.043906, 0.017081, 0.017746, 0.8748, 0.65369, 0.85847, 0.42247, 0.042315, 0.013261, 0.010645, 0.008416, 0.008416, 0.008416
18, 0.042014, 0.01525, 0.014397, 0.94607, 0.65739, 0.95437, 0.5543, 0.037817, 0.012558, 0.0096827, 0.008317, 0.008317, 0.008317
19, 0.041375, 0.016451, 0.014576, 0.89657, 0.67084, 0.96508, 0.57767, 0.038009, 0.012259, 0.0095654, 0.008218, 0.008218, 0.008218
20, 0.041926, 0.016043, 0.013606, 0.66705, 0.71925, 0.84926, 0.53664, 0.035998, 0.011994, 0.0097508, 0.008119, 0.008119, 0.008119
21, 0.037189, 0.014944, 0.01277, 0.75159, 0.68896, 0.79352, 0.5062, 0.043335, 0.012637, 0.0087438, 0.00802, 0.00802, 0.00802
22, 0.038953, 0.016303, 0.012446, 0.9459, 0.71773, 0.96028, 0.52056, 0.037898, 0.012242, 0.0083613, 0.007921, 0.007921, 0.007921
23, 0.036443, 0.015973, 0.011707, 0.88666, 0.70157, 0.96726, 0.66801, 0.035636, 0.012009, 0.0079827, 0.007822, 0.007822, 0.007822
24, 0.034551, 0.015153, 0.011661, 0.8874, 0.65796, 0.97283, 0.67398, 0.034467, 0.011672, 0.0087318, 0.007723, 0.007723, 0.007723
25, 0.035314, 0.013907, 0.01145, 0.9537, 0.71451, 0.98817, 0.69635, 0.02786, 0.011174, 0.0084147, 0.007624, 0.007624, 0.007624
26, 0.034133, 0.013862, 0.011951, 0.72453, 0.89518, 0.98299, 0.60003, 0.034185, 0.011813, 0.0096507, 0.007525, 0.007525, 0.007525
27, 0.034647, 0.013215, 0.010499, 0.71244, 0.98283, 0.98149, 0.63632, 0.030054, 0.011369, 0.0081987, 0.007426, 0.007426, 0.007426
28, 0.03294, 0.01456, 0.011796, 0.73212, 0.97058, 0.96119, 0.73927, 0.026755, 0.01094, 0.010894, 0.007327, 0.007327, 0.007327
29, 0.030987, 0.014169, 0.0097715, 0.67805, 0.97321, 0.96337, 0.67988, 0.02935, 0.011142, 0.0090103, 0.007228, 0.007228, 0.007228
30, 0.030368, 0.011704, 0.0094685, 0.72498, 0.98016, 0.98725, 0.68643, 0.027223, 0.010579, 0.0074158, 0.007129, 0.007129, 0.007129
31, 0.030643, 0.012915, 0.009158, 0.84399, 0.98909, 0.98542, 0.74619, 0.026265, 0.010507, 0.006691, 0.00703, 0.00703, 0.00703
32, 0.029583, 0.012493, 0.0090232, 0.79042, 0.98909, 0.98082, 0.6973, 0.029134, 0.010659, 0.0066166, 0.006931, 0.006931, 0.006931
33, 0.02909, 0.014057, 0.0093144, 0.84826, 0.98909, 0.98338, 0.74119, 0.029363, 0.010697, 0.0061455, 0.006832, 0.006832, 0.006832
34, 0.030618, 0.013529, 0.0085338, 0.94853, 0.98909, 0.99382, 0.71363, 0.022315, 0.0099039, 0.0059595, 0.006733, 0.006733, 0.006733
35, 0.027751, 0.01337, 0.0094638, 0.92628, 0.98902, 0.99414, 0.71161, 0.026125, 0.010315, 0.0057881, 0.006634, 0.006634, 0.006634
36, 0.028829, 0.012622, 0.0083021, 0.9495, 0.97817, 0.98928, 0.65483, 0.025652, 0.010463, 0.0067701, 0.006535, 0.006535, 0.006535
37, 0.028152, 0.012452, 0.008016, 0.95411, 0.98699, 0.99242, 0.74834, 0.029938, 0.010807, 0.0057073, 0.006436, 0.006436, 0.006436
38, 0.028067, 0.0132, 0.0072333, 0.98131, 0.9871, 0.99342, 0.72968, 0.023942, 0.0098715, 0.0056729, 0.006337, 0.006337, 0.006337
39, 0.02707, 0.012021, 0.0073622, 0.97159, 0.98606, 0.99106, 0.66866, 0.021726, 0.0096645, 0.0058436, 0.006238, 0.006238, 0.006238
40, 0.025963, 0.012655, 0.0087835, 0.97675, 0.98624, 0.99053, 0.61778, 0.026124, 0.010141, 0.0056002, 0.006139, 0.006139, 0.006139
41, 0.025687, 0.01183, 0.0075706, 0.88505, 0.98679, 0.99024, 0.74323, 0.025508, 0.0097275, 0.0051115, 0.00604, 0.00604, 0.00604
42, 0.026962, 0.013543, 0.0070483, 0.98938, 0.98615, 0.99425, 0.79556, 0.019257, 0.0091076, 0.0049877, 0.005941, 0.005941, 0.005941
43, 0.026752, 0.012546, 0.0073945, 0.99243, 0.97926, 0.99414, 0.82536, 0.020015, 0.0091324, 0.0050037, 0.005842, 0.005842, 0.005842
44, 0.025512, 0.01291, 0.0065296, 0.99284, 0.98377, 0.99446, 0.8073, 0.022218, 0.0093803, 0.0047843, 0.005743, 0.005743, 0.005743
45, 0.025071, 0.012273, 0.0064804, 0.92519, 0.98283, 0.99399, 0.8022, 0.022355, 0.0091429, 0.0051858, 0.005644, 0.005644, 0.005644
46, 0.02441, 0.012031, 0.0067756, 0.9232, 0.98173, 0.95315, 0.81619, 0.019415, 0.0091877, 0.0052021, 0.005545, 0.005545, 0.005545
47, 0.024003, 0.011556, 0.0061719, 0.9769, 0.98091, 0.99398, 0.79701, 0.018607, 0.0089998, 0.0049653, 0.005446, 0.005446, 0.005446
48, 0.023256, 0.013171, 0.0057394, 0.98993, 0.97992, 0.99348, 0.79191, 0.023383, 0.0096035, 0.0049262, 0.005347, 0.005347, 0.005347
49, 0.022691, 0.01123, 0.0064885, 0.96746, 0.98329, 0.99362, 0.80438, 0.020979, 0.0090265, 0.0046365, 0.005248, 0.005248, 0.005248
50, 0.023009, 0.010828, 0.0061525, 0.97973, 0.9809, 0.99406, 0.78401, 0.021838, 0.009346, 0.0045595, 0.005149, 0.005149, 0.005149
51, 0.022762, 0.011628, 0.0055389, 0.98075, 0.97948, 0.99472, 0.79553, 0.020373, 0.0091763, 0.0044677, 0.00505, 0.00505, 0.00505
52, 0.022359, 0.011327, 0.0064108, 0.92924, 0.97627, 0.99434, 0.82906, 0.01873, 0.0088215, 0.0047634, 0.004951, 0.004951, 0.004951
53, 0.021434, 0.010782, 0.0063598, 0.89751, 0.98395, 0.99438, 0.82292, 0.01758, 0.0084286, 0.0047634, 0.004852, 0.004852, 0.004852
54, 0.021491, 0.011245, 0.0060554, 0.93484, 0.9871, 0.99439, 0.76245, 0.019861, 0.0091343, 0.0045495, 0.004753, 0.004753, 0.004753
55, 0.02136, 0.010731, 0.005393, 0.98175, 0.97451, 0.99376, 0.81609, 0.017771, 0.0085478, 0.0044975, 0.004654, 0.004654, 0.004654
56, 0.020601, 0.011435, 0.0048984, 0.98702, 0.97619, 0.99379, 0.77352, 0.020876, 0.0089264, 0.0044127, 0.004555, 0.004555, 0.004555
57, 0.020204, 0.01007, 0.0049571, 0.98484, 0.97553, 0.99377, 0.80822, 0.018683, 0.0087328, 0.0042574, 0.004456, 0.004456, 0.004456
58, 0.020187, 0.010405, 0.0048422, 0.99255, 0.97817, 0.99174, 0.77373, 0.018314, 0.0085936, 0.0043662, 0.004357, 0.004357, 0.004357
59, 0.019939, 0.011237, 0.0055137, 0.96766, 0.98313, 0.99227, 0.79108, 0.018299, 0.0086794, 0.0046237, 0.004258, 0.004258, 0.004258
60, 0.019841, 0.010175, 0.0051564, 0.97467, 0.98512, 0.99305, 0.83424, 0.016635, 0.008214, 0.0044363, 0.004159, 0.004159, 0.004159
61, 0.019577, 0.011111, 0.0053072, 0.98888, 0.9871, 0.99366, 0.84728, 0.018191, 0.0086145, 0.0041327, 0.00406, 0.00406, 0.00406
62, 0.020016, 0.0097929, 0.0057736, 0.98464, 0.9871, 0.99353, 0.81056, 0.016411, 0.0081959, 0.0042267, 0.003961, 0.003961, 0.003961
63, 0.018354, 0.010467, 0.0048361, 0.99336, 0.9851, 0.99354, 0.78057, 0.017278, 0.0084858, 0.0038996, 0.003862, 0.003862, 0.003862
64, 0.019343, 0.010997, 0.0050088, 0.99232, 0.98663, 0.99367, 0.83564, 0.016815, 0.0083208, 0.0038519, 0.003763, 0.003763, 0.003763
65, 0.018261, 0.0098814, 0.0060664, 0.98882, 0.9871, 0.99358, 0.82697, 0.015722, 0.0081091, 0.0038631, 0.003664, 0.003664, 0.003664
66, 0.017361, 0.010034, 0.0045755, 0.9908, 0.9871, 0.99353, 0.86476, 0.014229, 0.0077305, 0.0040259, 0.003565, 0.003565, 0.003565
67, 0.018567, 0.010758, 0.0043478, 0.99195, 0.9871, 0.9936, 0.86666, 0.013242, 0.0076628, 0.0036473, 0.003466, 0.003466, 0.003466
68, 0.017044, 0.010896, 0.004663, 0.99249, 0.98488, 0.99403, 0.84897, 0.015298, 0.0079508, 0.0035157, 0.003367, 0.003367, 0.003367
69, 0.016631, 0.0092014, 0.0043957, 0.98846, 0.98422, 0.99374, 0.81506, 0.015467, 0.0079451, 0.0035839, 0.003268, 0.003268, 0.003268
70, 0.01695, 0.010094, 0.0035115, 0.99048, 0.98446, 0.99367, 0.84357, 0.014905, 0.0078063, 0.0035594, 0.003169, 0.003169, 0.003169
71, 0.015838, 0.010228, 0.003958, 0.99303, 0.98292, 0.99246, 0.90626, 0.012365, 0.0071888, 0.0033793, 0.00307, 0.00307, 0.00307
72, 0.015778, 0.0095427, 0.0062521, 0.99223, 0.98173, 0.99247, 0.85636, 0.014819, 0.0079422, 0.0033822, 0.002971, 0.002971, 0.002971
73, 0.015479, 0.0093237, 0.00404, 0.99072, 0.98312, 0.99374, 0.86208, 0.015422, 0.0078058, 0.0033088, 0.002872, 0.002872, 0.002872
74, 0.015936, 0.0093511, 0.0045926, 0.98964, 0.98485, 0.99389, 0.87519, 0.012562, 0.0072331, 0.0032785, 0.002773, 0.002773, 0.002773
75, 0.014587, 0.0090074, 0.0044003, 0.98713, 0.9871, 0.99287, 0.88673, 0.013244, 0.0074663, 0.0034659, 0.002674, 0.002674, 0.002674
76, 0.014562, 0.0085611, 0.003786, 0.98725, 0.9871, 0.99325, 0.86882, 0.012914, 0.007401, 0.0032434, 0.002575, 0.002575, 0.002575
77, 0.014627, 0.0093808, 0.0040065, 0.98718, 0.9871, 0.99327, 0.85954, 0.013101, 0.0073853, 0.003063, 0.002476, 0.002476, 0.002476
78, 0.014713, 0.0086822, 0.0041137, 0.98856, 0.98458, 0.99338, 0.85969, 0.013281, 0.0073719, 0.0029892, 0.002377, 0.002377, 0.002377
79, 0.013479, 0.008951, 0.0032, 0.99063, 0.98275, 0.99299, 0.89536, 0.011977, 0.0070486, 0.0029796, 0.002278, 0.002278, 0.002278
80, 0.01334, 0.0088546, 0.0039412, 0.99078, 0.98297, 0.99239, 0.90339, 0.011971, 0.0071206, 0.0030048, 0.002179, 0.002179, 0.002179
81, 0.013471, 0.0085181, 0.0038238, 0.99147, 0.98339, 0.99223, 0.9112, 0.011377, 0.0070229, 0.0029151, 0.00208, 0.00208, 0.00208
82, 0.013225, 0.0081305, 0.0039529, 0.98983, 0.98394, 0.99189, 0.90095, 0.011049, 0.0069065, 0.0028324, 0.001981, 0.001981, 0.001981
83, 0.012782, 0.0087502, 0.0041046, 0.98948, 0.98345, 0.99231, 0.87987, 0.011397, 0.0071707, 0.0028323, 0.001882, 0.001882, 0.001882
84, 0.01268, 0.008468, 0.003646, 0.98967, 0.98255, 0.99349, 0.90452, 0.010897, 0.0069289, 0.0028338, 0.001783, 0.001783, 0.001783
85, 0.011956, 0.0081656, 0.0033978, 0.99234, 0.98695, 0.99349, 0.90359, 0.011106, 0.0069551, 0.0027155, 0.001684, 0.001684, 0.001684
86, 0.011678, 0.0074737, 0.0029689, 0.99059, 0.9871, 0.99331, 0.90539, 0.011038, 0.0070376, 0.0026494, 0.001585, 0.001585, 0.001585
87, 0.011452, 0.0082765, 0.0031965, 0.99032, 0.9871, 0.99354, 0.90376, 0.011192, 0.0070019, 0.0026226, 0.001486, 0.001486, 0.001486
88, 0.011014, 0.0077558, 0.0029091, 0.98926, 0.9871, 0.99367, 0.93096, 0.0097374, 0.0064735, 0.0025889, 0.001387, 0.001387, 0.001387
89, 0.010877, 0.0081713, 0.0035058, 0.98853, 0.9871, 0.99369, 0.89844, 0.010716, 0.0067215, 0.0025122, 0.001288, 0.001288, 0.001288
90, 0.01086, 0.0081078, 0.0029808, 0.98859, 0.9871, 0.99369, 0.90179, 0.010313, 0.0066843, 0.002467, 0.001189, 0.001189, 0.001189
91, 0.010432, 0.0082593, 0.0032532, 0.98823, 0.98823, 0.99386, 0.90426, 0.00942, 0.0063066, 0.0025923, 0.00109, 0.00109, 0.00109
92, 0.0099856, 0.0072484, 0.0027239, 0.98621, 0.98861, 0.99381, 0.91917, 0.010086, 0.0064635, 0.0026085, 0.000991, 0.000991, 0.000991
93, 0.0097199, 0.0081254, 0.0029498, 0.98445, 0.98366, 0.99358, 0.92386, 0.0092925, 0.0062866, 0.0023818, 0.000892, 0.000892, 0.000892
94, 0.0098492, 0.0087202, 0.0028662, 0.98588, 0.98249, 0.99359, 0.92486, 0.0095873, 0.0064139, 0.0023302, 0.000793, 0.000793, 0.000793
95, 0.0095458, 0.0077495, 0.0031524, 0.98675, 0.98195, 0.99366, 0.91152, 0.0091509, 0.0061636, 0.002304, 0.000694, 0.000694, 0.000694
96, 0.0093134, 0.0070511, 0.010882, 0.98633, 0.98247, 0.99361, 0.91815, 0.0090792, 0.0062695, 0.0022655, 0.000595, 0.000595, 0.000595
97, 0.0092242, 0.0074598, 0.0032303, 0.98604, 0.98365, 0.99366, 0.9308, 0.0082706, 0.005929, 0.0022603, 0.000496, 0.000496, 0.000496
98, 0.0088322, 0.007461, 0.0025581, 0.9797, 0.9832, 0.99359, 0.92623, 0.0086755, 0.006093, 0.0023018, 0.000397, 0.000397, 0.000397
99, 0.009008, 0.0076601, 0.0027773, 0.97461, 0.98322, 0.99354, 0.93797, 0.0082771, 0.0060029, 0.0023297, 0.000298, 0.000298, 0.000298
1 epoch train/box_loss train/obj_loss train/cls_loss metrics/precision metrics/recall metrics/mAP_0.5 metrics/mAP_0.5:0.95 val/box_loss val/obj_loss val/cls_loss x/lr0 x/lr1 x/lr2
2 0 0.11062 0.044713 0.062774 0.012864 0.25694 0.044005 0.011607 0.09363 0.041389 0.055328 0.0883 0.0013 0.0013
3 1 0.084386 0.052809 0.045843 0.012305 0.58135 0.037866 0.01087 0.081148 0.041847 0.040951 0.075673 0.0026733 0.0026733
4 2 0.080052 0.046154 0.039956 0.55511 0.13355 0.073915 0.019121 0.075842 0.027031 0.031986 0.063019 0.0040188 0.0040188
5 3 0.078225 0.032642 0.03222 0.89008 0.1593 0.2019 0.093216 0.081309 0.020676 0.028984 0.050337 0.0053367 0.0053367
6 4 0.075672 0.030229 0.030481 0.38578 0.42212 0.20752 0.055837 0.088352 0.018589 0.026398 0.037627 0.0066268 0.0066268
7 5 0.081446 0.027271 0.0294 0.73021 0.30357 0.3954 0.14948 0.085555 0.016193 0.023893 0.024889 0.0078891 0.0078891
8 6 0.075361 0.023581 0.027368 0.45782 0.62595 0.29554 0.1066 0.090591 0.017099 0.022596 0.012124 0.0091238 0.0091238
9 7 0.076797 0.022953 0.026967 0.46326 0.63058 0.37613 0.10864 0.080876 0.019985 0.021849 0.009307 0.009307 0.009307
10 8 0.069277 0.021624 0.025897 0.44857 0.52412 0.39575 0.1484 0.08447 0.027252 0.023365 0.009307 0.009307 0.009307
11 9 0.069657 0.021723 0.025119 0.68102 0.69233 0.66763 0.25607 0.061653 0.018906 0.018222 0.009208 0.009208 0.009208
12 10 0.057849 0.020393 0.025134 0.58782 0.6286 0.62221 0.38337 0.053783 0.017891 0.017056 0.009109 0.009109 0.009109
13 11 0.055896 0.018569 0.020781 0.65791 0.70455 0.84397 0.38415 0.054539 0.015846 0.015294 0.00901 0.00901 0.00901
14 12 0.055146 0.019553 0.020457 0.61275 0.61576 0.69215 0.35269 0.054875 0.01627 0.015222 0.008911 0.008911 0.008911
15 13 0.051287 0.01728 0.019606 0.61733 0.67584 0.77896 0.44407 0.054481 0.015491 0.012888 0.008812 0.008812 0.008812
16 14 0.049833 0.017423 0.017959 0.77359 0.65157 0.79625 0.32758 0.050235 0.015112 0.011866 0.008713 0.008713 0.008713
17 15 0.046434 0.015612 0.018171 0.7663 0.66557 0.86331 0.38905 0.043334 0.013628 0.013504 0.008614 0.008614 0.008614
18 16 0.046136 0.016711 0.01776 0.83936 0.64404 0.90648 0.43725 0.043066 0.013478 0.012336 0.008515 0.008515 0.008515
19 17 0.043906 0.017081 0.017746 0.8748 0.65369 0.85847 0.42247 0.042315 0.013261 0.010645 0.008416 0.008416 0.008416
20 18 0.042014 0.01525 0.014397 0.94607 0.65739 0.95437 0.5543 0.037817 0.012558 0.0096827 0.008317 0.008317 0.008317
21 19 0.041375 0.016451 0.014576 0.89657 0.67084 0.96508 0.57767 0.038009 0.012259 0.0095654 0.008218 0.008218 0.008218
22 20 0.041926 0.016043 0.013606 0.66705 0.71925 0.84926 0.53664 0.035998 0.011994 0.0097508 0.008119 0.008119 0.008119
23 21 0.037189 0.014944 0.01277 0.75159 0.68896 0.79352 0.5062 0.043335 0.012637 0.0087438 0.00802 0.00802 0.00802
24 22 0.038953 0.016303 0.012446 0.9459 0.71773 0.96028 0.52056 0.037898 0.012242 0.0083613 0.007921 0.007921 0.007921
25 23 0.036443 0.015973 0.011707 0.88666 0.70157 0.96726 0.66801 0.035636 0.012009 0.0079827 0.007822 0.007822 0.007822
26 24 0.034551 0.015153 0.011661 0.8874 0.65796 0.97283 0.67398 0.034467 0.011672 0.0087318 0.007723 0.007723 0.007723
27 25 0.035314 0.013907 0.01145 0.9537 0.71451 0.98817 0.69635 0.02786 0.011174 0.0084147 0.007624 0.007624 0.007624
28 26 0.034133 0.013862 0.011951 0.72453 0.89518 0.98299 0.60003 0.034185 0.011813 0.0096507 0.007525 0.007525 0.007525
29 27 0.034647 0.013215 0.010499 0.71244 0.98283 0.98149 0.63632 0.030054 0.011369 0.0081987 0.007426 0.007426 0.007426
30 28 0.03294 0.01456 0.011796 0.73212 0.97058 0.96119 0.73927 0.026755 0.01094 0.010894 0.007327 0.007327 0.007327
31 29 0.030987 0.014169 0.0097715 0.67805 0.97321 0.96337 0.67988 0.02935 0.011142 0.0090103 0.007228 0.007228 0.007228
32 30 0.030368 0.011704 0.0094685 0.72498 0.98016 0.98725 0.68643 0.027223 0.010579 0.0074158 0.007129 0.007129 0.007129
33 31 0.030643 0.012915 0.009158 0.84399 0.98909 0.98542 0.74619 0.026265 0.010507 0.006691 0.00703 0.00703 0.00703
34 32 0.029583 0.012493 0.0090232 0.79042 0.98909 0.98082 0.6973 0.029134 0.010659 0.0066166 0.006931 0.006931 0.006931
35 33 0.02909 0.014057 0.0093144 0.84826 0.98909 0.98338 0.74119 0.029363 0.010697 0.0061455 0.006832 0.006832 0.006832
36 34 0.030618 0.013529 0.0085338 0.94853 0.98909 0.99382 0.71363 0.022315 0.0099039 0.0059595 0.006733 0.006733 0.006733
37 35 0.027751 0.01337 0.0094638 0.92628 0.98902 0.99414 0.71161 0.026125 0.010315 0.0057881 0.006634 0.006634 0.006634
38 36 0.028829 0.012622 0.0083021 0.9495 0.97817 0.98928 0.65483 0.025652 0.010463 0.0067701 0.006535 0.006535 0.006535
39 37 0.028152 0.012452 0.008016 0.95411 0.98699 0.99242 0.74834 0.029938 0.010807 0.0057073 0.006436 0.006436 0.006436
40 38 0.028067 0.0132 0.0072333 0.98131 0.9871 0.99342 0.72968 0.023942 0.0098715 0.0056729 0.006337 0.006337 0.006337
41 39 0.02707 0.012021 0.0073622 0.97159 0.98606 0.99106 0.66866 0.021726 0.0096645 0.0058436 0.006238 0.006238 0.006238
42 40 0.025963 0.012655 0.0087835 0.97675 0.98624 0.99053 0.61778 0.026124 0.010141 0.0056002 0.006139 0.006139 0.006139
43 41 0.025687 0.01183 0.0075706 0.88505 0.98679 0.99024 0.74323 0.025508 0.0097275 0.0051115 0.00604 0.00604 0.00604
44 42 0.026962 0.013543 0.0070483 0.98938 0.98615 0.99425 0.79556 0.019257 0.0091076 0.0049877 0.005941 0.005941 0.005941
45 43 0.026752 0.012546 0.0073945 0.99243 0.97926 0.99414 0.82536 0.020015 0.0091324 0.0050037 0.005842 0.005842 0.005842
46 44 0.025512 0.01291 0.0065296 0.99284 0.98377 0.99446 0.8073 0.022218 0.0093803 0.0047843 0.005743 0.005743 0.005743
47 45 0.025071 0.012273 0.0064804 0.92519 0.98283 0.99399 0.8022 0.022355 0.0091429 0.0051858 0.005644 0.005644 0.005644
48 46 0.02441 0.012031 0.0067756 0.9232 0.98173 0.95315 0.81619 0.019415 0.0091877 0.0052021 0.005545 0.005545 0.005545
49 47 0.024003 0.011556 0.0061719 0.9769 0.98091 0.99398 0.79701 0.018607 0.0089998 0.0049653 0.005446 0.005446 0.005446
50 48 0.023256 0.013171 0.0057394 0.98993 0.97992 0.99348 0.79191 0.023383 0.0096035 0.0049262 0.005347 0.005347 0.005347
51 49 0.022691 0.01123 0.0064885 0.96746 0.98329 0.99362 0.80438 0.020979 0.0090265 0.0046365 0.005248 0.005248 0.005248
52 50 0.023009 0.010828 0.0061525 0.97973 0.9809 0.99406 0.78401 0.021838 0.009346 0.0045595 0.005149 0.005149 0.005149
53 51 0.022762 0.011628 0.0055389 0.98075 0.97948 0.99472 0.79553 0.020373 0.0091763 0.0044677 0.00505 0.00505 0.00505
54 52 0.022359 0.011327 0.0064108 0.92924 0.97627 0.99434 0.82906 0.01873 0.0088215 0.0047634 0.004951 0.004951 0.004951
55 53 0.021434 0.010782 0.0063598 0.89751 0.98395 0.99438 0.82292 0.01758 0.0084286 0.0047634 0.004852 0.004852 0.004852
56 54 0.021491 0.011245 0.0060554 0.93484 0.9871 0.99439 0.76245 0.019861 0.0091343 0.0045495 0.004753 0.004753 0.004753
57 55 0.02136 0.010731 0.005393 0.98175 0.97451 0.99376 0.81609 0.017771 0.0085478 0.0044975 0.004654 0.004654 0.004654
58 56 0.020601 0.011435 0.0048984 0.98702 0.97619 0.99379 0.77352 0.020876 0.0089264 0.0044127 0.004555 0.004555 0.004555
59 57 0.020204 0.01007 0.0049571 0.98484 0.97553 0.99377 0.80822 0.018683 0.0087328 0.0042574 0.004456 0.004456 0.004456
60 58 0.020187 0.010405 0.0048422 0.99255 0.97817 0.99174 0.77373 0.018314 0.0085936 0.0043662 0.004357 0.004357 0.004357
61 59 0.019939 0.011237 0.0055137 0.96766 0.98313 0.99227 0.79108 0.018299 0.0086794 0.0046237 0.004258 0.004258 0.004258
62 60 0.019841 0.010175 0.0051564 0.97467 0.98512 0.99305 0.83424 0.016635 0.008214 0.0044363 0.004159 0.004159 0.004159
63 61 0.019577 0.011111 0.0053072 0.98888 0.9871 0.99366 0.84728 0.018191 0.0086145 0.0041327 0.00406 0.00406 0.00406
64 62 0.020016 0.0097929 0.0057736 0.98464 0.9871 0.99353 0.81056 0.016411 0.0081959 0.0042267 0.003961 0.003961 0.003961
65 63 0.018354 0.010467 0.0048361 0.99336 0.9851 0.99354 0.78057 0.017278 0.0084858 0.0038996 0.003862 0.003862 0.003862
66 64 0.019343 0.010997 0.0050088 0.99232 0.98663 0.99367 0.83564 0.016815 0.0083208 0.0038519 0.003763 0.003763 0.003763
67 65 0.018261 0.0098814 0.0060664 0.98882 0.9871 0.99358 0.82697 0.015722 0.0081091 0.0038631 0.003664 0.003664 0.003664
68 66 0.017361 0.010034 0.0045755 0.9908 0.9871 0.99353 0.86476 0.014229 0.0077305 0.0040259 0.003565 0.003565 0.003565
69 67 0.018567 0.010758 0.0043478 0.99195 0.9871 0.9936 0.86666 0.013242 0.0076628 0.0036473 0.003466 0.003466 0.003466
70 68 0.017044 0.010896 0.004663 0.99249 0.98488 0.99403 0.84897 0.015298 0.0079508 0.0035157 0.003367 0.003367 0.003367
71 69 0.016631 0.0092014 0.0043957 0.98846 0.98422 0.99374 0.81506 0.015467 0.0079451 0.0035839 0.003268 0.003268 0.003268
72 70 0.01695 0.010094 0.0035115 0.99048 0.98446 0.99367 0.84357 0.014905 0.0078063 0.0035594 0.003169 0.003169 0.003169
73 71 0.015838 0.010228 0.003958 0.99303 0.98292 0.99246 0.90626 0.012365 0.0071888 0.0033793 0.00307 0.00307 0.00307
74 72 0.015778 0.0095427 0.0062521 0.99223 0.98173 0.99247 0.85636 0.014819 0.0079422 0.0033822 0.002971 0.002971 0.002971
75 73 0.015479 0.0093237 0.00404 0.99072 0.98312 0.99374 0.86208 0.015422 0.0078058 0.0033088 0.002872 0.002872 0.002872
76 74 0.015936 0.0093511 0.0045926 0.98964 0.98485 0.99389 0.87519 0.012562 0.0072331 0.0032785 0.002773 0.002773 0.002773
77 75 0.014587 0.0090074 0.0044003 0.98713 0.9871 0.99287 0.88673 0.013244 0.0074663 0.0034659 0.002674 0.002674 0.002674
78 76 0.014562 0.0085611 0.003786 0.98725 0.9871 0.99325 0.86882 0.012914 0.007401 0.0032434 0.002575 0.002575 0.002575
79 77 0.014627 0.0093808 0.0040065 0.98718 0.9871 0.99327 0.85954 0.013101 0.0073853 0.003063 0.002476 0.002476 0.002476
80 78 0.014713 0.0086822 0.0041137 0.98856 0.98458 0.99338 0.85969 0.013281 0.0073719 0.0029892 0.002377 0.002377 0.002377
81 79 0.013479 0.008951 0.0032 0.99063 0.98275 0.99299 0.89536 0.011977 0.0070486 0.0029796 0.002278 0.002278 0.002278
82 80 0.01334 0.0088546 0.0039412 0.99078 0.98297 0.99239 0.90339 0.011971 0.0071206 0.0030048 0.002179 0.002179 0.002179
83 81 0.013471 0.0085181 0.0038238 0.99147 0.98339 0.99223 0.9112 0.011377 0.0070229 0.0029151 0.00208 0.00208 0.00208
84 82 0.013225 0.0081305 0.0039529 0.98983 0.98394 0.99189 0.90095 0.011049 0.0069065 0.0028324 0.001981 0.001981 0.001981
85 83 0.012782 0.0087502 0.0041046 0.98948 0.98345 0.99231 0.87987 0.011397 0.0071707 0.0028323 0.001882 0.001882 0.001882
86 84 0.01268 0.008468 0.003646 0.98967 0.98255 0.99349 0.90452 0.010897 0.0069289 0.0028338 0.001783 0.001783 0.001783
87 85 0.011956 0.0081656 0.0033978 0.99234 0.98695 0.99349 0.90359 0.011106 0.0069551 0.0027155 0.001684 0.001684 0.001684
88 86 0.011678 0.0074737 0.0029689 0.99059 0.9871 0.99331 0.90539 0.011038 0.0070376 0.0026494 0.001585 0.001585 0.001585
89 87 0.011452 0.0082765 0.0031965 0.99032 0.9871 0.99354 0.90376 0.011192 0.0070019 0.0026226 0.001486 0.001486 0.001486
90 88 0.011014 0.0077558 0.0029091 0.98926 0.9871 0.99367 0.93096 0.0097374 0.0064735 0.0025889 0.001387 0.001387 0.001387
91 89 0.010877 0.0081713 0.0035058 0.98853 0.9871 0.99369 0.89844 0.010716 0.0067215 0.0025122 0.001288 0.001288 0.001288
92 90 0.01086 0.0081078 0.0029808 0.98859 0.9871 0.99369 0.90179 0.010313 0.0066843 0.002467 0.001189 0.001189 0.001189
93 91 0.010432 0.0082593 0.0032532 0.98823 0.98823 0.99386 0.90426 0.00942 0.0063066 0.0025923 0.00109 0.00109 0.00109
94 92 0.0099856 0.0072484 0.0027239 0.98621 0.98861 0.99381 0.91917 0.010086 0.0064635 0.0026085 0.000991 0.000991 0.000991
95 93 0.0097199 0.0081254 0.0029498 0.98445 0.98366 0.99358 0.92386 0.0092925 0.0062866 0.0023818 0.000892 0.000892 0.000892
96 94 0.0098492 0.0087202 0.0028662 0.98588 0.98249 0.99359 0.92486 0.0095873 0.0064139 0.0023302 0.000793 0.000793 0.000793
97 95 0.0095458 0.0077495 0.0031524 0.98675 0.98195 0.99366 0.91152 0.0091509 0.0061636 0.002304 0.000694 0.000694 0.000694
98 96 0.0093134 0.0070511 0.010882 0.98633 0.98247 0.99361 0.91815 0.0090792 0.0062695 0.0022655 0.000595 0.000595 0.000595
99 97 0.0092242 0.0074598 0.0032303 0.98604 0.98365 0.99366 0.9308 0.0082706 0.005929 0.0022603 0.000496 0.000496 0.000496
100 98 0.0088322 0.007461 0.0025581 0.9797 0.9832 0.99359 0.92623 0.0086755 0.006093 0.0023018 0.000397 0.000397 0.000397
101 99 0.009008 0.0076601 0.0027773 0.97461 0.98322 0.99354 0.93797 0.0082771 0.0060029 0.0023297 0.000298 0.000298 0.000298

BIN
models/weights/results.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

View File

@@ -9,7 +9,7 @@ import os
import sys
import time
import json
import yaml # 新增导入
import yaml
import argparse
import logging
import random
@@ -215,12 +215,15 @@ class DNFDataCollector:
return count
def create_dataset_config(self):
"""创建YOLO数据集配置文件"""
"""创建YOLO数据集配置文件(修复版)"""
data_yaml_path = self.output_dir / "data.yaml"
# 数据集配置
# 使用绝对路径
abs_data_dir = self.output_dir.absolute()
# 确保路径正确YOLOv5期望的格式
data_config = {
"path": str(self.output_dir.absolute()),
"path": str(abs_data_dir),
"train": str((self.images_dir / "train").absolute()),
"val": str((self.images_dir / "val").absolute()),
"test": str((self.images_dir / "test").absolute()),

View File

@@ -37,7 +37,7 @@ class YOLOTrainer:
self.config = self.load_config()
# YOLO仓库路径
self.yolo_repo = Path(self.config.get("yolo_repo", "yolov5"))
self.yolo_repo = Path(self.config.get("yolo_repo", "tools/yolov5"))
# 检查配置
self.validate_config()
@@ -82,44 +82,24 @@ class YOLOTrainer:
logger.error(f"数据目录不存在: {data_dir}")
return False
# 创建YOLO数据配置
data_yaml_path = data_dir / "data.yaml"
# 验证数据目录结构
images_dir = data_dir / "images"
train_dir = images_dir / "train"
val_dir = images_dir / "val"
if not train_dir.exists() or not val_dir.exists():
logger.warning(f"训练/验证目录不存在: {train_dir} / {val_dir}")
logger.warning("请先运行 data_collector.py 生成训练数据")
return False
# 统计图像数量
images_dir = data_dir / "images"
train_images = list((images_dir / "train").glob("*.jpg"))
val_images = list((images_dir / "val").glob("*.jpg"))
train_images = list(train_dir.glob("*.jpg"))
val_images = list(val_dir.glob("*.jpg"))
if not train_images:
logger.warning(f"没有找到训练图像: {images_dir / 'train'}")
if not val_images:
logger.warning(f"没有找到验证图像: {images_dir / 'val'}")
# 获取类别
classes = self.config.get("classes", [
"monster", "boss", "door", "item", "npc", "player",
"hp_bar", "mp_bar", "skill_ready", "cooldown"
])
# 创建数据配置文件
data_config = {
"path": str(data_dir),
"train": str(images_dir / "train"),
"val": str(images_dir / "val"),
"test": str(images_dir / "test"),
"nc": len(classes),
"names": classes
}
# 保存配置
with open(data_yaml_path, "w", encoding="utf-8") as f:
yaml.dump(data_config, f, default_flow_style=False, sort_keys=False)
logger.info(f"已创建数据配置: {data_yaml_path}")
logger.info(f"已创建数据配置: {data_dir / 'data.yaml'}")
logger.info(f"训练图像: {len(train_images)}, 验证图像: {len(val_images)}")
return True
return len(train_images) > 0 and len(val_images) > 0
def clone_yolo_repo(self):
"""克隆YOLOv5仓库"""