File data_flow.py changed (mode: 100644) (index cf2e269..73bc488) |
... |
... |
def load_data_shanghaitech_flip_only(img_path, train=True): |
477 |
477 |
gt_count = count_gt_annotation_sha(mat_path) |
gt_count = count_gt_annotation_sha(mat_path) |
478 |
478 |
return img_origin, gt_count |
return img_origin, gt_count |
479 |
479 |
|
|
480 |
|
def load_data_shanghaitech_non_overlap(img_path, train=True): |
|
|
480 |
|
def load_data_shanghaitech_non_overlap(img_path, train=True, debug=False): |
481 |
481 |
""" |
""" |
482 |
482 |
per sample, crop 4, non-overlap |
per sample, crop 4, non-overlap |
483 |
483 |
:param img_path: |
:param img_path: |
|
... |
... |
def load_data_shanghaitech_non_overlap(img_path, train=True): |
525 |
525 |
# get correct people head count from head annotation |
# get correct people head count from head annotation |
526 |
526 |
mat_path = img_path.replace('.jpg', '.mat').replace('images', 'ground-truth').replace('IMG', 'GT_IMG') |
mat_path = img_path.replace('.jpg', '.mat').replace('images', 'ground-truth').replace('IMG', 'GT_IMG') |
527 |
527 |
gt_count = count_gt_annotation_sha(mat_path) |
gt_count = count_gt_annotation_sha(mat_path) |
|
528 |
|
if debug: |
|
529 |
|
gt_file = h5py.File(gt_path, 'r') |
|
530 |
|
target = np.asarray(gt_file['density']) |
|
531 |
|
return img_origin, gt_count, target |
528 |
532 |
return img_origin, gt_count |
return img_origin, gt_count |
529 |
533 |
|
|
530 |
534 |
def load_data_shanghaitech_non_overlap_downsample(img_path, train=True): |
def load_data_shanghaitech_non_overlap_downsample(img_path, train=True): |
File train_script/debug/evaluation_shb_CompactCNNV7i_t1.sh added (mode: 100644) (index 0000000..fc800cd) |
|
1 |
|
task="evaluation_shb_CompactCNNV7i_t1" |
|
2 |
|
CUDA_VISIBLE_DEVICES=2 OMP_NUM_THREADS=4 PYTHONWARNINGS="ignore" HTTPS_PROXY="http://10.60.28.99:86" nohup python debug/evaluate_shb.py \ |
|
3 |
|
--model "CompactCNNV7i" \ |
|
4 |
|
--input /data/rnd/thient/thient_data/shanghaitech_with_people_density_map/ShanghaiTech_3/part_B \ |
|
5 |
|
--load_model saved_model_best/g1_ccnn_v7_t3_shb/g1_ccnn_v7_t3_shb_checkpoint_valid_mae=-8.881268501281738.pth \ |
|
6 |
|
--meta_data logs/$task.txt \ |
|
7 |
|
--datasetname shanghaitech_non_overlap \ |
|
8 |
|
--epochs 1201 > logs/$task.log & |
|
9 |
|
|
|
10 |
|
## |
|
11 |
|
#def _parse(): |
|
12 |
|
# parser = argparse.ArgumentParser(description='evaluatiuon SHB') |
|
13 |
|
# parser.add_argument('--input', action="store", type=str, default=HardCodeVariable().SHANGHAITECH_PATH_PART_A) |
|
14 |
|
# parser.add_argument('--output', action="store", type=str, default="visualize/verify_dataloader_shanghaitech") |
|
15 |
|
# parser.add_argument('--load_model', action="store", type=str, default="visualize/verify_dataloader_shanghaitech") |
|
16 |
|
# parser.add_argument('--model', action="store", type=str, default="visualize/verify_dataloader_shanghaitech") |
|
17 |
|
# parser.add_argument('--meta_data', action="store", type=str, default="data_info.txt") |
|
18 |
|
# parser.add_argument('--datasetname', action="store", default="shanghaitech_keepfull_r50") |
|
19 |
|
# arg = parser.parse_args() |
|
20 |
|
# return arg |
|
21 |
|
## |
|
22 |
|
## |