Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e8131d

Browse files
committed
Code state to get visualizations on unlabeled grant data. par_process_data.py has directories changed to process csv files. batch_demo.py has added withLabels=False flag to remove semantic labels. batch_demo.sh has changed test data directory.
1 parentba0f98e commit7e8131d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

‎demo/batch_demo.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def main():
7979
opacity=args.opacity,
8080
draw_gt=False,
8181
show=False,
82+
withLabels=False,
8283
out_file=out_file)
8384
# Saving soft probablity.
8485
prob_out_file=os.path.join(args.out_dir,im_path.split('/')[-1].replace('.png','.npy'))

‎py_scripts/par_process_data.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def quick_convert_csv2png(f):
2929
"""
3030
Check how many CSV are converted to png.
3131
"""
32-
data_dir='/home/ubuntu/data/archive/TRACK_NEJM-AI_human-in-loop_csvfiles'
32+
data_dir='/data/20240524_unlabeled_grant_data/NEW_CSV_FILES_EMILY_FOLLOWUP_CTs'
3333
fpath=os.path.join(data_dir,f)
34-
output_dir='/home/ubuntu/data/20240408_unlabeled_track/images'
34+
output_dir='/data/20240524_unlabeled_grant_data/images'
3535
center_frame=np.loadtxt(fpath,delimiter=',',dtype=np.float32)
3636
#Check the amount of zeros in the image
3737
ifnp.sum(center_frame==0)>SKIP_ZERO_THR*center_frame.size:
@@ -46,7 +46,7 @@ def convert_csv2png(f, data_dir):
4646
Read in csv data and save as png data
4747
"""
4848
fpath=os.path.join(data_dir,f)
49-
output_dir='/home/ubuntu/data/20240408_unlabeled_track/images'
49+
output_dir='/data/20240524_unlabeled_grant_data/images'
5050
print(fpath)
5151

5252
#Check the fake ground truth frame
@@ -115,8 +115,8 @@ def convert_csv2png(f, data_dir):
115115
return (var_list,var_cnt,f)
116116

117117
defconvert_csv2png_main():
118-
path_to_csv_dir='/home/ubuntu/data/archive/TRACK_NEJM-AI_human-in-loop_csvfiles'
119-
path_to_image_dir='/home/ubuntu/data/20240408_unlabeled_track/images'
118+
path_to_csv_dir='/data/20240524_unlabeled_grant_data/NEW_CSVFILES_EMILY_FOLLOWUP_CTs'
119+
path_to_image_dir='/data/20240524_unlabeled_grant_data/images'
120120
data_dir=os.path.join(path_to_csv_dir)
121121
output_dir=os.path.join(path_to_image_dir)
122122
ifnotos.path.exists(output_dir):

‎scripts/batch_demo.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python demo/batch_demo.py --config=configs/swin/20240223_4gpu_b60_p256_iter160k.py --checkpoint=work_dirs/20240223_4gpu_b60_p256_iter160k/iter_160000.pth --out_dir=visualizations/20240410_unlabeled_track_model_predictions --test_data=/home/ubuntu/data/20240408_unlabeled_track
1+
python demo/batch_demo.py --config=configs/swin/20240223_4gpu_b60_p256_iter160k.py --checkpoint=work_dirs/20240223_4gpu_b60_p256_iter160k/iter_160000.pth --out_dir=visualizations/20240526_grant_visualizations --test_data=/data/20240524_unlabeled_grant_data

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp