thompsonmj commited on
Commit
085aaa4
1 Parent(s): 714c813

Logically archive and split data

Browse files
Files changed (50) hide show
  1. KABR/README.txt +55 -0
  2. KABR/annotation/classes.json +1 -0
  3. KABR/annotation/distribution.xlsx +0 -0
  4. KABR_part_ad → KABR/annotation/train.csv +2 -2
  5. KABR_part_aa → KABR/annotation/val.csv +2 -2
  6. KABR/configs/I3D.yaml +99 -0
  7. KABR/configs/SLOWFAST.yaml +108 -0
  8. KABR/configs/X3D.yaml +98 -0
  9. KABR/dataset/image/giraffes_md5.txt +1 -0
  10. KABR_part_ab → KABR/dataset/image/giraffes_part_aa +2 -2
  11. KABR_part_ac → KABR/dataset/image/giraffes_part_ab +2 -2
  12. KABR/dataset/image/giraffes_part_ac +3 -0
  13. KABR/dataset/image/giraffes_part_ad +3 -0
  14. KABR/dataset/image/zebras_grevys_md5.txt +1 -0
  15. KABR/dataset/image/zebras_grevys_part_aa +3 -0
  16. KABR/dataset/image/zebras_grevys_part_ab +3 -0
  17. KABR/dataset/image/zebras_grevys_part_ac +3 -0
  18. KABR/dataset/image/zebras_grevys_part_ad +3 -0
  19. KABR/dataset/image/zebras_grevys_part_ae +3 -0
  20. KABR/dataset/image/zebras_grevys_part_af +3 -0
  21. KABR/dataset/image/zebras_grevys_part_ag +3 -0
  22. KABR/dataset/image/zebras_grevys_part_ah +3 -0
  23. KABR/dataset/image/zebras_grevys_part_ai +3 -0
  24. KABR/dataset/image/zebras_grevys_part_aj +3 -0
  25. KABR/dataset/image/zebras_grevys_part_ak +3 -0
  26. KABR/dataset/image/zebras_grevys_part_al +3 -0
  27. KABR/dataset/image/zebras_grevys_part_am +3 -0
  28. KABR/dataset/image/zebras_plains_md5.txt +1 -0
  29. KABR/dataset/image/zebras_plains_part_aa +3 -0
  30. KABR/dataset/image/zebras_plains_part_ab +3 -0
  31. KABR/dataset/image/zebras_plains_part_ac +3 -0
  32. KABR/dataset/image/zebras_plains_part_ad +3 -0
  33. KABR/dataset/image/zebras_plains_part_ae +3 -0
  34. KABR/dataset/image/zebras_plains_part_af +3 -0
  35. KABR/dataset/image/zebras_plains_part_ag +3 -0
  36. KABR/dataset/image/zebras_plains_part_ah +3 -0
  37. KABR/dataset/image/zebras_plains_part_ai +3 -0
  38. KABR/dataset/image/zebras_plains_part_aj +3 -0
  39. KABR/dataset/image/zebras_plains_part_ak +3 -0
  40. KABR/dataset/image/zebras_plains_part_al +3 -0
  41. KABR/dataset/image2video.py +67 -0
  42. KABR/dataset/image2visual.py +67 -0
  43. KABR_MD5.txt +0 -1
  44. KABR_part_ae +0 -3
  45. KABR_part_af +0 -3
  46. KABR_part_ag +0 -3
  47. KABR_part_ah +0 -3
  48. KABR_part_ai +0 -3
  49. KABR_part_aj +0 -3
  50. KABR_part_ak +0 -3
