Skip to content

Commit 3b81f8e

Browse files
code cleaning
1 parent 5adee64 commit 3b81f8e

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/data/components/cocosearch18/cocosearch18_ta.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,12 @@ def __getitem__(self, index: int):
6969
img_features_path = Path(self.root_path, self.img_features_dir, task_string, Path(img_filename).stem + '.pth')
7070
img_feats = torch.load(img_features_path).unsqueeze(0)
7171

72-
#if self.split == 'train' or self.split == 'val':
7372
num_fixations = len(sample['X'])
7473
x = sample['X']
7574
y = sample['Y']
7675
t = sample['T'][:num_fixations]
7776

78-
scanpath = np.stack((x,y,t)).T # coords are in range [512x320]
79-
#coords = (coords + 1) / 2 #put in range [0,1]
77+
scanpath = np.stack((x,y,t)).T
8078

8179
if not self.use_abs_coords:
8280
# coords in the original json file for TA are in range [1680, 1050]

src/data/components/cocosearch18/cocosearch18_tp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ def __getitem__(self, index: int):
7676
y = sample['Y']
7777
t = sample['T'][:num_fixations]
7878

79-
scanpath = np.stack((x,y,t)).T # coords are in range [512x320]
80-
#coords = (coords + 1) / 2 #put in range [0,1]
79+
scanpath = np.stack((x,y,t)).T
8180

8281
if not self.use_abs_coords:
8382
#in the json file coords for TP are in range [512x320]

0 commit comments

Comments
 (0)