Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To run the code, you need to download the pre-trained models from [here](https:/
python3 eval.py -i image_file -s semantic_file

# example
python3 eval.py -i ./sample_images/img1.jpg -s ./sample_images/img1.npy
python3 eval.py -i ./sample_images/img1.jpg -s ./sample_images/sem1.npy

The generated scanpaths are saved in the **results** folder.

Expand Down
12 changes: 7 additions & 5 deletions components.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
).to(device)
fix_duration = FixationDuration(512, 128).to(device)

feature_extractor.load_state_dict(torch.load('./data/weights/vgg19.pth'))
fuser.load_state_dict(torch.load('./data/weights/fuser.pth'))
iorroi_lstm.load_state_dict(torch.load('./data/weights/iorroi.pth'))
mdn.load_state_dict(torch.load('./data/weights/mdn.pth'))
fix_duration.load_state_dict(torch.load('./data/weights/fix_duration.pth'))
location_mapper = None if torch.cuda.is_available() else device

feature_extractor.load_state_dict(torch.load('./data/weights/vgg19.pth', map_location=location_mapper))
fuser.load_state_dict(torch.load('./data/weights/fuser.pth', map_location=location_mapper))
iorroi_lstm.load_state_dict(torch.load('./data/weights/iorroi.pth', map_location=location_mapper))
mdn.load_state_dict(torch.load('./data/weights/mdn.pth', map_location=location_mapper))
fix_duration.load_state_dict(torch.load('./data/weights/fix_duration.pth', map_location=location_mapper))
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
matplotlib
torch
torchvision
numpy
Pillow
scipy