In [1]:
from download_data import multi_p_run, put_worker, test_worker, download_mp4, download_align
In [2]:
import os
In [3]:
tot_movies=35
In [ ]:
In [4]:
res = multi_p_run(tot_movies, put_worker, test_worker, params={}, n_process=5)
print (res)
In [5]:
align_path = '../data/align'
os.makedirs(align_path, exist_ok=True)
res = download_align(0, tot_movies, {'align_path':align_path})
In [6]:
print (res)
os.system('rm -f {align_path}/*.tar && rm -f {align_path}/Thumbs.db'.format(align_path=align_path))
Out[6]:
In [7]:
### Moives(MP4s)
In [8]:
src_path = '../data/mp4s'
res = download_mp4(0, tot_movies, {'src_path':src_path})
In [9]:
print (res)
os.system('rm -f {src_path}/*.zip && rm -f {src_path}/*/Thumbs.db'.format(src_path=src_path))
Out[9]:
In [ ]:
In [10]:
from preprocess_data import preprocess, find_files, Video
In [11]:
tgt_path = '../data/datasets'
In [12]:
os.makedirs('{tgt_path}'.format(tgt_path=tgt_path), exist_ok=True)
os.system('rm -rf {tgt_path}'.format(tgt_path=tgt_path))
Out[12]:
In [13]:
res = preprocess(0, tot_movies, {'src_path':src_path, 'tgt_path':tgt_path})
In [14]:
print (res)
In [ ]: