In [1]:
from download_data import multi_p_run, put_worker, _worker, download_mp4, download_align

TEST


In [2]:
res = multi_p_run(35, put_worker, _worker, 5)
print (res)


[0, 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]
5
35 >> [[0, 7], [7, 14], [14, 21], [21, 28], [28, 35]]
[{'succ': {0, 1, 2, 3, 4, 5, 6}, 'fail': set()}, {'succ': {7, 8, 9, 10, 11, 12, 13}, 'fail': set()}, {'succ': {14, 15, 16, 17, 18, 19, 20}, 'fail': set()}, {'succ': {21, 22, 23, 24, 25, 26, 27}, 'fail': set()}, {'succ': {32, 33, 34, 28, 29, 30, 31}, 'fail': set()}]

Download Data


In [ ]:
## down
import os
os.makedirs('./datasets', exist_ok=True)
#os.system('rm -rf ./datasets/*')

res = multi_p_run(35, put_worker, download_align, 9)
print (res)

os.system('rm -f datasets/*.tar && rm -f datasets/align/Thumbs.db')

In [ ]:
res = multi_p_run(35, put_worker, download_mp4, 9)
print (res)

os.system('rm -f datasets/*.zip && rm -f datasets/*/Thumbs.db')

In [ ]:
## download single 22 th dir
#download_data.py(22, 22)

Preprocess Data


In [3]:
from preprocess_data import preprocess, find_files, Video

In [4]:
import os
os.makedirs('./TARGET', exist_ok=True)
os.system('rm -rf ./TARGET/*')


Out[4]:
0

In [ ]:
res = multi_p_run(35, put_worker, preprocess, 9)


[0, 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]
9
35 >> [[0, 4], [4, 8], [8, 12], [12, 16], [16, 20], [20, 24], [24, 28], [28, 32], [32, 35]]
Processing: datasets/s1/prwq3s.mpg
Processing: datasets/s4/lrix7n.mpg
Processing: datasets/s8/pgbyza.mpg
Processing: datasets/s12/brik7n.mpg
Processing: datasets/s16/sgit7p.mpg
Processing: datasets/s20/lrbp8a.mpg
Processing: datasets/s24/sbik8a.mpg
Processing: datasets/s28/srwf8a.mpg
Processing: datasets/s32/pbbm1n.mpg
Processing: datasets/s12/sbbaza.mpg
Processing: datasets/s28/lbit7n.mpg
Processing: datasets/s32/pbwm7p.mpg
Processing: datasets/s8/bril2s.mpg
Processing: datasets/s20/bway7n.mpg
Processing: datasets/s1/pbib8p.mpg
Processing: datasets/s16/lwaj7n.mpg
Processing: datasets/s24/bwwl6a.mpg
Processing: datasets/s4/bbwf7n.mpg

In [ ]: