Update README.md
Browse files
README.md
CHANGED
@@ -1,29 +1,41 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
configs:
|
4 |
-
- config_name: default
|
5 |
-
data_files:
|
6 |
-
- split: train
|
7 |
-
path: data/train-*
|
8 |
-
- split: val
|
9 |
-
path: data/val-*
|
10 |
-
dataset_info:
|
11 |
-
features:
|
12 |
-
- name: id
|
13 |
-
dtype: string
|
14 |
-
- name: caption
|
15 |
-
dtype: string
|
16 |
-
- name: image
|
17 |
-
dtype: image
|
18 |
-
- name: cond
|
19 |
-
dtype: image
|
20 |
-
splits:
|
21 |
-
- name: val
|
22 |
-
num_bytes: 166271415.25
|
23 |
-
num_examples: 2603
|
24 |
-
- name: train
|
25 |
-
num_bytes: 4007778277.0
|
26 |
-
num_examples: 62312
|
27 |
-
download_size: 4097346656
|
28 |
-
dataset_size: 4174049692.25
|
29 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
configs:
|
4 |
+
- config_name: default
|
5 |
+
data_files:
|
6 |
+
- split: train
|
7 |
+
path: data/train-*
|
8 |
+
- split: val
|
9 |
+
path: data/val-*
|
10 |
+
dataset_info:
|
11 |
+
features:
|
12 |
+
- name: id
|
13 |
+
dtype: string
|
14 |
+
- name: caption
|
15 |
+
dtype: string
|
16 |
+
- name: image
|
17 |
+
dtype: image
|
18 |
+
- name: cond
|
19 |
+
dtype: image
|
20 |
+
splits:
|
21 |
+
- name: val
|
22 |
+
num_bytes: 166271415.25
|
23 |
+
num_examples: 2603
|
24 |
+
- name: train
|
25 |
+
num_bytes: 4007778277.0
|
26 |
+
num_examples: 62312
|
27 |
+
download_size: 4097346656
|
28 |
+
dataset_size: 4174049692.25
|
29 |
+
---
|
30 |
+
|
31 |
+
We employed [DWPose](https://huggingface.co/yzd-v/DWPose) to detect keypoints in the MSCOCO dataset, subsequently filtering out images where no keypoints were successfully detected.
|
32 |
+
|
33 |
+
```python
|
34 |
+
# detect condition
|
35 |
+
keypoint_image = annotator(image, width=image.width, height=image.height)
|
36 |
+
if keypoint_image.dtype != np.uint8:
|
37 |
+
keypoint_image = (keypoint_image * 255).clip(0, 255).astype(np.uint8)
|
38 |
+
keypoint_image = Image.fromarray(keypoint_image)
|
39 |
+
|
40 |
+
is_all_black = np.all(np.array(keypoint_image) == 0)
|
41 |
+
```
|