in utils/build_annotation.py [0:0]
def build_annotation(base_dir):
""" sample function to build the annotation wrapper: customize accordingly
Note: We provide starter annotation file in 'vocab/'
"""
annotation = Annotation()
categories = {"patty26":2304,
"patty27":934,
"patty28":712,
"patty30":2063,
"patty31":1410,
"catch36":1656,
"catch37":2128,
"catch39":3530,
"catch40":1360,
"catch41":1698,
"catch42":2258,
"convo43":3010,
"convo46":3610,
"convo47":3980}
for cat in categories:
count = 0
count = categories[cat]
while (count - 512) > 0:
annotation.anns.append((cat, count))
count -= 32
annotation.anns.append((cat, 513))
return annotation