Repository navigation
无人机手势 #4260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
无人机手势 #4260
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
852109a
完成选题并提交
jiangyi2302 6fe47f5
完成选题并提交
jiangyi2302 af14f99
完成选题并提交
jiangyi2302 c1ae4ac
完成选题并提交
jiangyi2302 ddaa9d5
完成选题并提交
jiangyi2302 d66962d
完成选题并提交
jiangyi2302 9293e17
完成选题并提交
jiangyi2302 e8fef31
完成选题并提交
jiangyi2302 7a9fab5
完成选题并提交
jiangyi2302 79cc531
完成选题并提交
jiangyi2302 29f7770
完成选题并提交
jiangyi2302 4b1aca1
完成选题并提交
jiangyi2302 edcd60e
完成选题并提交
jiangyi2302 e43731a
完成选题并提交
jiangyi2302 0f8575a
完成选题并提交
jiangyi2302 60db4b4
完成选题并提交
jiangyi2302 d9535ba
完成选题并提交
jiangyi2302 7886980
完成选题:更新Unmanned_Aircraft_System的README.md
jiangyi2302 b498537
提交选题
jiangyi2302 bc14972
修改选题
jiangyi2302 c0679cb
完成选题并提交
jiangyi2302 2d1e296
重命名文件夹:Unmanned_Aircraft_System → UAV_Small_Target_Recognition
jiangyi2302 d49e121
完成选题并提交
jiangyi2302 2c57293
重命名文件夹为Gesture_Control_for_Airsim_UAV,并更新README.md补充无人机手势控制内容
jiangyi2302 d5f2c9d
重命名文件夹:Gesture_Control_for_Airsim_UAV → Drone_gesture_operation
jiangyi2302 f1d3167
更新Drone_gesture_operation/README.md:基于轻量级 CNN 的无人机手势操控指令识别
jiangyi2302 5a5639c
无人机手势识别
jiangyi2302 0ecd007
更新Drone_gesture_operation:同步main.py代码
jiangyi2302 786c598
无人机手势识别
jiangyi2302 2bd5954
优化Drone_gesture_operation/main.py:给代码添加注释,增加可读性
jiangyi2302 c6eea87
新增Drone_gesture_operation/keypoint_classifier.py:无人机手势关键点分类器
jiangyi2302 89628ef
Merge branch 'main' into main
jiangyi2302 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,36 @@ | ||
| #!/usr/bin/env python | ||
| # -*- coding: utf-8 -*- | ||
| import numpy as np | ||
| import tensorflow as tf | ||
|
|
||
|
|
||
| class KeyPointClassifier(object): | ||
| def __init__( | ||
| self, | ||
| model_path='model/keypoint_classifier/keypoint_classifier.tflite', | ||
| num_threads=1, | ||
| ): | ||
| self.interpreter = tf.lite.Interpreter(model_path=model_path, | ||
| num_threads=num_threads) | ||
|
|
||
| self.interpreter.allocate_tensors() | ||
| self.input_details = self.interpreter.get_input_details() | ||
| self.output_details = self.interpreter.get_output_details() | ||
|
|
||
| def __call__( | ||
| self, | ||
| landmark_list, | ||
| ): | ||
| input_details_tensor_index = self.input_details[0]['index'] | ||
| self.interpreter.set_tensor( | ||
| input_details_tensor_index, | ||
| np.array([landmark_list], dtype=np.float32)) | ||
| self.interpreter.invoke() | ||
|
|
||
| output_details_tensor_index = self.output_details[0]['index'] | ||
|
|
||
| result = self.interpreter.get_tensor(output_details_tensor_index) | ||
|
|
||
| result_index = np.argmax(np.squeeze(result)) | ||
|
|
||
| return result_index |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有调用的代码