def run_warp_optical_flow(vid_item, dev_id=0):
vid_path = vid_item[0]
vid_id = vid_item[1]
vid_name = vid_path.split('/')[-1].split('.')[0]
out_full_path = os.path.join(out_path, vid_name)
try:
os.mkdir(out_full_path)
except OSError:
pass
current = current_process()
dev_id = (int(current._identity[0]) - 1) % NUM_GPU
flow_x_path = '{}/flow_x'.format(out_full_path)
flow_y_path = '{}/flow_y'.format(out_full_path)
cmd = os.path.join(df_path + 'build/extract_warp_gpu')+' -f {} -x {} -y {} -b 20 -t 1 -d {} -s 1 -o {}'.format(
vid_path, flow_x_path, flow_y_path, dev_id, out_format)
os.system(cmd)
print 'warp on {} {} done'.format(vid_id, vid_name)
sys.stdout.flush()
return True
build_of.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录