-
Notifications
You must be signed in to change notification settings - Fork 2
/
recursive_d2dp.py
25 lines (21 loc) · 969 Bytes
/
recursive_d2dp.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
#recusively inference on 36 original videos d2dp
import os
from tqdm import tqdm
import argparse
def get_parser():
parser = argparse.ArgumentParser(description="inference vids")
parser.add_argument("--root_path", help="Root path")
return parser
def main():
args = get_parser().parse_args()
vids = open('/home/minhkv/tienpv_DO_NOT_REMOVE/detectron2/tienpv13/vids_in_micand.txt', 'r+')
line = True
while line:
line = vids.readline().rstrip()
output = line.split('/', 8)[8]
command = 'python3 demo_detectron2_deepsort.py ' + line + ' --config-file /home/minhkv/tienpv_DO_NOT_REMOVE/detectron2/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml ' + '--ignore_display ' + ' --save_path ' + output + ' --opts MODEL.WEIGHTS /home/minhkv/tienpv_DO_NOT_REMOVE/detectron2/projects/Thesis/output/model_final.pth'
print(command)
os.system(command)
return 0
if __name__ == "__main__":
main()