-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
31 lines (26 loc) · 1 KB
/
main.py
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
# SPDX-License-Identifier: BSD-3-Clause-Clear
# Copyright (c) 2022 Fujitsu Limited. All rights reserved.
# Licensed under the BSD 3-Clause Clear License. See LICENSE for details.
from hico import hico
from vcoco import vcoco
def main():
### For HICO-DET-SG ###
dataset = 'hico' # 'hico' or 'vcoco'
seed = -1 # 368, 680, 750 for HICO-DET-SG split 1, 2, 3
ratio = 0.9 # 0.9 for hico and 0.7 for vcoco
input = [/hico_20160224_det/annotations] # The path you put original jsons
output = 'sg1' # output name
### For V-COCO-SG ###
# dataset = 'vcoco' # 'hico' or 'vcoco'
# seed = -1 # 564, 966, 2065 for V-COCO-SG split 1, 2, 3
# ratio = 0.7 # 0.9 for hico and 0.7 for vcoco
# input = [/v-coco/annotations] # The path you put original jsons
# output = 'sg1' # output name
if dataset == 'hico':
hico(seed, ratio, input, output)
elif dataset == 'vcoco':
vcoco(seed, ratio, input, output)
else:
print('ERROR!')
if __name__ == '__main__':
main()