Subdivide dataset by species

#4
by thompsonmj - opened
This view is limited to 50 files because it contains too many changes.  See the raw diff here.
Files changed (50) hide show
  1. .gitattributes +5 -11
  2. KABR/README.txt +55 -0
  3. KABR/annotation/classes.json +1 -0
  4. KABR/annotation/distribution.xlsx +0 -0
  5. KABR_part_ad → KABR/annotation/train.csv +2 -2
  6. KABR_part_aa → KABR/annotation/val.csv +2 -2
  7. KABR/configs/I3D.yaml +99 -0
  8. KABR/configs/SLOWFAST.yaml +108 -0
  9. KABR/configs/X3D.yaml +98 -0
  10. KABR/dataset/image/giraffes_md5.txt +1 -0
  11. KABR_part_ab → KABR/dataset/image/giraffes_part_aa +2 -2
  12. KABR_part_ac → KABR/dataset/image/giraffes_part_ab +2 -2
  13. KABR/dataset/image/giraffes_part_ac +3 -0
  14. KABR/dataset/image/giraffes_part_ad +3 -0
  15. KABR/dataset/image/zebras_grevys_md5.txt +1 -0
  16. KABR/dataset/image/zebras_grevys_part_aa +3 -0
  17. KABR/dataset/image/zebras_grevys_part_ab +3 -0
  18. KABR/dataset/image/zebras_grevys_part_ac +3 -0
  19. KABR/dataset/image/zebras_grevys_part_ad +3 -0
  20. KABR/dataset/image/zebras_grevys_part_ae +3 -0
  21. KABR/dataset/image/zebras_grevys_part_af +3 -0
  22. KABR/dataset/image/zebras_grevys_part_ag +3 -0
  23. KABR/dataset/image/zebras_grevys_part_ah +3 -0
  24. KABR/dataset/image/zebras_grevys_part_ai +3 -0
  25. KABR/dataset/image/zebras_grevys_part_aj +3 -0
  26. KABR/dataset/image/zebras_grevys_part_ak +3 -0
  27. KABR/dataset/image/zebras_grevys_part_al +3 -0
  28. KABR/dataset/image/zebras_grevys_part_am +3 -0
  29. KABR/dataset/image/zebras_plains_md5.txt +1 -0
  30. KABR/dataset/image/zebras_plains_part_aa +3 -0
  31. KABR/dataset/image/zebras_plains_part_ab +3 -0
  32. KABR/dataset/image/zebras_plains_part_ac +3 -0
  33. KABR/dataset/image/zebras_plains_part_ad +3 -0
  34. KABR/dataset/image/zebras_plains_part_ae +3 -0
  35. KABR/dataset/image/zebras_plains_part_af +3 -0
  36. KABR/dataset/image/zebras_plains_part_ag +3 -0
  37. KABR/dataset/image/zebras_plains_part_ah +3 -0
  38. KABR/dataset/image/zebras_plains_part_ai +3 -0
  39. KABR/dataset/image/zebras_plains_part_aj +3 -0
  40. KABR/dataset/image/zebras_plains_part_ak +3 -0
  41. KABR/dataset/image/zebras_plains_part_al +3 -0
  42. KABR/dataset/image2video.py +67 -0
  43. KABR/dataset/image2visual.py +67 -0
  44. KABR_MD5.txt +0 -1
  45. KABR_part_ae +0 -3
  46. KABR_part_af +0 -3
  47. KABR_part_ag +0 -3
  48. KABR_part_ah +0 -3
  49. KABR_part_ai +0 -3
  50. KABR_part_aj +0 -3
.gitattributes CHANGED
@@ -52,14 +52,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
52
  *.jpg filter=lfs diff=lfs merge=lfs -text
53
  *.jpeg filter=lfs diff=lfs merge=lfs -text
54
  *.webp filter=lfs diff=lfs merge=lfs -text
55
- KABR_part_aa filter=lfs diff=lfs merge=lfs -text
56
- KABR_part_ab filter=lfs diff=lfs merge=lfs -text
57
- KABR_part_ac filter=lfs diff=lfs merge=lfs -text
58
- KABR_part_ad filter=lfs diff=lfs merge=lfs -text
59
- KABR_part_ae filter=lfs diff=lfs merge=lfs -text
60
- KABR_part_af filter=lfs diff=lfs merge=lfs -text
61
- KABR_part_ag filter=lfs diff=lfs merge=lfs -text
62
- KABR_part_ah filter=lfs diff=lfs merge=lfs -text
63
- KABR_part_ai filter=lfs diff=lfs merge=lfs -text
64
- KABR_part_aj filter=lfs diff=lfs merge=lfs -text
65
- KABR_part_ak filter=lfs diff=lfs merge=lfs -text
 