KABR/README.txt ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ KABR: High-Quality Dataset for Kenyan Animal Behavior Recognition from Drone Videos
2
+
3
+ ---------------------------------------------------------------------------------------------------
4
+
5
+ We present a novel high-quality dataset for animal behavior recognition from drone videos. The dataset is focused on Kenyan wildlife and contains behaviors of giraffes, plains zebras, and Grevy's zebras. The dataset consists of more than 10 hours of annotated videos, and it includes eight different classes, encompassing seven types of animal behavior and an additional category for occluded instances. In the annotation process for this dataset, a team of 10 people was involved, with an expert zoologist overseeing the process. Each behavior was labeled based on its distinctive features, using a standardized set of criteria to ensure consistency and accuracy across the annotations. The dataset was collected using drones that flew over the animals in the Mpala Research Centre in Kenya, providing high-quality video footage of the animal's natural behaviors. We believe that this dataset will be a valuable resource for researchers working on animal behavior recognition, as it provides a diverse and high-quality set of annotated videos that can be used for evaluating deep learning models. Additionally, the dataset can be used to study the behavior patterns of Kenyan animals and can help to inform conservation efforts and wildlife management strategies. We provide a detailed description of the dataset and its annotation process, along with some initial experiments on the dataset using conventional deep learning models. The results demonstrate the effectiveness of the dataset for animal behavior recognition and highlight the potential for further research in this area.
6
+
7
+ ---------------------------------------------------------------------------------------------------
8
+
9
+ The KABR dataset follows the Charades format. The Charades format:
10
+
11
+ KABR
12
+ /images
13
+ /video_1
14
+ /image_1.jpg
15
+ /image_2.jpg
16
+ ...
17
+ /image_n.jpg
18
+ /video_2
19
+ /image_1.jpg
20
+ /image_2.jpg
21
+ ...
22
+ /image_n.jpg
23
+ ...
24
+ /video_n
25
+ /image_1.jpg
26
+ /image_2.jpg
27
+ /image_3.jpg
28
+ ...
29
+ /image_n.jpg
30
+ /annotation
31
+ /classes.json
32
+ /train.csv
33
+ /val.csv
34
+
35
+ The dataset can be directly loaded and processed by the SlowFast (https://github.com/facebookresearch/SlowFast) framework.
36
+
37
+ ---------------------------------------------------------------------------------------------------
38
+
39
+ Naming:
40
+ G0XXX.X - Giraffes
41
+ ZP0XXX.X - Plains Zebras
42
+ ZG0XXX.X - Grevy's Zebras
43
+
44
+ ---------------------------------------------------------------------------------------------------
45
+
46
+ Information:
47
+
48
+ KABR/configs: examples of SlowFast framework configs.
49
+ KABR/annotation/distribution.xlsx: distribution of classes for all videos.
50
+
51
+ ---------------------------------------------------------------------------------------------------
52
+
53
+ Scripts:
54
+ image2video.py: Encode image sequences into the original video. For example, [image/G0067.1, image/G0067.2, ..., image/G0067.24] will be encoded into video/G0067.mp4.
55
+ image2visual.py: Encode image sequences into the original video with corresponding annotations. For example, [image/G0067.1, image/G0067.2, ..., image/G0067.24] will be encoded into visual/G0067.mp4.
KABR/annotation/classes.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Walk": 0, "Graze": 1, "Browse": 2, "Head Up": 3, "Auto-Groom": 4, "Trot": 5, "Run": 6, "Occluded": 7}
KABR/annotation/distribution.xlsx ADDED
Binary file (5.62 kB). View file
 
KABR_part_ad → KABR/annotation/train.csv RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5fed7fe6d4fe3e5a82ef601b0706271045bc860e294aa8b2e73826d2851b72fb
3
- size 5368709120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fded23bb35b4bbef7d1d2f606a73afd8996957eea4ffe542b79c6cdcc7eee78
3
+ size 30325892
KABR_part_aa → KABR/annotation/val.csv RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3387a530344f859c76f8feac03630c9648d3e5fefc6dc1268db7a3113a2397a0
3
- size 5368709120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b663c75fa0f2ecadc01798623da56f040050420c3b5db71cc2444319db32df73
3
+ size 10652837
KABR/configs/I3D.yaml ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ TRAIN:
2
+ ENABLE: True
3
+ DATASET: charades
4
+ BATCH_SIZE: 8
5
+ EVAL_PERIOD: 5
6
+ CHECKPOINT_PERIOD: 5
7
+ AUTO_RESUME: True
8
+ # CHECKPOINT_FILE_PATH:
9
+ CHECKPOINT_TYPE: pytorch
10
+ CHECKPOINT_INFLATE: False
11
+ MIXED_PRECISION: True
12
+
13
+ TEST:
14
+ ENABLE: True
15
+ DATASET: charades
16
+ BATCH_SIZE: 8
17
+ NUM_ENSEMBLE_VIEWS: 2
18
+ NUM_SPATIAL_CROPS: 1
19
+ # CHECKPOINT_FILE_PATH:
20
+ CHECKPOINT_TYPE: pytorch
21
+
22
+ DATA:
23
+ NUM_FRAMES: 16
24
+ SAMPLING_RATE: 5
25
+ TRAIN_JITTER_SCALES: [320, 320]
26
+ TRAIN_CROP_SIZE: 320
27
+ TEST_CROP_SIZE: 320
28
+ TRAIN_CROP_NUM_TEMPORAL: 1
29
+ INPUT_CHANNEL_NUM: [3]
30
+ MULTI_LABEL: False
31
+ RANDOM_FLIP: True
32
+ SSL_COLOR_JITTER: True
33
+ SSL_COLOR_BRI_CON_SAT: [0.2, 0.2, 0.2]
34
+ INV_UNIFORM_SAMPLE: True
35
+ ENSEMBLE_METHOD: max
36
+ REVERSE_INPUT_CHANNEL: True
37
+ PATH_TO_DATA_DIR: "./KABR/annotation"
38
+ PATH_PREFIX: "./KABR/dataset/image"
39
+ DECODING_BACKEND: torchvision
40
+
41
+ RESNET:
42
+ ZERO_INIT_FINAL_BN: True
43
+ WIDTH_PER_GROUP: 64
44
+ NUM_GROUPS: 1
45
+ DEPTH: 50
46
+ TRANS_FUNC: bottleneck_transform
47
+ STRIDE_1X1: False
48
+ NUM_BLOCK_TEMP_KERNEL: [[3], [4], [6], [3]]
49
+
50
+ NONLOCAL:
51
+ LOCATION: [[[]], [[]], [[]], [[]]]
52
+ GROUP: [[1], [1], [1], [1]]
53
+ INSTANTIATION: softmax
54
+
55
+ BN:
56
+ USE_PRECISE_STATS: True
57
+ NUM_BATCHES_PRECISE: 100
58
+ NORM_TYPE: sync_batchnorm
59
+ NUM_SYNC_DEVICES: 1
60
+
61
+ SOLVER:
62
+ BASE_LR: 0.1
63
+ LR_POLICY: cosine
64
+ MAX_EPOCH: 120
65
+ MOMENTUM: 0.9
66
+ WEIGHT_DECAY: 1e-4
67
+ WARMUP_EPOCHS: 34.0
68
+ WARMUP_START_LR: 0.01
69
+ OPTIMIZING_METHOD: sgd
70
+
71
+ MODEL:
72
+ NUM_CLASSES: 8
73
+ ARCH: i3d
74
+ MODEL_NAME: ResNet
75
+ LOSS_FUNC: cross_entropy
76
+ DROPOUT_RATE: 0.5
77
+
78
+ DATA_LOADER:
79
+ NUM_WORKERS: 8
80
+ PIN_MEMORY: True
81
+
82
+ NUM_GPUS: 1
83
+ NUM_SHARDS: 1
84
+ RNG_SEED: 0
85
+ OUTPUT_DIR: ./logs/i3d-kabr
86
+ LOG_MODEL_INFO: True
87
+
88
+ TENSORBOARD:
89
+ ENABLE: False
90
+
91
+ DEMO:
92
+ ENABLE: True
93
+ LABEL_FILE_PATH: ./KABR/annotation/classes.json
94
+ # INPUT_VIDEO: # path to input
95
+ # OUTPUT_FILE: # path to output
96
+ THREAD_ENABLE: False
97
+ THREAD_ENABLE: False
98
+ NUM_VIS_INSTANCES: 1
99
+ NUM_CLIPS_SKIP: 1
KABR/configs/SLOWFAST.yaml ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ TRAIN:
2
+ ENABLE: True
3
+ DATASET: charades
4
+ BATCH_SIZE: 8
5
+ EVAL_PERIOD: 5
6
+ CHECKPOINT_PERIOD: 5
7
+ AUTO_RESUME: True
8
+ # CHECKPOINT_FILE_PATH:
9
+ CHECKPOINT_TYPE: pytorch
10
+ CHECKPOINT_INFLATE: False
11
+ MIXED_PRECISION: True
12
+
13
+ TEST:
14
+ ENABLE: True
15
+ DATASET: charades
16
+ BATCH_SIZE: 8
17
+ NUM_ENSEMBLE_VIEWS: 2
18
+ NUM_SPATIAL_CROPS: 1
19
+ # CHECKPOINT_FILE_PATH:
20
+ CHECKPOINT_TYPE: pytorch
21
+
22
+ DATA:
23
+ NUM_FRAMES: 16
24
+ SAMPLING_RATE: 5
25
+ TRAIN_JITTER_SCALES: [256, 256]
26
+ TRAIN_CROP_SIZE: 256
27
+ TEST_CROP_SIZE: 256
28
+ TRAIN_CROP_NUM_TEMPORAL: 1
29
+ INPUT_CHANNEL_NUM: [3, 3]
30
+ MULTI_LABEL: False
31
+ RANDOM_FLIP: True
32
+ SSL_COLOR_JITTER: True
33
+ SSL_COLOR_BRI_CON_SAT: [0.2, 0.2, 0.2]
34
+ INV_UNIFORM_SAMPLE: True
35
+ ENSEMBLE_METHOD: max
36
+ REVERSE_INPUT_CHANNEL: True
37
+ PATH_TO_DATA_DIR: "./KABR/annotation"
38
+ PATH_PREFIX: "./KABR/dataset/image"
39
+ DECODING_BACKEND: torchvision
40
+
41
+ SLOWFAST:
42
+ ALPHA: 4
43
+ BETA_INV: 8
44
+ FUSION_CONV_CHANNEL_RATIO: 2
45
+ FUSION_KERNEL_SZ: 7
46
+
47
+ RESNET:
48
+ ZERO_INIT_FINAL_BN: True
49
+ WIDTH_PER_GROUP: 64
50
+ NUM_GROUPS: 1
51
+ DEPTH: 50
52
+ TRANS_FUNC: bottleneck_transform
53
+ STRIDE_1X1: False
54
+ NUM_BLOCK_TEMP_KERNEL: [[3, 3], [4, 4], [6, 6], [3, 3]]
55
+ SPATIAL_STRIDES: [[1, 1], [2, 2], [2, 2], [2, 2]]
56
+ SPATIAL_DILATIONS: [[1, 1], [1, 1], [1, 1], [1, 1]]
57
+
58
+ NONLOCAL:
59
+ LOCATION: [[[], []], [[], []], [[], []], [[], []]]
60
+ GROUP: [[1, 1], [1, 1], [1, 1], [1, 1]]
61
+ INSTANTIATION: dot_product
62
+
63
+ BN:
64
+ USE_PRECISE_STATS: True
65
+ NUM_BATCHES_PRECISE: 200
66
+ NORM_TYPE: sync_batchnorm
67
+ NUM_SYNC_DEVICES: 1
68
+
69
+ SOLVER:
70
+ BASE_LR: 0.0375
71
+ LR_POLICY: steps_with_relative_lrs
72
+ LRS: [1, 0.1, 0.01, 0.001, 0.0001, 0.00001]
73
+ STEPS: [0, 41, 49]
74
+ MAX_EPOCH: 80
75
+ MOMENTUM: 0.9
76
+ WEIGHT_DECAY: 1e-4
77
+ WARMUP_EPOCHS: 3.0
78
+ WARMUP_START_LR: 0.0001
79
+ OPTIMIZING_METHOD: sgd
80
+
81
+ MODEL:
82
+ NUM_CLASSES: 8
83
+ ARCH: slowfast
84
+ LOSS_FUNC: cross_entropy
85
+ DROPOUT_RATE: 0.5
86
+
87
+ DATA_LOADER:
88
+ NUM_WORKERS: 8
89
+ PIN_MEMORY: True
90
+
91
+ NUM_GPUS: 1
92
+ NUM_SHARDS: 1
93
+ RNG_SEED: 0
94
+ OUTPUT_DIR: ./logs/slowfast-kabr
95
+ LOG_MODEL_INFO: True
96
+
97
+ TENSORBOARD:
98
+ ENABLE: False
99
+
100
+ DEMO:
101
+ ENABLE: True
102
+ LABEL_FILE_PATH: ./KABR/annotation/classes.json
103
+ # INPUT_VIDEO: # path to input
104
+ # OUTPUT_FILE: # path to output
105
+ THREAD_ENABLE: False
106
+ THREAD_ENABLE: False
107
+ NUM_VIS_INSTANCES: 1
108
+ NUM_CLIPS_SKIP: 1
KABR/configs/X3D.yaml ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ TRAIN:
2
+ ENABLE: True
3
+ DATASET: charades
4
+ BATCH_SIZE: 8
5
+ EVAL_PERIOD: 5
6
+ CHECKPOINT_PERIOD: 5
7
+ AUTO_RESUME: True
8
+ # CHECKPOINT_FILE_PATH:
9
+ CHECKPOINT_TYPE: pytorch
10
+ CHECKPOINT_INFLATE: False
11
+ MIXED_PRECISION: True
12
+
13
+ TEST:
14
+ ENABLE: True
15
+ DATASET: charades
16
+ BATCH_SIZE: 8
17
+ NUM_ENSEMBLE_VIEWS: 2
18
+ NUM_SPATIAL_CROPS: 1
19
+ # CHECKPOINT_FILE_PATH:
20
+ CHECKPOINT_TYPE: pytorch
21
+
22
+ DATA:
23
+ NUM_FRAMES: 16
24
+ SAMPLING_RATE: 5
25
+ TRAIN_JITTER_SCALES: [300, 300]
26
+ TRAIN_CROP_SIZE: 300
27
+ TEST_CROP_SIZE: 300
28
+ TRAIN_CROP_NUM_TEMPORAL: 1
29
+ INPUT_CHANNEL_NUM: [3]
30
+ MULTI_LABEL: False
31
+ RANDOM_FLIP: True
32
+ SSL_COLOR_JITTER: True
33
+ SSL_COLOR_BRI_CON_SAT: [0.2, 0.2, 0.2]
34
+ INV_UNIFORM_SAMPLE: True
35
+ ENSEMBLE_METHOD: max
36
+ REVERSE_INPUT_CHANNEL: True
37
+ PATH_TO_DATA_DIR: "./KABR/annotation"
38
+ PATH_PREFIX: "./KABR/dataset/image"
39
+ DECODING_BACKEND: torchvision
40
+
41
+ X3D:
42
+ WIDTH_FACTOR: 2.0
43
+ DEPTH_FACTOR: 5.0
44
+ BOTTLENECK_FACTOR: 2.25
45
+ DIM_C5: 2048
46
+ DIM_C1: 12
47
+
48
+ RESNET:
49
+ ZERO_INIT_FINAL_BN: True
50
+ TRANS_FUNC: x3d_transform
51
+ STRIDE_1X1: False
52
+
53
+ BN:
54
+ USE_PRECISE_STATS: True
55
+ NUM_BATCHES_PRECISE: 200
56
+ NORM_TYPE: sync_batchnorm
57
+ NUM_SYNC_DEVICES: 1
58
+ WEIGHT_DECAY: 0.0
59
+
60
+ SOLVER:
61
+ BASE_LR: 0.05
62
+ BASE_LR_SCALE_NUM_SHARDS: True
63
+ MAX_EPOCH: 120
64
+ LR_POLICY: cosine
65
+ WEIGHT_DECAY: 5e-5
66
+ WARMUP_EPOCHS: 35.0
67
+ WARMUP_START_LR: 0.01
68
+ OPTIMIZING_METHOD: sgd
69
+
70
+ MODEL:
71
+ NUM_CLASSES: 8
72
+ ARCH: x3d
73
+ MODEL_NAME: X3D
74
+ LOSS_FUNC: cross_entropy
75
+ DROPOUT_RATE: 0.5
76
+
77
+ DATA_LOADER:
78
+ NUM_WORKERS: 8
79
+ PIN_MEMORY: True
80
+
81
+ NUM_GPUS: 1
82
+ NUM_SHARDS: 1
83
+ RNG_SEED: 0
84
+ OUTPUT_DIR: ./logs/x3d-l-kabr
85
+ LOG_MODEL_INFO: True
86
+
87
+ TENSORBOARD:
88
+ ENABLE: False
89
+
90
+ DEMO:
91
+ ENABLE: True
92
+ LABEL_FILE_PATH: ./KABR/annotation/classes.json
93
+ # INPUT_VIDEO: # path to input
94
+ # OUTPUT_FILE: # path to output
95
+ THREAD_ENABLE: False
96
+ THREAD_ENABLE: False
97
+ NUM_VIS_INSTANCES: 1
98
+ NUM_CLIPS_SKIP: 1
KABR/dataset/image/giraffes_md5.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ a8fc940f3eab84091741b7147846479d giraffes.zip
KABR_part_ab → KABR/dataset/image/giraffes_part_aa RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:337fcc27aa423a6e386b59bed51e9bc415a006dfc3e14036a71e9d442bd1fdde
3
- size 5368709120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc8dd0edfd989b190d5b93cd477ab046a98d8793a40def2c7997cc84191f603e
3
+ size 2147483648
KABR_part_ac → KABR/dataset/image/giraffes_part_ab RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:916df9700494c8f8848e60dc9ee5b5d672c925a9c909da69885959dcb09ce2de
3
- size 5368709120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf98d82193b8295bae2f50111e4d320da8b2fa8a211cb3bfba43d262bdb7d4ad
3
+ size 2147483648
KABR/dataset/image/giraffes_part_ac ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e3d0167310a03486a25d2d3a580498d91515cf9fb79489c940e172fcac1c9e5
3
+ size 2147483648
KABR/dataset/image/giraffes_part_ad ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef5abe4dc488a88382a7c59e4f2273114a740fde1cef101d0a71e13facd6bf29
3
+ size 1951376838
KABR/dataset/image/zebras_grevys_md5.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ca65c0fe4eca9cd395cf79510e1ce2c0 zebras_grevys.zip
KABR/dataset/image/zebras_grevys_part_aa ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:889918aa2943e812d5d191d89d2df40c4fd4b18959027605a08ce4d5b190917f
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ab ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:969b8e792205c879d8974bc0572f2fedfd866247559bf349d6fd2dac1dfdc99a
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ac ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abed525950af3b5318e48d74d8b91a491937c94c485fe57e8ee22900d578cc5f
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ad ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52bd1e1020b7fc587b5c8a1ec99b8f903fc823f51225bf8a0179322803b16895
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ae ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf1de5e8c8a609115d78af1af2dcb5de98f481bcf454a19e02bb20c963fcd355
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_af ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73f4b207cc8988b084c58bda5f9f3e2b5157b0bdc51dfb887f5fc7a294ecd5d2
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8452031dfc884d33e948f9ba09b4bf99dc0a228861aa4a20188dd22136deadf
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ah ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b3a3b8dd068066c802455a0b01888eabae18d0d94098e2e5f76167a8ed71861
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ai ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce0f1861cb9a44b01b6c4c1474c67859c152148088a38b89f70c1807f29572da
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_aj ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:259fb9cdf33ee551d7cb55e684c204068b7cf9770460ee01bba11adc491e2d47
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_ak ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad48195ebf05bd0715fa35304f8883dca57607eacabebb90f69b9c692ef88532
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_al ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0c9facf2cbf866d0dc373cffd95ae074f6781b9237d0afc12061833c4598da5
3
+ size 2147483648
KABR/dataset/image/zebras_grevys_part_am ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebb30f8b30a1470b9ade50b6bf0848cf26b92da7951f86de4f7cc6ec1c36e450
3
+ size 129174797
KABR/dataset/image/zebras_plains_md5.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ c4f11f08f6f49ea485a7298799dcf770 zebras_plains.zip
KABR/dataset/image/zebras_plains_part_aa ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8555171a107d1ab116b566f232e578f85cc0d368537c877ddd557a0e34e05e57
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ab ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:efc64a7ed2ebab9a06348e05e104b4e672766a39c2eca9ed4536b64c7fb8c56d
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ac ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:426799ca634bc80db1c12b5ccc5e0e08037eec66afda6e251578dcbf6e4ab072
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ad ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:056c230678ae16ce1c4f205455d819f6811fcb6ccf23e0787d85b43c248d0e23
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ae ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f22b49e066a3ee1428b5aa0c234ad1a638be3774ed02b722b656aca83a673d92
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_af ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b462cc77020b793035fa30b25ca4f2820518c02b057ad087c6d85802a435ff27
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45fd15de1deddf5f4dae275c3fecf305ddb7c2d75191945c14142f18cc3a201e
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ah ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f32363c8a78a9cba2f9050f0515e3c8e3b6e549ada7571f575f93d0c004bd3f
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ai ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:875806e6509301abf41bf05acd5afd13c262f0062b37e6d5c5dc5c49e0c31427
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_aj ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc16f4037c049adc5c141e4784eb6c39efaaa7c0e0a915c0e2d7e43145c98f9d
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_ak ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2491e88ec28928e041274a0be3f6cf7c39ca15ce58265bee7ba00052c1e8e302
3
+ size 2147483648
KABR/dataset/image/zebras_plains_part_al ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41ca65113db6f7f8b02851158d42e8bcaf4314c158b22370993840e83021e99f
3
+ size 91613758
KABR/dataset/image2video.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import json
4
+ import cv2
5
+ from natsort import natsorted
6
+ import pandas as pd
7
+ from tqdm import tqdm
8
+
9
+ if __name__ == "__main__":
10
+ path_to_image = "image"
11
+ path_to_video = "video"
12
+ annotation_train = "../annotation/train.csv"
13
+ annotation_val = "../annotation/val.csv"
14
+ classes_json = "../annotation/classes.json"
15
+ visual = False
16
+
17
+ if not os.path.exists(path_to_video):
18
+ os.makedirs(path_to_video)
19
+
20
+ with open(classes_json, "r") as file:
21
+ label2number = json.load(file)
22
+
23
+ number2label = {value: key for key, value in label2number.items()}
24
+
25
+ df_train = pd.read_csv(annotation_train, sep=" ")
26
+ df_val = pd.read_csv(annotation_val, sep=" ")
27
+ df = pd.concat([df_train, df_val], axis=0)
28
+ folders = natsorted(os.listdir(path_to_image))
29
+
30
+ hierarchy = {}
31
+
32
+ for folder in folders:
33
+ main = folder.split(".")[0]
34
+
35
+ if hierarchy.get(main) is None:
36
+ hierarchy[main] = [folder]
37
+ else:
38
+ hierarchy[main].append(folder)
39
+
40
+ for i, folder in tqdm(enumerate(hierarchy.keys()), total=len(hierarchy.keys())):
41
+ vw = cv2.VideoWriter(f"{path_to_video}/{folder}.mp4", cv2.VideoWriter_fourcc("m", "p", "4", "v"), 29.97,
42
+ (400, 300))
43
+
44
+ for segment in hierarchy[folder]:
45
+ mapping = {}
46
+
47
+ for index, row in df[df.original_vido_id == segment].iterrows():
48
+ mapping[row["frame_id"]] = number2label[row["labels"]]
49
+
50
+ for j, file in enumerate(natsorted(os.listdir(path_to_image + os.sep + segment))):
51
+ image = cv2.imread(f"{path_to_image}/{segment}/{file}")
52
+
53
+ if visual:
54
+ color = (0, 0, 0)
55
+ label = mapping[j + 1]
56
+ thickness_in = 1
57
+ size = 0.7
58
+ label_length = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, size, thickness_in)
59
+ copied = image.copy()
60
+ cv2.rectangle(image, (10, 10), (20 + label_length[0][0], 40), (255, 255, 255), -1)
61
+ cv2.putText(image, label, (16, 31),
62
+ cv2.FONT_HERSHEY_SIMPLEX, size, tuple([i - 50 for i in color]), thickness_in, cv2.LINE_AA)
63
+ image = cv2.addWeighted(image, 0.4, copied, 0.6, 0.0)
64
+
65
+ vw.write(image)
66
+
67
+ vw.release()
KABR/dataset/image2visual.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import json
4
+ import cv2
5
+ from natsort import natsorted
6
+ import pandas as pd
7
+ from tqdm import tqdm
8
+
9
+ if __name__ == "__main__":
10
+ path_to_image = "image"
11
+ path_to_video = "visual"
12
+ annotation_train = "../annotation/train.csv"
13
+ annotation_val = "../annotation/val.csv"
14
+ classes_json = "../annotation/classes.json"
15
+ visual = True
16
+
17
+ if not os.path.exists(path_to_video):
18
+ os.makedirs(path_to_video)
19
+
20
+ with open(classes_json, "r") as file:
21
+ label2number = json.load(file)
22
+
23
+ number2label = {value: key for key, value in label2number.items()}
24
+
25
+ df_train = pd.read_csv(annotation_train, sep=" ")
26
+ df_val = pd.read_csv(annotation_val, sep=" ")
27
+ df = pd.concat([df_train, df_val], axis=0)
28
+ folders = natsorted(os.listdir(path_to_image))
29
+
30
+ hierarchy = {}
31
+
32
+ for folder in folders:
33
+ main = folder.split(".")[0]
34
+
35
+ if hierarchy.get(main) is None:
36
+ hierarchy[main] = [folder]
37
+ else:
38
+ hierarchy[main].append(folder)
39
+
40
+ for i, folder in tqdm(enumerate(hierarchy.keys()), total=len(hierarchy.keys())):
41
+ vw = cv2.VideoWriter(f"{path_to_video}/{folder}.mp4", cv2.VideoWriter_fourcc("m", "p", "4", "v"), 29.97,
42
+ (400, 300))
43
+
44
+ for segment in hierarchy[folder]:
45
+ mapping = {}
46
+
47
+ for index, row in df[df.original_vido_id == segment].iterrows():
48
+ mapping[row["frame_id"]] = number2label[row["labels"]]
49
+
50
+ for j, file in enumerate(natsorted(os.listdir(path_to_image + os.sep + segment))):
51
+ image = cv2.imread(f"{path_to_image}/{segment}/{file}")
52
+
53
+ if visual:
54
+ color = (0, 0, 0)
55
+ label = mapping[j + 1]
56
+ thickness_in = 1
57
+ size = 0.7
58
+ label_length = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, size, thickness_in)
59
+ copied = image.copy()
60
+ cv2.rectangle(image, (10, 10), (20 + label_length[0][0], 40), (255, 255, 255), -1)
61
+ cv2.putText(image, label, (16, 31),
62
+ cv2.FONT_HERSHEY_SIMPLEX, size, tuple([i - 50 for i in color]), thickness_in, cv2.LINE_AA)
63
+ image = cv2.addWeighted(image, 0.4, copied, 0.6, 0.0)
64
+
65
+ vw.write(image)
66
+
67
+ vw.release()
KABR_MD5.txt DELETED
@@ -1 +0,0 @@
1
- MD5 (KABR.zip) = 6a4d7fa706a87a2e05171bcafce616ca
 
 
KABR_part_ae DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e055bf2004e7cdb819716582e3a8b0503512a0e131631441f606b9d8e3f31cd9
3
- size 5368709120
 
 
 
 
KABR_part_af DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3111391cdfa84ae7b06454476c64dd1bbc5d5787c3cd9480f2829e60066de58d
3
- size 5368709120
 
 
 
 
KABR_part_ag DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a3d84f09298d690bbd0b13dfa9645383dfef268422db6bcc754d737d2c4fa78a
3
- size 5368709120
 
 
 
 
KABR_part_ah DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:94fd36f64bfb67d29d839bb5413bdc29a420e2441897a73702ee4dc98019e80c
3
- size 5368709120
 
 
 
 
KABR_part_ai DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4585423f41c9dd56e75e4e56a3c3b8add0a88371d9cff343ba07f0b1fe46ff9a
3
- size 5368709120
 
 
 
 
KABR_part_aj DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:26aac1343b682be2ba44a38599b59611febbe8b38d66f35f68e850e3cfb38672
3
- size 5368709120
 
 
 
 
KABR_part_ak DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3d5c77ed6f24779cc4bcfa8f2ebbcd701d3bdc8f6ace5cf21e34e5eeecb773fd
3
- size 4463729102