-
Notifications
You must be signed in to change notification settings - Fork 3
/
1_interaction_extract.py
executable file
·36 lines (27 loc) · 1.31 KB
/
1_interaction_extract.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
32
33
34
35
36
import os
import argparse
from utils.InteractionProcessor import InteractionProcessorTraj
def main():
parser = argparse.ArgumentParser(description="Interaction Processor")
parser.add_argument('--desired_data',default='interaction_multi',
help='The dataset name')
parser.add_argument('--timerange', type=int, default=5,
help='Duration (in seconds) to consider for the vehicle\'s future trajectory')
parser.add_argument('--cache_location', type=str, default='data/1_unified_cache',
help='Cache location for trajdata (default: "data/1_unified_cache")')
parser.add_argument('--save_path', type=str, default='data/2_extracted_results',
help='Path to save the results of interaction extractions (default: "data/2_extracted_results")')
parser.add_argument('--num_workers', type=int, default=os.cpu_count(),
help=f'Number of workers to use (default: {os.cpu_count()})')
args = parser.parse_args()
processor = InteractionProcessorTraj(
desired_data=args.desired_data,
param=args.timerange,
cache_location=args.cache_location,
save_path=args.save_path,
num_workers=args.num_workers
)
processor.process()
if __name__ == "__main__":
main()
#