394db7b4ef0a2801be7b7c5bb6df022498461296,prepare_viper.py,,,#,7

Before Change



for ii in range(5):
    index = np.random.permutation(632)
    test_save_path = download_path + "/test%d"%ii
    if not os.path.isdir(test_save_path):
        os.mkdir(test_save_path)
        os.mkdir(test_save_path + "/query")
        os.mkdir(test_save_path + "/gallery")

    for i in range(316):
        dir_name = ID_list[i]
        src_path_1 = train_save_path + "/" + dir_name + "/ca_*.bmp"
        src_path_2 = train_save_path + "/" + dir_name + "/cb_*.bmp"
        dst_path_1 = test_save_path+"/query/"
        dst_path_2 = test_save_path+"/gallery/"
        os.system("cp %s %s"%(src_path_1, dst_path_1))
        os.system("cp %s %s"%(src_path_2, dst_path_2))

After Change


for ii in range(1):
    index = np.random.permutation(632)
    index = index[0:316]
    test_save_path = download_path + "/pytorch/" //"/test%d"%ii
    if not os.path.isdir(test_save_path):
        os.mkdir(test_save_path)
    os.mkdir(test_save_path + "/train")
    os.mkdir(test_save_path + "/query")
    os.mkdir(test_save_path + "/gallery")

    for i in range(632):
        dir_name = ID_list[i]
        if i in index:
            src_path_1 = train_save_path + "/" + dir_name
            dst_path_1 = test_save_path+"/train/"
            os.system("cp -r  %s %s"%(src_path_1, dst_path_1))
        else:
            src_path_1 = train_save_path + "/" + dir_name //+ "/ca_*.bmp"
            //src_path_2 = train_save_path + "/" + dir_name + "/cb_*.bmp"
            dst_path_1 = test_save_path+"/query/"
            //dst_path_2 = test_save_path+"/gallery/" + dir_name
            os.system("cp -r %s %s"%(src_path_1, dst_path_1))

os.system("cp -r %s  %s"%(test_save_path+"/query/*", test_save_path+"/gallery/"))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: layumi/Person_reID_baseline_pytorch
Commit Name: 394db7b4ef0a2801be7b7c5bb6df022498461296
Time: 2020-08-19
Author: Zhedong.Zheng@student.uts.edu.au
File Name: prepare_viper.py
Class Name:
Method Name:


Project Name: layumi/Person_reID_baseline_pytorch
Commit Name: 394db7b4ef0a2801be7b7c5bb6df022498461296
Time: 2020-08-19
Author: Zhedong.Zheng@student.uts.edu.au
File Name: prepare_viper.py
Class Name:
Method Name: