cvhciKIT / sloth

Sloth is a tool for labeling image and video data for computer vision research.
Other
610 stars 198 forks source link

New style configuration #24

Closed mika-fischer closed 13 years ago

mika-fischer commented 13 years ago
LABELS = (
        {
            'attributes': {
                'class':     'Face',
                'quality':   QUALITY_VALUES,
                'pan':       float,
                'gender':    GENDER_VALUES,
                'ethnicity': ETHNICITY_VALUES,
                'age':       [10, 20, float],
                'id':        ID_VALUES + ['*', '+'],
                'score':     '-1',
            },
            'item':     VidemoFaceBoundingBox,
            'inserter': 'sloth.items.PointItemInserter',
            'hotkey':   'r',
        },
        {
            'attributes': {
                'class':   'Facial Feature',
                'feature': FEATURE_TYPES,
            },
            'inserter': 'sloth.items.PointItemInserter',
            'item':     VidemoFacialFeature,
            'hotkey':   'f',
        },
        {
            'attributes': {
                'class': 'Gender',
                'type':  'tag',
                'value': GENDER_VALUES,
            },
            'item':     'sloth.items.TagItem',
            'inserter': 'sloth.items.TagItemInserter',
        }
)

Maybe use choices to directly specify hotkeys, e.g."'gender': [ 'male [m]', 'female [f]' ]?

Ja, das hatte ich mir auch schon überlegt, allerdings würde ich das mit tuplen machen:

'gender': [ ('male', 'm'), ('female', 'f'), 'unlabeled' ]

Wenns kein tuple ist, dann hat der Eintrag einfach keinen Hotkey.

mika-fischer commented 13 years ago
mika-fischer commented 13 years ago

Almost working. The only thing missing are the hotkeys for specific values...