dk - edit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
The 23 attributes are:
|
||||
|
||||
| attribute | representation in file | label |
|
||||
|
||||
| gender | gender | male(1), female(2) |
|
||||
| length of upper-body clothing | top | short upper body clothing(1), long(2) |
|
||||
| wearing boots | boots | no(1), yes(2) |
|
||||
| wearing hat | hat | no(1), yes(2) |
|
||||
| carrying backpack | backpack | no(1), yes(2) |
|
||||
| carrying bag | bag | no(1), yes(2) |
|
||||
| carrying handbag | handbag | no(1), yes(2) |
|
||||
| color of shoes | shoes | dark(1), light(2) |
|
||||
| 8 color of upper-body clothing | upblack, upwhite, upred, uppurple, upgray, upblue, upgreen, upbrown | no(1), yes(2) |
|
||||
| 7 color of lower-body clothing | downblack, downwhite, downred, downgray, downblue, downgreen, downbrown | no(1), yes(2) |
|
||||
|
||||
Note that the though there are 7 and 8 attributes for lower-body clothing and upper-body clothing, only one color is labeled as yes (2) for an identity.
|
||||
@@ -0,0 +1,21 @@
|
||||
The 27 attributes are:
|
||||
|
||||
| attribute | representation in file | label |
|
||||
| :----------------------------: | :--------------------: | :-----------------------------------------: |
|
||||
| gender | gender | male(1), female(2) |
|
||||
| hair length | hair | short hair(1), long hair(2) |
|
||||
| sleeve length | up | long sleeve(1), short sleeve(2) |
|
||||
| length of lower-body clothing | down | long lower body clothing(1), short(2) |
|
||||
| type of lower-body clothing | clothes | dress(1), pants(2) |
|
||||
| wearing hat | hat | no(1), yes(2) |
|
||||
| carrying backpack | backpack | no(1), yes(2) |
|
||||
| carrying bag | bag | no(1), yes(2) |
|
||||
| carrying handbag | handbag | no(1), yes(2) |
|
||||
| age | age | young(1), teenager(2), adult(3), old(4) |
|
||||
|
||||
|
||||
| 8 color of upper-body clothing | upblack, upwhite, upred, uppurple, upyellow, upgray, upblue, upgreen | no(1), yes(2) |
|
||||
| 9 color of lower-body clothing | downblack, downwhite, downpink, downpurple, downyellow, downgray, downblue, downgreen,downbrown | no(1), yes(2) |
|
||||
|
||||
Note that the though there are 8 and 9 attributes for upper-body clothing and lower-body clothing, only one color is labeled as yes (2) for an identity.
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
{
|
||||
"duke": {
|
||||
"bag": [
|
||||
"carrying bag",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"upred": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"red"
|
||||
]
|
||||
],
|
||||
"upblue": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"blue"
|
||||
]
|
||||
],
|
||||
"hat": [
|
||||
"wearing hat",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"shoes": [
|
||||
"color of shoes",
|
||||
[
|
||||
"dark",
|
||||
"light"
|
||||
]
|
||||
],
|
||||
"downgreen": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"green"
|
||||
]
|
||||
],
|
||||
"downbrown": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"brown"
|
||||
]
|
||||
],
|
||||
"downred": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"red"
|
||||
]
|
||||
],
|
||||
"upgreen": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"green"
|
||||
]
|
||||
],
|
||||
"handbag": [
|
||||
"carrying handbag",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"downblue": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"blue"
|
||||
]
|
||||
],
|
||||
"downblack": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"black"
|
||||
]
|
||||
],
|
||||
"backpack": [
|
||||
"carrying backpack",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"downwhite": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"white"
|
||||
]
|
||||
],
|
||||
"upblack": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"black"
|
||||
]
|
||||
],
|
||||
"gender": [
|
||||
"gender",
|
||||
[
|
||||
"male",
|
||||
"female"
|
||||
]
|
||||
],
|
||||
"downgray": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"gray"
|
||||
]
|
||||
],
|
||||
"boots": [
|
||||
"wearing boots",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"uppurple": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"purple"
|
||||
]
|
||||
],
|
||||
"top": [
|
||||
"length of upper-body clothing",
|
||||
[
|
||||
"short upper body clothing",
|
||||
"long"
|
||||
]
|
||||
],
|
||||
"upbrown": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"brown"
|
||||
]
|
||||
],
|
||||
"upgray": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"gray"
|
||||
]
|
||||
],
|
||||
"upwhite": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"white"
|
||||
]
|
||||
]
|
||||
},
|
||||
"market": {
|
||||
"bag": [
|
||||
"carrying bag",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"upred": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"red"
|
||||
]
|
||||
],
|
||||
"upblue": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"blue"
|
||||
]
|
||||
],
|
||||
"hat": [
|
||||
"wearing hat",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"downgreen": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"green"
|
||||
]
|
||||
],
|
||||
"downbrown": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"brown"
|
||||
]
|
||||
],
|
||||
"upyellow": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"yellow"
|
||||
]
|
||||
],
|
||||
"up": [
|
||||
"sleeve length",
|
||||
[
|
||||
"long sleeve",
|
||||
"short sleeve"
|
||||
]
|
||||
],
|
||||
"upgreen": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"green"
|
||||
]
|
||||
],
|
||||
"handbag": [
|
||||
"carrying handbag",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"downgray": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"gray"
|
||||
]
|
||||
],
|
||||
"clothes": [
|
||||
"type of lower-body clothing",
|
||||
[
|
||||
"dress",
|
||||
"pants"
|
||||
]
|
||||
],
|
||||
"adult": [
|
||||
"age",
|
||||
[
|
||||
null,
|
||||
"adult"
|
||||
]
|
||||
],
|
||||
"downblack": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"black"
|
||||
]
|
||||
],
|
||||
"backpack": [
|
||||
"carrying backpack",
|
||||
[
|
||||
"no",
|
||||
"yes"
|
||||
]
|
||||
],
|
||||
"downwhite": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"white"
|
||||
]
|
||||
],
|
||||
"upblack": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"black"
|
||||
]
|
||||
],
|
||||
"gender": [
|
||||
"gender",
|
||||
[
|
||||
"male",
|
||||
"female"
|
||||
]
|
||||
],
|
||||
"downyellow": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"yellow"
|
||||
]
|
||||
],
|
||||
"downpink": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"pink"
|
||||
]
|
||||
],
|
||||
"old": [
|
||||
"age",
|
||||
[
|
||||
null,
|
||||
"old"
|
||||
]
|
||||
],
|
||||
"down": [
|
||||
"length of lower-body clothing",
|
||||
[
|
||||
"long lower body clothing",
|
||||
"short"
|
||||
]
|
||||
],
|
||||
"uppurple": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"purple"
|
||||
]
|
||||
],
|
||||
"downpurple": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"purple"
|
||||
]
|
||||
],
|
||||
"young": [
|
||||
"age",
|
||||
[
|
||||
null,
|
||||
"young"
|
||||
]
|
||||
],
|
||||
"teenager": [
|
||||
"age",
|
||||
[
|
||||
null,
|
||||
"teenager"
|
||||
]
|
||||
],
|
||||
"hair": [
|
||||
"hair length",
|
||||
[
|
||||
"short hair",
|
||||
"long hair"
|
||||
]
|
||||
],
|
||||
"downblue": [
|
||||
"color of lower-body clothing",
|
||||
[
|
||||
null,
|
||||
"blue"
|
||||
]
|
||||
],
|
||||
"upgray": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"gray"
|
||||
]
|
||||
],
|
||||
"upwhite": [
|
||||
"color of upper-body clothing",
|
||||
[
|
||||
null,
|
||||
"white"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"duke": [
|
||||
"backpack",
|
||||
"bag",
|
||||
"handbag",
|
||||
"boots",
|
||||
"gender",
|
||||
"hat",
|
||||
"shoes",
|
||||
"top",
|
||||
"upblack",
|
||||
"upwhite",
|
||||
"upred",
|
||||
"uppurple",
|
||||
"upgray",
|
||||
"upblue",
|
||||
"upgreen",
|
||||
"upbrown",
|
||||
"downblack",
|
||||
"downwhite",
|
||||
"downred",
|
||||
"downgray",
|
||||
"downblue",
|
||||
"downgreen",
|
||||
"downbrown"
|
||||
],
|
||||
"market": [
|
||||
"young",
|
||||
"teenager",
|
||||
"adult",
|
||||
"old",
|
||||
"backpack",
|
||||
"bag",
|
||||
"handbag",
|
||||
"clothes",
|
||||
"down",
|
||||
"up",
|
||||
"hair",
|
||||
"hat",
|
||||
"gender",
|
||||
"upblack",
|
||||
"upwhite",
|
||||
"upred",
|
||||
"uppurple",
|
||||
"upyellow",
|
||||
"upgray",
|
||||
"upblue",
|
||||
"upgreen",
|
||||
"downblack",
|
||||
"downwhite",
|
||||
"downpink",
|
||||
"downpurple",
|
||||
"downyellow",
|
||||
"downgray",
|
||||
"downblue",
|
||||
"downgreen",
|
||||
"downbrown"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
import json
|
||||
|
||||
|
||||
market_label_list = [
|
||||
"young",
|
||||
"teenager",
|
||||
"adult",
|
||||
"old",
|
||||
"backpack",
|
||||
"bag",
|
||||
"handbag",
|
||||
"clothes",
|
||||
"down",
|
||||
"up",
|
||||
"hair",
|
||||
"hat",
|
||||
"gender",
|
||||
"upblack",
|
||||
"upwhite",
|
||||
"upred",
|
||||
"uppurple",
|
||||
"upyellow",
|
||||
"upgray",
|
||||
"upblue",
|
||||
"upgreen",
|
||||
"downblack",
|
||||
"downwhite",
|
||||
"downpink",
|
||||
"downpurple",
|
||||
"downyellow",
|
||||
"downgray",
|
||||
"downblue",
|
||||
"downgreen",
|
||||
"downbrown"
|
||||
]
|
||||
|
||||
|
||||
duke_label_list = [
|
||||
"backpack",
|
||||
"bag",
|
||||
"handbag",
|
||||
"boots",
|
||||
"gender",
|
||||
"hat",
|
||||
"shoes",
|
||||
"top",
|
||||
"upblack",
|
||||
"upwhite",
|
||||
"upred",
|
||||
"uppurple",
|
||||
"upgray",
|
||||
"upblue",
|
||||
"upgreen",
|
||||
"upbrown",
|
||||
"downblack",
|
||||
"downwhite",
|
||||
"downred",
|
||||
"downgray",
|
||||
"downblue",
|
||||
"downgreen",
|
||||
"downbrown"
|
||||
]
|
||||
|
||||
|
||||
market_attribute_dict = {
|
||||
"young": ["age", [None, "young"]],
|
||||
"teenager": ["age", [None, "teenager"]],
|
||||
"adult": ["age", [None, "adult"]],
|
||||
"old": ["age", [None, "old"]],
|
||||
"backpack": ["carrying backpack", ["no", "yes"]],
|
||||
"bag": ["carrying bag", ["no", "yes"]],
|
||||
"handbag": ["carrying handbag", ["no", "yes"]],
|
||||
"clothes": ["type of lower-body clothing", ["dress", "pants"]],
|
||||
"down": ["length of lower-body clothing", ["long lower body clothing", "short"]],
|
||||
"up": ["sleeve length", ["long sleeve", "short sleeve"]],
|
||||
"hair": ["hair length", ["short hair", "long hair"]],
|
||||
"hat": ["wearing hat", ["no", "yes"]],
|
||||
"gender": ["gender", ["male", "female"]],
|
||||
"upblack": ["color of upper-body clothing", [None, "black"]],
|
||||
"upwhite": ["color of upper-body clothing", [None, "white"]],
|
||||
"upred": ["color of upper-body clothing", [None, "red"]],
|
||||
"uppurple": ["color of upper-body clothing", [None, "purple"]],
|
||||
"upyellow": ["color of upper-body clothing", [None, "yellow"]],
|
||||
"upgray": ["color of upper-body clothing", [None, "gray"]],
|
||||
"upblue": ["color of upper-body clothing", [None, "blue"]],
|
||||
"upgreen": ["color of upper-body clothing", [None, "green"]],
|
||||
"downblack": ["color of lower-body clothing", [None, "black"]],
|
||||
"downwhite": ["color of lower-body clothing", [None, "white"]],
|
||||
"downpink": ["color of lower-body clothing", [None, "pink"]],
|
||||
"downpurple": ["color of lower-body clothing", [None, "purple"]],
|
||||
"downyellow": ["color of lower-body clothing", [None, "yellow"]],
|
||||
"downgray": ["color of lower-body clothing", [None, "gray"]],
|
||||
"downblue": ["color of lower-body clothing", [None, "blue"]],
|
||||
"downgreen": ["color of lower-body clothing", [None, "green"]],
|
||||
"downbrown": ["color of lower-body clothing", [None, "brown"]],
|
||||
}
|
||||
|
||||
|
||||
duke_attribute_dict = {
|
||||
"backpack": ["carrying backpack", ["no", "yes"]],
|
||||
"bag": ["carrying bag", ["no", "yes"]],
|
||||
"handbag": ["carrying handbag", ["no", "yes"]],
|
||||
"boots": ["wearing boots", ["no", "yes"]],
|
||||
"gender": ["gender", ["male", "female"]],
|
||||
"hat": ["wearing hat", ["no", "yes"]],
|
||||
"shoes": ["color of shoes", ["dark", "light"]],
|
||||
"top": ["length of upper-body clothing", ["short upper body clothing", "long"]],
|
||||
"upblack": ["color of upper-body clothing", [None, "black"]],
|
||||
"upwhite": ["color of upper-body clothing", [None, "white"]],
|
||||
"upred": ["color of upper-body clothing", [None, "red"]],
|
||||
"uppurple": ["color of upper-body clothing", [None, "purple"]],
|
||||
"upgray": ["color of upper-body clothing", [None, "gray"]],
|
||||
"upblue": ["color of upper-body clothing", [None, "blue"]],
|
||||
"upgreen": ["color of upper-body clothing", [None, "green"]],
|
||||
"upbrown": ["color of upper-body clothing", [None, "brown"]],
|
||||
"downblack": ["color of lower-body clothing", [None, "black"]],
|
||||
"downwhite": ["color of lower-body clothing", [None, "white"]],
|
||||
"downred": ["color of lower-body clothing", [None, "red"]],
|
||||
"downgray": ["color of lower-body clothing", [None, "gray"]],
|
||||
"downblue": ["color of lower-body clothing", [None, "blue"]],
|
||||
"downgreen": ["color of lower-body clothing", [None, "green"]],
|
||||
"downbrown": ["color of lower-body clothing", [None, "brown"]],
|
||||
}
|
||||
|
||||
|
||||
with open('./label.json', 'w') as f:
|
||||
label_list_dict = {
|
||||
'market': market_label_list,
|
||||
'duke': duke_label_list,
|
||||
}
|
||||
jsObj = json.dumps(label_list_dict, indent=4)
|
||||
f.write(jsObj)
|
||||
|
||||
|
||||
with open('./attribute.json', 'w') as f:
|
||||
attribute_list_dict = {
|
||||
'market': market_attribute_dict,
|
||||
'duke': duke_attribute_dict,
|
||||
}
|
||||
jsObj = json.dumps(attribute_list_dict, indent=4)
|
||||
f.write(jsObj)
|
||||
Reference in New Issue
Block a user