-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathyolt.py
More file actions
15 lines (14 loc) · 691 Bytes
/
yolt.py
File metadata and controls
15 lines (14 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import subprocess
import os
# Start 3D_Photo and generate videos
p_3d = subprocess.Popen(["python", "main.py", "--config", "argument.yml"], cwd='3d-photo-inpainting')
p_3d.wait()
print('Successfully completed the 3D_Photo generator!')
# Start YOLOv4 and generate output
p_make = subprocess.Popen(["make"], cwd='darknet')
p_make.wait()
for cout, video in enumerate(os.listdir('videos')):
print('Processing video: '+ video)
p_yolo = subprocess.Popen(["./darknet", "detector", "demo", "cfg/coco.data", "cfg/yolov4.cfg", "yolov4.weights", "../videos/"+video, "-out_filename", "../videos/res_"+video], cwd='darknet')
p_yolo.wait()
print('Video '+video+' successfully processed!')