File size: 2,797 Bytes
d7a991a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright (c) OpenMMLab. All rights reserved.
from mmpose.datasets import DatasetInfo


def test_dataset_info():
    dataset_info = dict(
        dataset_name='zebra',
        paper_info=dict(
            author='Graving, Jacob M and Chae, Daniel and Naik, Hemal and '
            'Li, Liang and Koger, Benjamin and Costelloe, Blair R and '
            'Couzin, Iain D',
            title='DeepPoseKit, a software toolkit for fast and robust '
            'animal pose estimation using deep learning',
            container='Elife',
            year='2019',
            homepage='https://github.com/jgraving/DeepPoseKit-Data',
        ),
        keypoint_info={
            0:
            dict(name='snout', id=0, color=[255, 255, 255], type='', swap=''),
            1:
            dict(name='head', id=1, color=[255, 255, 255], type='', swap=''),
            2:
            dict(name='neck', id=2, color=[255, 255, 255], type='', swap=''),
            3:
            dict(
                name='forelegL1',
                id=3,
                color=[255, 255, 255],
                type='',
                swap='forelegR1'),
            4:
            dict(
                name='forelegR1',
                id=4,
                color=[255, 255, 255],
                type='',
                swap='forelegL1'),
            5:
            dict(
                name='hindlegL1',
                id=5,
                color=[255, 255, 255],
                type='',
                swap='hindlegR1'),
            6:
            dict(
                name='hindlegR1',
                id=6,
                color=[255, 255, 255],
                type='',
                swap='hindlegL1'),
            7:
            dict(
                name='tailbase', id=7, color=[255, 255, 255], type='',
                swap=''),
            8:
            dict(
                name='tailtip', id=8, color=[255, 255, 255], type='', swap='')
        },
        skeleton_info={
            0: dict(link=('head', 'snout'), id=0, color=[255, 255, 255]),
            1: dict(link=('neck', 'head'), id=1, color=[255, 255, 255]),
            2: dict(link=('forelegL1', 'neck'), id=2, color=[255, 255, 255]),
            3: dict(link=('forelegR1', 'neck'), id=3, color=[255, 255, 255]),
            4:
            dict(link=('hindlegL1', 'tailbase'), id=4, color=[255, 255, 255]),
            5:
            dict(link=('hindlegR1', 'tailbase'), id=5, color=[255, 255, 255]),
            6: dict(link=('tailbase', 'neck'), id=6, color=[255, 255, 255]),
            7: dict(link=('tailtip', 'tailbase'), id=7, color=[255, 255, 255])
        },
        joint_weights=[1.] * 9,
        sigmas=[])

    dataset_info = DatasetInfo(dataset_info)
    assert dataset_info.keypoint_num == len(dataset_info.flip_index)