From 852109a31f7e1cbe680e95cf8a793c9f4ee63f28 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:00:45 +0800 Subject: [PATCH 01/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/Unmanned_Aircraft_System/README.md diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md new file mode 100644 index 0000000000..8620aae73b --- /dev/null +++ b/src/Unmanned_Aircraft_System/README.md @@ -0,0 +1 @@ +使用强化学习和模拟器进行无人机/无人驾驶飞机路 径规划 \ No newline at end of file From 6fe47f51daaa1ade9e5dcdab13d7928bccb402e9 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:08:41 +0800 Subject: [PATCH 02/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 8620aae73b..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路 径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From af14f998a9070884c7cd8c97c1b2aa54b101c45e Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:11:18 +0800 Subject: [PATCH 03/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From c1ae4acbbef045b93e2c188222df56ebde143228 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:14:42 +0800 Subject: [PATCH 04/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From ddaa9d522d82660b22dda5fd46466d0b009f6ce0 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:15:54 +0800 Subject: [PATCH 05/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From d66962dc189cb673507c7c23cc5a30cc268b08e0 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:20:49 +0800 Subject: [PATCH 06/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 9293e17535979018e820d0fb5feb1f4eb775cc8c Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:23:15 +0800 Subject: [PATCH 07/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From e8fef316bc62a650a2f87294dba71e840670be83 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:27:09 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 7a9fab5526fdd74c47be19721805b231891899d7 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:50:42 +0800 Subject: [PATCH 09/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 79cc5314e7877fa7f6df8af5500bd0108a121d4e Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 18:51:48 +0800 Subject: [PATCH 10/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 29f77705706b6019d217b13d23af6c639bc60b5c Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 19:29:47 +0800 Subject: [PATCH 11/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 4b1aca1e95f41e2141387c92a6487d8a7027ff28 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 19:41:49 +0800 Subject: [PATCH 12/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From edcd60e09ca3e17b693a474637aae2bbc88eaf5a Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 19:43:49 +0800 Subject: [PATCH 13/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From e43731a1b15a6760ba58613b26ce8ee5d348d7f1 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 19:46:43 +0800 Subject: [PATCH 14/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 0f8575a199751c6514077f110c7b4825eb5cede0 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 19:50:09 +0800 Subject: [PATCH 15/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 60db4b42c3ffbab3936bc0caff6c3ba3a2f05b7c Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 19:51:38 +0800 Subject: [PATCH 16/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..62f5b7cc72 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From d9535bae15e08ac997a25c9e277c9128b2591229 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Thu, 18 Dec 2025 22:43:17 +0800 Subject: [PATCH 17/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 62f5b7cc72..bd2f2f59ca 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file From 78869806c6590301db64df7a712ce2336412a730 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 00:11:07 +0800 Subject: [PATCH 18/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=EF=BC=9A=E6=9B=B4=E6=96=B0Unmanned=5FAircraft=5FSystem?= =?UTF-8?q?=E7=9A=84README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index bd2f2f59ca..645fb4d244 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1 +1,2 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 \ No newline at end of file +使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 + From b4985379cce2f25beda21ede15815c56b9b0d9bd Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 14:28:06 +0800 Subject: [PATCH 19/29] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 645fb4d244..34b39fbed7 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1,2 +1,2 @@ -使用强化学习和模拟器进行无人机/无人驾驶飞机路径规划 +基于 YOLOv8 的无人机地面简易目标识别(如行人 / 小型车辆) From bc149727947fd991bdbb476179644bc62b823cd0 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 16:56:24 +0800 Subject: [PATCH 20/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md index 34b39fbed7..6f3bf20ddc 100644 --- a/src/Unmanned_Aircraft_System/README.md +++ b/src/Unmanned_Aircraft_System/README.md @@ -1,2 +1,2 @@ -基于 YOLOv8 的无人机地面简易目标识别(如行人 / 小型车辆) +无人机航拍图像的小目标识别算法研究 From c0679cbcd98c710f74249ff454e4e7d9a608577b Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 17:28:53 +0800 Subject: [PATCH 21/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Unmanned_Aircraft_System/README.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 src/Unmanned_Aircraft_System/README.md diff --git a/src/Unmanned_Aircraft_System/README.md b/src/Unmanned_Aircraft_System/README.md deleted file mode 100644 index 6f3bf20ddc..0000000000 --- a/src/Unmanned_Aircraft_System/README.md +++ /dev/null @@ -1,2 +0,0 @@ -无人机航拍图像的小目标识别算法研究 - From 2d1e296235088c7f2036bb31121a8a5b399ed66e Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 17:37:27 +0800 Subject: [PATCH 22/29] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=EF=BC=9AUnmanned=5FAircraft=5FSystem=20?= =?UTF-8?q?=E2=86=92=20UAV=5FSmall=5FTarget=5FRecognition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UAV_Small_Target_Recognition/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/UAV_Small_Target_Recognition/README.md diff --git a/src/UAV_Small_Target_Recognition/README.md b/src/UAV_Small_Target_Recognition/README.md new file mode 100644 index 0000000000..c9ac2e269b --- /dev/null +++ b/src/UAV_Small_Target_Recognition/README.md @@ -0,0 +1,3 @@ +无人机航拍图像的小目标识别算法 + + From d49e121e292de767c0d6312f0c5b3c9b29be7b44 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 18:01:45 +0800 Subject: [PATCH 23/29] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UAV_Small_Target_Recognition/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/UAV_Small_Target_Recognition/README.md b/src/UAV_Small_Target_Recognition/README.md index c9ac2e269b..a05dec4c58 100644 --- a/src/UAV_Small_Target_Recognition/README.md +++ b/src/UAV_Small_Target_Recognition/README.md @@ -1,3 +1 @@ -无人机航拍图像的小目标识别算法 - - +无人机航拍图像的小目标识别算法 \ No newline at end of file From 2c572930f54bab14ac8e011a32afbbf50d45c476 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 19:41:09 +0800 Subject: [PATCH 24/29] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E4=B8=BAGesture=5FControl=5Ffor=5FAirsim=5FU?= =?UTF-8?q?AV=EF=BC=8C=E5=B9=B6=E6=9B=B4=E6=96=B0README.md=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E6=97=A0=E4=BA=BA=E6=9C=BA=E6=89=8B=E5=8A=BF=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Gesture_Control_for_Airsim_UAV/README.md | 2 ++ src/Gesture_Control_for_Airsim_UAV/main.py | 1 + src/UAV_Small_Target_Recognition/README.md | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/Gesture_Control_for_Airsim_UAV/README.md create mode 100644 src/Gesture_Control_for_Airsim_UAV/main.py delete mode 100644 src/UAV_Small_Target_Recognition/README.md diff --git a/src/Gesture_Control_for_Airsim_UAV/README.md b/src/Gesture_Control_for_Airsim_UAV/README.md new file mode 100644 index 0000000000..4f05828e92 --- /dev/null +++ b/src/Gesture_Control_for_Airsim_UAV/README.md @@ -0,0 +1,2 @@ +允许用户使用手势控制 Airsim 无人机 + diff --git a/src/Gesture_Control_for_Airsim_UAV/main.py b/src/Gesture_Control_for_Airsim_UAV/main.py new file mode 100644 index 0000000000..c6d640eaa5 --- /dev/null +++ b/src/Gesture_Control_for_Airsim_UAV/main.py @@ -0,0 +1 @@ +pressed) \ No newline at end of file diff --git a/src/UAV_Small_Target_Recognition/README.md b/src/UAV_Small_Target_Recognition/README.md deleted file mode 100644 index a05dec4c58..0000000000 --- a/src/UAV_Small_Target_Recognition/README.md +++ /dev/null @@ -1 +0,0 @@ -无人机航拍图像的小目标识别算法 \ No newline at end of file From d5f2c9d16e3500dce621d7ceb7965e2f7c5f0d6f Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 21:16:23 +0800 Subject: [PATCH 25/29] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=EF=BC=9AGesture=5FControl=5Ffor=5FAirsim=5FU?= =?UTF-8?q?AV=20=E2=86=92=20Drone=5Fgesture=5Foperation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../README.md | 0 src/Gesture_Control_for_Airsim_UAV/main.py | 1 - 2 files changed, 1 deletion(-) rename src/{Gesture_Control_for_Airsim_UAV => Drone_gesture_operation}/README.md (100%) delete mode 100644 src/Gesture_Control_for_Airsim_UAV/main.py diff --git a/src/Gesture_Control_for_Airsim_UAV/README.md b/src/Drone_gesture_operation/README.md similarity index 100% rename from src/Gesture_Control_for_Airsim_UAV/README.md rename to src/Drone_gesture_operation/README.md diff --git a/src/Gesture_Control_for_Airsim_UAV/main.py b/src/Gesture_Control_for_Airsim_UAV/main.py deleted file mode 100644 index c6d640eaa5..0000000000 --- a/src/Gesture_Control_for_Airsim_UAV/main.py +++ /dev/null @@ -1 +0,0 @@ -pressed) \ No newline at end of file From f1d316714ea393683f4e830c370d226ba183c967 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Fri, 19 Dec 2025 22:01:09 +0800 Subject: [PATCH 26/29] =?UTF-8?q?=E6=9B=B4=E6=96=B0Drone=5Fgesture=5Fopera?= =?UTF-8?q?tion/README.md=EF=BC=9A=E5=9F=BA=E4=BA=8E=E8=BD=BB=E9=87=8F?= =?UTF-8?q?=E7=BA=A7=20CNN=20=E7=9A=84=E6=97=A0=E4=BA=BA=E6=9C=BA=E6=89=8B?= =?UTF-8?q?=E5=8A=BF=E6=93=8D=E6=8E=A7=E6=8C=87=E4=BB=A4=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Drone_gesture_operation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drone_gesture_operation/README.md b/src/Drone_gesture_operation/README.md index 4f05828e92..3454d8e7dd 100644 --- a/src/Drone_gesture_operation/README.md +++ b/src/Drone_gesture_operation/README.md @@ -1,2 +1,2 @@ -允许用户使用手势控制 Airsim 无人机 +基于轻量级 CNN 的无人机手势操控指令识别 From 5a5639ca81060ddcba63d4cd8b20d16697f1074e Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Sat, 20 Dec 2025 16:08:12 +0800 Subject: [PATCH 27/29] =?UTF-8?q?=E6=97=A0=E4=BA=BA=E6=9C=BA=E6=89=8B?= =?UTF-8?q?=E5=8A=BF=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Drone_gesture_operation/main.py | 109 ++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 src/Drone_gesture_operation/main.py diff --git a/src/Drone_gesture_operation/main.py b/src/Drone_gesture_operation/main.py new file mode 100644 index 0000000000..ca2ffe128d --- /dev/null +++ b/src/Drone_gesture_operation/main.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import numpy as np +import tensorflow as tf +import os +import warnings +import pathlib + +# 关闭oneDNN提示 +os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0' +# 关闭TF Lite警告 +warnings.filterwarnings('ignore', category=UserWarning, module='tensorflow.lite.python.interpreter') + + +class PointHistoryClassifier(object): + def __init__( + self, + model_path='model/point_history_classifier/point_history_classifier.tflite', + score_th=0.5, + invalid_value=0, + num_threads=1, + ): + if not os.path.isfile(model_path): + raise FileNotFoundError(f"模型文件不存在:{model_path}") + if not model_path.endswith('.tflite'): + raise ValueError(f"路径不是.tflite文件:{model_path}") + + with open(model_path, 'rb') as f: + model_data = f.read() + self.interpreter = tf.lite.Interpreter(model_content=model_data, num_threads=num_threads) + self.interpreter.allocate_tensors() + self.input_details = self.interpreter.get_input_details() + self.output_details = self.interpreter.get_output_details() + + self.score_th = score_th + self.invalid_value = invalid_value + print(f"✅ 模型加载成功!") + print(f"输入张量形状:{self.input_details[0]['shape']}") + print(f"输出张量形状:{self.output_details[0]['shape']}") + + def __call__(self, point_history): + if not isinstance(point_history, (list, np.ndarray)): + raise TypeError("输入必须是列表或numpy数组") + + input_data = np.array([point_history], dtype=np.float32) + if input_data.shape != tuple(self.input_details[0]['shape']): + raise ValueError( + f"输入形状不匹配!模型要求:{self.input_details[0]['shape']},实际:{input_data.shape}" + ) + + self.interpreter.set_tensor(self.input_details[0]['index'], input_data) + self.interpreter.invoke() + + result = self.interpreter.get_tensor(self.output_details[0]['index']) + result_squeezed = np.squeeze(result) + result_index = np.argmax(result_squeezed) + + print(f"\n原始预测得分:{result_squeezed}") + print(f"最高得分索引:{result_index},得分值:{result_squeezed[result_index]}") + + if result_squeezed[result_index] < self.score_th: + result_index = self.invalid_value + print(f"⚠️ 得分低于阈值({self.score_th}),返回无效值:{self.invalid_value}") + + return result_index + + +def preprocess_point_history(point_history): + """归一化关键点数据到0~1""" + point_history = np.array(point_history, dtype=np.float32) + min_val = np.min(point_history) + max_val = np.max(point_history) + # 避免除零 + point_history = (point_history - min_val) / (max_val - min_val + 1e-6) + return point_history + + +if __name__ == "__main__": + # 配置 + MODEL_PATH = pathlib.Path( + r"E:\无人机\dronehandgesture2023P1\model\point_history_classifier\point_history_classifier.tflite").resolve() + SCORE_THRESHOLD = 0.5 + # 手势映射(根据实际训练标签调整) + gesture_mapping = {0: "无手势/降落", 1: "起飞/前进"} + + print(f"当前模型路径:{MODEL_PATH}") + try: + # 实例化分类器 + classifier = PointHistoryClassifier( + model_path=str(MODEL_PATH), + score_th=SCORE_THRESHOLD, + num_threads=4 + ) + + # 1. 测试数据(随机生成32维,匹配模型输入) + test_point_history = np.random.rand(32).astype(np.float32) + # 2. 预处理(替换为真实数据时注释掉随机数,启用下面两行) + # real_point_history = [0.1,0.2,...,0.3] # 32个真实关键点数值 + # test_point_history = preprocess_point_history(real_point_history) + + # 分类推理 + result = classifier(test_point_history) + print(f"\n🎯 最终分类结果:{result} → {gesture_mapping.get(result, '未知手势')}") + + except Exception as e: + print(f"\n❌ 错误:{e}") + import traceback + + traceback.print_exc() \ No newline at end of file From 0ecd007042d36d15111f85915c6762860426dc10 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Sat, 20 Dec 2025 16:15:47 +0800 Subject: [PATCH 28/29] =?UTF-8?q?=E6=9B=B4=E6=96=B0Drone=5Fgesture=5Fopera?= =?UTF-8?q?tion=EF=BC=9A=E5=90=8C=E6=AD=A5main.py=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Drone_gesture_operation/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Drone_gesture_operation/README.md b/src/Drone_gesture_operation/README.md index 3454d8e7dd..93d5444e0d 100644 --- a/src/Drone_gesture_operation/README.md +++ b/src/Drone_gesture_operation/README.md @@ -1,2 +1 @@ 基于轻量级 CNN 的无人机手势操控指令识别 - From 786c5984bc6e56f89a7348408257575e783b1934 Mon Sep 17 00:00:00 2001 From: jiangyi2302 <2592419327@qq.com> Date: Sat, 20 Dec 2025 16:20:07 +0800 Subject: [PATCH 29/29] =?UTF-8?q?=E6=97=A0=E4=BA=BA=E6=9C=BA=E6=89=8B?= =?UTF-8?q?=E5=8A=BF=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Drone_gesture_operation/main.py | 355 ++++++++++++++++++++-------- 1 file changed, 256 insertions(+), 99 deletions(-) diff --git a/src/Drone_gesture_operation/main.py b/src/Drone_gesture_operation/main.py index ca2ffe128d..fbbf1930c2 100644 --- a/src/Drone_gesture_operation/main.py +++ b/src/Drone_gesture_operation/main.py @@ -1,109 +1,266 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import copy +import argparse +import itertools +from collections import Counter +from collections import deque +import time + +import cv2 as cv import numpy as np -import tensorflow as tf -import os -import warnings -import pathlib - -# 关闭oneDNN提示 -os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0' -# 关闭TF Lite警告 -warnings.filterwarnings('ignore', category=UserWarning, module='tensorflow.lite.python.interpreter') - - -class PointHistoryClassifier(object): - def __init__( - self, - model_path='model/point_history_classifier/point_history_classifier.tflite', - score_th=0.5, - invalid_value=0, - num_threads=1, - ): - if not os.path.isfile(model_path): - raise FileNotFoundError(f"模型文件不存在:{model_path}") - if not model_path.endswith('.tflite'): - raise ValueError(f"路径不是.tflite文件:{model_path}") - - with open(model_path, 'rb') as f: - model_data = f.read() - self.interpreter = tf.lite.Interpreter(model_content=model_data, num_threads=num_threads) - self.interpreter.allocate_tensors() - self.input_details = self.interpreter.get_input_details() - self.output_details = self.interpreter.get_output_details() - - self.score_th = score_th - self.invalid_value = invalid_value - print(f"✅ 模型加载成功!") - print(f"输入张量形状:{self.input_details[0]['shape']}") - print(f"输出张量形状:{self.output_details[0]['shape']}") + +# ========== FPS计算 ========== +class CvFpsCalc: + def __init__(self, buffer_len=10): + self.buffer_len = buffer_len + self.times = deque(maxlen=buffer_len) + + def get(self): + self.times.append(time.perf_counter()) + if len(self.times) < 2: + return 0 + return int(len(self.times) / (self.times[-1] - self.times[0])) + + +# ========== 手势分类器(简化版) ========== +class KeyPointClassifier: + def __call__(self, landmark_list): + return 7 # 模拟点手势 + + +class PointHistoryClassifier: def __call__(self, point_history): - if not isinstance(point_history, (list, np.ndarray)): - raise TypeError("输入必须是列表或numpy数组") - - input_data = np.array([point_history], dtype=np.float32) - if input_data.shape != tuple(self.input_details[0]['shape']): - raise ValueError( - f"输入形状不匹配!模型要求:{self.input_details[0]['shape']},实际:{input_data.shape}" - ) - - self.interpreter.set_tensor(self.input_details[0]['index'], input_data) - self.interpreter.invoke() - - result = self.interpreter.get_tensor(self.output_details[0]['index']) - result_squeezed = np.squeeze(result) - result_index = np.argmax(result_squeezed) - - print(f"\n原始预测得分:{result_squeezed}") - print(f"最高得分索引:{result_index},得分值:{result_squeezed[result_index]}") - - if result_squeezed[result_index] < self.score_th: - result_index = self.invalid_value - print(f"⚠️ 得分低于阈值({self.score_th}),返回无效值:{self.invalid_value}") - - return result_index - - -def preprocess_point_history(point_history): - """归一化关键点数据到0~1""" - point_history = np.array(point_history, dtype=np.float32) - min_val = np.min(point_history) - max_val = np.max(point_history) - # 避免除零 - point_history = (point_history - min_val) / (max_val - min_val + 1e-6) - return point_history - - -if __name__ == "__main__": - # 配置 - MODEL_PATH = pathlib.Path( - r"E:\无人机\dronehandgesture2023P1\model\point_history_classifier\point_history_classifier.tflite").resolve() - SCORE_THRESHOLD = 0.5 - # 手势映射(根据实际训练标签调整) - gesture_mapping = {0: "无手势/降落", 1: "起飞/前进"} - - print(f"当前模型路径:{MODEL_PATH}") - try: - # 实例化分类器 - classifier = PointHistoryClassifier( - model_path=str(MODEL_PATH), - score_th=SCORE_THRESHOLD, - num_threads=4 + return 0 + + +# ========== 参数解析 ========== +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--device", type=int, default=0) + parser.add_argument("--width", type=int, default=960) + parser.add_argument("--height", type=int, default=540) + return parser.parse_args() + + +# ========== 辅助函数 ========== +def select_mode(key, mode): + number = -1 + if 48 <= key <= 57: + number = key - 48 + if key == ord('n'): + mode = 0 + if key == ord('k'): + mode = 1 + if key == ord('h'): + mode = 2 + return number, mode + + +def calc_bounding_rect(image): + """模拟手部边界框(屏幕中心)""" + h, w = image.shape[:2] + cx, cy = w // 2, h // 2 + bw, bh = 200, 200 # 边界框大小 + return [cx - bw // 2, cy - bh // 2, cx + bw // 2, cy + bh // 2] + + +def calc_landmark_list(image): + """模拟21个手部关键点(适配原代码逻辑)""" + h, w = image.shape[:2] + cx, cy = w // 2, h // 2 + landmark_list = [] + + # 手掌中心(0号点) + landmark_list.append([cx, cy]) + + # 拇指(1-4号点) + landmark_list.append([cx - 50, cy - 30]) + landmark_list.append([cx - 80, cy - 60]) + landmark_list.append([cx - 100, cy - 90]) + landmark_list.append([cx - 110, cy - 110]) + + # 食指(5-8号点) + landmark_list.append([cx + 50, cy - 30]) + landmark_list.append([cx + 80, cy - 60]) + landmark_list.append([cx + 100, cy - 90]) + landmark_list.append([cx + 110, cy - 110]) # 8号点(点手势关键) + + # 中指(9-12号点) + landmark_list.append([cx + 30, cy - 10]) + landmark_list.append([cx + 50, cy - 40]) + landmark_list.append([cx + 70, cy - 70]) + landmark_list.append([cx + 80, cy - 90]) + + # 无名指(13-16号点) + landmark_list.append([cx + 10, cy + 10]) + landmark_list.append([cx + 20, cy - 20]) + landmark_list.append([cx + 30, cy - 50]) + landmark_list.append([cx + 40, cy - 70]) + + # 小指(17-20号点) + landmark_list.append([cx - 10, cy + 10]) + landmark_list.append([cx - 20, cy - 20]) + landmark_list.append([cx - 30, cy - 50]) + landmark_list.append([cx - 40, cy - 70]) + + return landmark_list + + +def pre_process_landmark(landmark_list): + temp = copy.deepcopy(landmark_list) + if not temp: + return [] + base_x, base_y = temp[0][0], temp[0][1] + for i in range(len(temp)): + temp[i][0] -= base_x + temp[i][1] -= base_y + temp = list(itertools.chain.from_iterable(temp)) + max_val = max(map(abs, temp)) if temp else 1 + return [x / max_val for x in temp] + + +def pre_process_point_history(image, point_history): + temp = copy.deepcopy(point_history) + if not temp: + return [] + base_x, base_y = temp[0][0], temp[0][1] + image_w, image_h = image.shape[1], image.shape[0] + for i in range(len(temp)): + temp[i][0] = (temp[i][0] - base_x) / image_w + temp[i][1] = (temp[i][1] - base_y) / image_h + return list(itertools.chain.from_iterable(temp)) + + +def draw_landmarks(image, landmark_list): + """绘制模拟关键点""" + if len(landmark_list) == 0: + return image + # 绘制手指连线 + links = [(2, 3), (3, 4), (5, 6), (6, 7), (7, 8), (9, 10), (10, 11), (11, 12), + (13, 14), (14, 15), (15, 16), (17, 18), (18, 19), (19, 20), + (0, 1), (1, 2), (2, 5), (5, 9), (9, 13), (13, 17), (17, 0)] + for (p1, p2) in links: + if p1 < len(landmark_list) and p2 < len(landmark_list): + cv.line(image, tuple(landmark_list[p1]), tuple(landmark_list[p2]), (0, 0, 0), 6) + cv.line(image, tuple(landmark_list[p1]), tuple(landmark_list[p2]), (255, 255, 255), 2) + # 绘制关键点 + for i, (x, y) in enumerate(landmark_list): + size = 8 if i in [4, 8, 12, 16, 20] else 5 + cv.circle(image, (x, y), size, (255, 255, 255), -1) + cv.circle(image, (x, y), size, (0, 0, 0), 1) + return image + + +def draw_bounding_rect(image, brect): + cv.rectangle(image, (brect[0], brect[1]), (brect[2], brect[3]), (0, 255, 0), 2) + return image + + +def draw_info_text(image, brect, hand_sign_text, finger_gesture_text): + cv.rectangle(image, (brect[0], brect[1] - 30), (brect[2], brect[1]), (0, 255, 0), -1) + info = f"Hand: {hand_sign_text}" + cv.putText(image, info, (brect[0] + 5, brect[1] - 5), cv.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2) + if finger_gesture_text: + cv.putText(image, f"Gesture: {finger_gesture_text}", (10, 60), + cv.FONT_HERSHEY_SIMPLEX, 1.0, (0, 0, 255), 3) + return image + + +def draw_point_history(image, point_history): + for i, (x, y) in enumerate(point_history): + if x != 0 and y != 0: + cv.circle(image, (x, y), 2 + i // 2, (0, 255, 0), -1) + return image + + +def draw_info(image, fps, mode, number): + cv.putText(image, f"FPS: {fps}", (10, 30), cv.FONT_HERSHEY_SIMPLEX, 1.0, (0, 0, 255), 3) + mode_text = ["Idle", "Log Keypoint", "Log Point History"][mode] if 0 <= mode <= 2 else "Idle" + cv.putText(image, f"Mode: {mode_text}", (10, 90), cv.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2) + if 0 <= number <= 9: + cv.putText(image, f"Num: {number}", (10, 120), cv.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2) + return image + + +# ========== 主函数 ========== +def main(): + args = get_args() + # 初始化摄像头 + cap = cv.VideoCapture(args.device) + cap.set(cv.CAP_PROP_FRAME_WIDTH, args.width) + cap.set(cv.CAP_PROP_FRAME_HEIGHT, args.height) + + # 初始化工具类 + cvFpsCalc = CvFpsCalc(buffer_len=10) + keypoint_classifier = KeyPointClassifier() + point_history_classifier = PointHistoryClassifier() + + # 标签和历史数据 + keypoint_labels = ["None", "Point", "Fist", "OK", "Peace", "ThumbUp", "ThumbDown", "PointGesture"] + point_history_labels = ["None", "MoveUp", "MoveDown", "MoveLeft", "MoveRight"] + history_length = 16 + point_history = deque(maxlen=history_length) + finger_gesture_history = deque(maxlen=history_length) + mode = 0 + + while True: + # FPS计算 + fps = cvFpsCalc.get() + + # 按键处理 + key = cv.waitKey(1) & 0xFF + if key == 27: # ESC退出 + break + number, mode = select_mode(key, mode) + + # 读取摄像头帧 + ret, frame = cap.read() + if not ret: + break + frame = cv.flip(frame, 1) # 镜像显示 + debug_frame = copy.deepcopy(frame) + + # 【核心修改】跳过真实检测,直接模拟手部数据 + brect = calc_bounding_rect(debug_frame) + landmark_list = calc_landmark_list(debug_frame) + + # 预处理 + pre_landmark = pre_process_landmark(landmark_list) + pre_point_history = pre_process_point_history(debug_frame, point_history) + + # 手势分类 + hand_sign_id = keypoint_classifier(pre_landmark) + point_history.append(landmark_list[8] if hand_sign_id == 7 else [0, 0]) + + # 手指手势分类 + finger_gesture_id = 0 + if len(pre_point_history) == history_length * 2: + finger_gesture_id = point_history_classifier(pre_point_history) + finger_gesture_history.append(finger_gesture_id) + most_common = Counter(finger_gesture_history).most_common(1) + + # 绘制UI + debug_frame = draw_bounding_rect(debug_frame, brect) + debug_frame = draw_landmarks(debug_frame, landmark_list) + debug_frame = draw_info_text( + debug_frame, brect, + keypoint_labels[hand_sign_id] if hand_sign_id < len(keypoint_labels) else "Unknown", + point_history_labels[most_common[0][0]] if most_common else "Unknown" ) - # 1. 测试数据(随机生成32维,匹配模型输入) - test_point_history = np.random.rand(32).astype(np.float32) - # 2. 预处理(替换为真实数据时注释掉随机数,启用下面两行) - # real_point_history = [0.1,0.2,...,0.3] # 32个真实关键点数值 - # test_point_history = preprocess_point_history(real_point_history) + # 绘制辅助信息 + debug_frame = draw_point_history(debug_frame, point_history) + debug_frame = draw_info(debug_frame, fps, mode, number) + + # 显示窗口 + cv.imshow('Hand Gesture Recognition (ESC to exit)', debug_frame) - # 分类推理 - result = classifier(test_point_history) - print(f"\n🎯 最终分类结果:{result} → {gesture_mapping.get(result, '未知手势')}") + # 释放资源 + cap.release() + cv.destroyAllWindows() - except Exception as e: - print(f"\n❌ 错误:{e}") - import traceback - traceback.print_exc() \ No newline at end of file +if __name__ == '__main__': + main() \ No newline at end of file