File size: 883 Bytes
05ff3be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
from shutil import copyfile
#copyfile(src, dst)

### list based on https://github.com/senguptaumd/Background-Matting/blob/master/Data_adobe/train_data_list.txt
train_list = open('train_data_list.txt').read().splitlines()

### training
src_fg_path = '/export/ccvl12b/qihang/MGMatting/data/Combined_Dataset/Training_set/fg/'
src_alpha_path = '/export/ccvl12b/qihang/MGMatting/data/Combined_Dataset/Training_set/alpha/'

dst_fg_path = '/export/ccvl12b/qihang/MGMatting/data/Combined_Dataset_Solid/Training_set/fg/'
dst_alpha_path = '/export/ccvl12b/qihang/MGMatting/data/Combined_Dataset_Solid/Training_set/alpha/'

if not os.path.exists(dst_fg_path):
    os.makedirs(dst_fg_path)
if not os.path.exists(dst_alpha_path):
    os.makedirs(dst_alpha_path)

for f in train_list:
    copyfile(src_fg_path + f, dst_fg_path + f)
    copyfile(src_alpha_path + f, dst_alpha_path + f)