File data_flow.py changed (mode: 100644) (index c9960d9..b250689) |
... |
... |
def load_data_jhucrowd_256(img_path, train=True, debug=False): |
1025 |
1025 |
gt_path = img_path.replace('.jpg', '.h5').replace('images', 'ground-truth-h5') |
gt_path = img_path.replace('.jpg', '.h5').replace('images', 'ground-truth-h5') |
1026 |
1026 |
img_origin = Image.open(img_path).convert('RGB') |
img_origin = Image.open(img_path).convert('RGB') |
1027 |
1027 |
gt_file = h5py.File(gt_path, 'r') |
gt_file = h5py.File(gt_path, 'r') |
1028 |
|
target = np.asarray(gt_file['density']) |
|
|
1028 |
|
target = np.asarray(gt_file['density']).astype('float32') |
1029 |
1029 |
target_factor = 8 |
target_factor = 8 |
1030 |
1030 |
crop_sq_size = 256 |
crop_sq_size = 256 |
1031 |
1031 |
if train: |
if train: |
|
... |
... |
def load_data_jhucrowd_256(img_path, train=True, debug=False): |
1055 |
1055 |
interpolation=cv2.INTER_CUBIC) * target_factor * target_factor |
interpolation=cv2.INTER_CUBIC) * target_factor * target_factor |
1056 |
1056 |
# target1 = target1.unsqueeze(0) # make dim (batch size, channel size, x, y) to make model output |
# target1 = target1.unsqueeze(0) # make dim (batch size, channel size, x, y) to make model output |
1057 |
1057 |
target1 = np.expand_dims(target1, axis=0) # make dim (batch size, channel size, x, y) to make model output |
target1 = np.expand_dims(target1, axis=0) # make dim (batch size, channel size, x, y) to make model output |
1058 |
|
return img, target1.astype('float32') |
|
|
1058 |
|
return img, target1 |
1059 |
1059 |
|
|
1060 |
1060 |
|
|
1061 |
1061 |
def data_augmentation(img, target): |
def data_augmentation(img, target): |
File train_script/learnstuff/l3/adamw1_bigtail13i_t2_jhu.sh copied from file train_script/learnstuff/l3/adamw1_bigtail13i_t1_jhu.sh (similarity 71%) (mode: 100644) (index b6dc13c..b5a6e93) |
1 |
|
task="adamw1_bigtail13i_t1_jhu" |
|
|
1 |
|
task="adamw1_bigtail13i_t2_jhu" |
2 |
2 |
|
|
3 |
|
CUDA_VISIBLE_DEVICES=3 OMP_NUM_THREADS=2 PYTHONWARNINGS="ignore" HTTPS_PROXY="http://10.60.28.99:86" nohup python experiment_main.py \ |
|
|
3 |
|
CUDA_VISIBLE_DEVICES=3 OMP_NUM_THREADS=6 PYTHONWARNINGS="ignore" HTTPS_PROXY="http://10.60.28.99:86" nohup python experiment_main.py \ |
4 |
4 |
--task_id $task \ |
--task_id $task \ |
5 |
5 |
--note "adamW with extrem high lr and decay, msel1mean on jhu" \ |
--note "adamW with extrem high lr and decay, msel1mean on jhu" \ |
6 |
6 |
--model "BigTail13i" \ |
--model "BigTail13i" \ |
|
... |
... |
CUDA_VISIBLE_DEVICES=3 OMP_NUM_THREADS=2 PYTHONWARNINGS="ignore" HTTPS_PROXY="ht |
8 |
8 |
--lr 1e-3 \ |
--lr 1e-3 \ |
9 |
9 |
--decay 0.1 \ |
--decay 0.1 \ |
10 |
10 |
--loss_fn "MSEL1Mean" \ |
--loss_fn "MSEL1Mean" \ |
11 |
|
--batch_size 40 \ |
|
|
11 |
|
--batch_size 70 \ |
12 |
12 |
--datasetname jhucrowd_256 \ |
--datasetname jhucrowd_256 \ |
13 |
13 |
--optim adamw \ |
--optim adamw \ |
14 |
|
--epochs 1201 > logs/$task.log & |
|
|
14 |
|
--epochs 401 > logs/$task.log & |
15 |
15 |
|
|
16 |
16 |
echo logs/$task.log # for convenience |
echo logs/$task.log # for convenience |