forked from Niche-Lab/COLO
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_split.py
More file actions
29 lines (22 loc) · 665 Bytes
/
Copy path_split.py
File metadata and controls
29 lines (22 loc) · 665 Bytes
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
"""
This script is to shuffle the YOLO-formatted dataset given the sample size n
"""
import argparse
from pyniche.trainer import NicheTrainer
def main(args):
dir_data = args.dir_data
n = int(args.n)
# trainer will shuffle the data once it is set
trainer = NicheTrainer()
trainer.type = "yolo"
trainer.set_data(
dataclass=dir_data,
batch=16,
n=n,
)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--dir_data", help="Directory of the YOLO-formatted dataset")
parser.add_argument("--n", help="training sample size")
args = parser.parse_args()
main(args)