52
  *.jpg filter=lfs diff=lfs merge=lfs -text
53
  *.jpeg filter=lfs diff=lfs merge=lfs -text
54
  *.webp filter=lfs diff=lfs merge=lfs -text
55
+ # Split data files
56
+ *_part_* filter=lfs diff=lfs merge=lfs -text
57
+ # Custom
58
+ KABR/annotation/train.csv filter=lfs diff=lfs merge=lfs -text
59
+ KABR/annotation/val.csv filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
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
+ 7aa9270fffa9ca10d2fe3a61f34770ba 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:5bac568ae6c6015f82509b6e950e691a89f31662ddf175176a087544143db290
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:ee62913b9c0c2080351a7df6ee5b52a4820c488727460375a470acf947575986
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:7cc2d6a05efc1b9b070c15a9a89382864885ac0422c345f8e09c2c520143a1bd
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:87372e3547b2f39b6ffa0c10952a406e9c8d6a54499f325d35aedc25f7c015fa
3
+ size 1951376838
KABR/dataset/image/zebras_grevys_md5.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 9084ac4bbda00ff527951384ef2da313 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:3e78e55b9f534b79df031afcd75581dce3aa4c59f244eeeb42ed5eedce4c8465
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:9788a9b699d339bfe74e2265b4d3b68389b474332bf9b7be7d9cbbb9ebc33960
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:f1987838498e42bd052c5cf6f453e8dcb9c0611071262119037218eaf3b4e320
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:ee8555402ba584771c43e4b3e4b4edfcfbffd08996a2bc7aae1b49035826c8b4
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:6ec2607254f6b2ddca0e18aabab15a42ca97f4631878962243f6658541a186c7
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:103a6d435da7743935da5ed3d4e376d1dfdf1dc58bbd5c47880e5d142eef6d0d
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:a5dd33bcbc62cb9717854a7f8e2f5e5b31c970e54b4c18e5201aed704cf3d3bc
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:b331e25f572d95f161a1f61bfc065e49c17bbf2d4d128e54c4512dea884f2c6e
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:435a27f8c8cb1d32823c261eef98b700cf78b843a2f6e80eb7a3284dc33a2f36
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:43d838db21ef3e4820a0949d628017aa61d5876fffdbeba18639b9a2be5482b6
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:f46efb8ab0a31058ffe4a7690f904e79881b772b20088710fdee0ea548696cf3
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:2ae431c840f7e3d1e4fd01180836478e4054dabb1cd5a6ca416fd7ef76089459
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:8fd2cad718b4f753c0a23ec08201d5974db51ca4d5a7427d5dc5720ede52249e
3
+ size 129174797
KABR/dataset/image/zebras_plains_md5.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 1f0c62ff5294a0d607807c634a30e04e 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:bff22f5475da31d34cddbe061c80ed4a28dee4110abe932c47aea6bb715066f4
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:5dfe8933c8e80b51686ce17ccf02e4d14fb515b9d2f9e75d561580a60909d897
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:1c6e21fe556ef09a314ac1bea1c878c87c0d6732f5fa45f0bb7d23541590e8d5
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:164934163fffe0671f163bdce7cb1c5156e5c91a64876dd88c27d1433d79303e
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:2573329692e751e2f172a1407f1890c5ebe6ec3d6af9e5be91a2542c6a1aca4c
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:ebe28b7135dfb18f9b4bacb051579a0c2364720a005ef96c7323296559a2ec86
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:7c5b16e93ed2bb71472a8b4eafbd1a78e21d7d9a1e620201426b41bec7a034d5
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:1cb2a383c57734eb055c88e0da063df4324db0cc98472976e257af2d16f1b3e5
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:771b8ef309190b619d7b6b88f68b68bce351510bcd46ecb9cd58a5237058ee87
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:9b5ed5d4828741edac73d54c018bbceff59736a1f4e821b1a4f84bb3888d4e30
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:8b59c41aef5c8ae0809abb035b97816a767c72d30be150742550b99c5f4c90eb
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:d3223ffc298ec89e81c99fe6e980cffed9a989468ef741ea72e5432d9e6e464f
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