File size: 1,013 Bytes
0c025d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
license: apache-2.0
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: val
    path: data/val-*
dataset_info:
  features:
  - name: id
    dtype: string
  - name: caption
    dtype: string
  - name: image
    dtype: image
  - name: cond
    dtype: image
  splits:
  - name: val
    num_bytes: 166271415.25
    num_examples: 2603
  - name: train
    num_bytes: 4007778277.0
    num_examples: 62312
  download_size: 4097346656
  dataset_size: 4174049692.25
---

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.

```python
# detect condition
keypoint_image = annotator(image, width=image.width, height=image.height)
if keypoint_image.dtype != np.uint8:
    keypoint_image = (keypoint_image * 255).clip(0, 255).astype(np.uint8)
keypoint_image = Image.fromarray(keypoint_image)

is_all_black = np.all(np.array(keypoint_image) == 0)
```