---
# System prepended metadata

title: 'note:K-Hairstyle Dataset'

---

# note:K-Hairstyle Dataset

- [x] [project-site](https://psh01087.github.io/K-Hairstyle/)
- [x] [paper](https://arxiv.org/pdf/2102.06288.pdf)

---
與現存的其他dataset比較:
![](https://i.imgur.com/uzS9O0W.png)

---
segmentation: (polygon)
![](https://i.imgur.com/HdjLLas.jpg)
![](https://i.imgur.com/vPdxsZs.jpg)
![](https://i.imgur.com/E6XWwW7.jpg)
![](https://i.imgur.com/QXEFkr4.jpg)
品質有落差
![](https://i.imgur.com/Rs88UOB.png)
![](https://i.imgur.com/PZqH6P8.png)


---
(pandas)dataframe的格式，以下欄位，共有50萬張圖
```python=
# annotation.pkl
Index(['id', 'source', 'path', 
       'basestyle', 'basestyle_type', 
       'length', 'curl', 'bang', 'loss', 
       'side', 'color', 'rgb', 'partition', 
       'exceptional', 'front', 'horizontal', 
       'vertical', 'age', 'gender', 
       'height', 'width', 'before-after'], dtype='object')
```

### [1] basestyle

![](https://i.imgur.com/Ite4Hil.png)

範例:
相同大類: Misty, 但**捲度s/ss不同**, **瀏海不同**
![](https://i.imgur.com/n97aTWt.jpg =300x)![](https://i.imgur.com/agEZEaw.png =400x)
![](https://i.imgur.com/3umadov.jpg =300x)![](https://i.imgur.com/U8JImp4.png =400x)

- (unique) Id: **unique** id for each image, categorical data.
- (unique) Path: path of an image, string data.
- (identity/NOT unique) Source: identity of an image (**not unique** for each image since we have **multiple images for each identity**), categorical data.
- 不是所有的source都會有after/before。
- 來自同一個source的圖片張數可能從個位數張到百張都有可能。
舉例: source: JSS222755共有112張。
![](https://i.imgur.com/rZsj8Bf.jpg)
- basestyle 共有31類別。
```python=
{'Hershey', 'Parted', 'Build', 'Air', 'other female', 'As', 
 'Comma', 'Tassel', 'other male', 'Hippi', 'Loop', 'Short female', 
 'Body', 'One-block dandy', 'Soft two-block dandy', 'Bob', 'Pleats', 
 'See-through dandy', 'Shadow', 'Misty', 'Dandy', 'Spin swallow', 
 'Pomade', 'Short male', 'Bonnie', 'other layered', 'One length', 
 'Short bob', 'Leaf', 'Regent', 'Baby'}
```

('Hershey', 40695)
('Dandy', 8494)
('Build', 30370)
('Parted', 15035)
('Short male', 14530)
('Tassel', 3778)
('other female', 3961)
('Comma', 2897)
('Short female', 6620)
('Pomade', 9741)
('Bob', 23988)
('Hippi', 18285)
('Misty', 7679)
('Pleats', 19986)
('As', 9468)
('See-through dandy', 5983)
('Leaf', 9910)
('Air', 37427)
('Body', 25026)
('Spin swallow', 6313)
('Soft two-block dandy', 9415)
('One-block dandy', 4935)
('One length', 41974)
('other layered', 61607)
('Loop', 3316)
('other male', 13250)
('Baby', 3582)
('Regent', 11630)
('Bonnie', 18818)
('Shadow', 13161)
('Short bob', 18126)

---
### basestyle_type
共兩類，short, long，長髮比較多
('short', 141660)
('long', 358340)


### length
五類
('### length', 5)
{'female short', 'male', 'short', 'long', 'medium'}

('female short', 21500)
('male', 135485)
('short', 83715)
('long', 194144)
('medium', 65156)

### curl
捲度共9類
('### curl', 9)
{'S', 'C', 'J', 'SC', 'CS', 'CC', 'X', 'S3', 'SS'}

('S', 64654)
('C', 107764)
('J', 80738)
('SC', 20667)
('CS', 2501)
('CC', 4228)
('X', 149744)
('S3', 26165)
('SS', 43539)

### bang
瀏海共七類
('### bang', 7)
{'along faceline', 'others', 'slightly swept', 'None', 'full bang', 'see-through', 'choppy bang'}

('along faceline', 179501)
('others', 64705)
('slightly swept', 58801)
('None', 83662)
('full bang', 46928)
('see-through', 59394)
('choppy bang', 7009)

### loss
髮量有四種
('### loss', 4)
{'None', 'partial', 'early stage', 'hair loss'}

('None', 461187)
('partial', 9262)
('early stage', 9452)
('hair loss', 20099)

### side
不大清楚是什麼，感覺像是男性髮型要不要把髮側推齊
('### side', 3)
{'one-block', 'None', 'two-block'}

('one-block', 29582)
('None', 370321)
('two-block', 100097)

### color
('### color', 9)
{'reddish brown', 'yellowish brown', 'natural brown', 'Ombre', 'ash brown', 'others', 'black', 'two-tone', 'pink-brown'}

('reddish brown', 74363)
('yellowish brown', 66994)
('natural brown', 111430)
('Ombre', 13719)
('ash brown', 12213)
('others', 49415)
('black', 157791)
('two-tone', 10996)
('pink-brown', 3079)

### rgb
??

### partition
十等分髮
('### partition', 10)
{'9:1', 'None', '7:3', '8:2', '2:8', '1:9', '6:4', '3:7', '4:6', '5:5'}

('9:1', 4004)
('None', 153474)
('7:3', 35477)
('8:2', 16588)
('2:8', 10419)
('1:9', 3392)
('6:4', 65225)
('3:7', 32145)
('4:6', 69348)
('5:5', 109928)

### exceptional
('### exceptional', 8)
{'swept hair', 'ponytail', 'braided', 'Buzz cut', 'accessories', 'curly hair', 'others', 'None'}

('swept hair', 18132)
('ponytail', 30883)
('braided', 4156)
('Buzz cut', 873)
('accessories', 3671)
('curly hair', 3519)
('others', 761)
('None', 438005)

### front
('### front', 2)
{False, True}

(False, 488542)
(True, 11458)

### horizontal
('### horizontal', 81)
{0, 6, 9, 12, 18, 24, 27, 30, 36, 42, 45, 48, 54, 60, 63, 66, 72, 78, 81, 84, 90, 96,
 99, 102, 108, 114, 117, 120, 126, 132, 135, 138, 144, 150, 153, 156, 162, 168, 171,
174, 180, 186, 189, 192, 198, 204, 207, 210, 216, 222, 225, 228, 234, 240, 243, 246,
252, 258, 261, 264, 270, 276, 279, 282, 288, 294, 297, 300, 306, 312, 315, 318, 324,
330, 333, 336, 342, 348, 351, 354, 360}

### vertical
('### vertical', 2)
{'middle', 'upper'}

('middle', 275115)
('upper', 224885)

### age
('### age', 64)
{18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6
0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 82, 83, 84
}

### gender
('### gender', 2)
{'female', 'male'}

('female', 361717)
('male', 138283)

### height
圖片大小
('### height', 1)
{512}

(512, 500000)

### width
('### width', 1)
{512}

(512, 500000)

### before-after
('### before-after', 3)
{'after', 'none', 'before'}

('after', 343795)
('none', 60000)
('before', 96205)