Skip to content

Commit

Permalink
初始化README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudSir committed Mar 31, 2022
1 parent 1fdba21 commit 18e490c
Show file tree
Hide file tree
Showing 21 changed files with 103 additions and 1 deletion.
104 changes: 103 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,104 @@
# CloudEye
A simple computer vision package for Python.
[简体中文](README.md) | English (coming soon)
CloudEye,一个玩具级的Python计算机视觉库。

## 快速开始

### 1. 安装

```bash
pip3 install cloudeye==0.0.3
```

### 2. 识别手势

**使用opencv**

```python
import cloudeye
import cv2

img = cv2.imread("test.jpg")

classification = cloudeye.gesture.classification()

classification.init(print_info=True)
hand = classification.classify(img=img, score_threshold=0.5)

if not hand == -1:
print("手势:", hand)
else:
print("未知手势")
```

**直接调用**

```python
import cloudeye

classification = cloudeye.gesture.classification()

classification.init(print_info=True)
hand = classification.classify(img="test.jpg", score_threshold=0.5)

if not hand == -1:
print("手势:", hand)
else:
print("未知手势")
```

## API接口说明

### cloudeye.gesture

> 手势识别接口。
**cloudeye.gesture.classification**

```pytho
cloudeye.gesture.classification()
```

手势分类器。

**cloudeye.classification.init**

```python
cloudeye.classification.init(print_info=True)
```

初始化手势分类器。

- 参数
- print_info: 是否输出初始化时的信息

**cloudeye.classification.classify**

```python
cloudeye.classification.classify(img, score_threshold=0.5)
```

从图片中获取手势。

- 参数

- img: 图片文件路径或numpy数组(HWC排列,BGR格式,opencv读取的图片默认是这种格式)。
- score_threshold: 置信度,大于置信度的预测结果会被返回,否则认为是未知手势。

- 返回结果

- -1: 未知手势。
- 0 - 9: 分别对应10种手势。

| 数字 | 手势 |
| :--: | :----------------------: |
| 0 | ![](./images/hand_0.JPG) |
| 1 | ![](./images/hand_1.JPG) |
| 2 | ![](./images/hand_2.JPG) |
| 3 | ![](./images/hand_3.JPG) |
| 4 | ![](./images/hand_4.JPG) |
| 5 | ![](./images/hand_5.JPG) |
| 6 | ![](./images/hand_6.JPG) |
| 7 | ![](./images/hand_7.JPG) |
| 8 | ![](./images/hand_8.JPG) |
| 9 | ![](./images/hand_9.JPG) |
Binary file added _imgs/hand_0.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_1.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_3.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_4.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_5.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_6.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_7.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_8.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _imgs/hand_9.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_0.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_1.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_3.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_4.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_5.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_6.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_7.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_8.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hand_9.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 18e490c

Please sign in to comment.