Skip to content

Commit

Permalink
Added remove stimuli with no fixation filter to dataset_config.py (#44)
Browse files Browse the repository at this point in the history
* Added filter to remove stimuli with no fixations

* Update test_filter_datasets.py

* Update test_filter_datasets.py

* Added remove stimuli without fixations to dataset_config.py
  • Loading branch information
hkhanuja authored Dec 16, 2023
1 parent 90d6a99 commit e32e2af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pysaliency/dataset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
filter_scanpaths_by_attribute,
filter_fixations_by_attribute,
filter_stimuli_by_attribute,
filter_scanpaths_by_length
filter_scanpaths_by_length,
remove_stimuli_without_fixations
)

from schema import Schema, Optional
Expand Down Expand Up @@ -49,7 +50,8 @@ def apply_dataset_filter_config(stimuli, fixations, filter_config):
'filter_scanpaths_by_attribute': add_stimuli_argument(filter_scanpaths_by_attribute),
'filter_fixations_by_attribute': add_stimuli_argument(filter_fixations_by_attribute),
'filter_stimuli_by_attribute': filter_stimuli_by_attribute,
'filter_scanpaths_by_length': add_stimuli_argument(filter_scanpaths_by_length)
'filter_scanpaths_by_length': add_stimuli_argument(filter_scanpaths_by_length),
'remove_stimuli_without_fixations': remove_stimuli_without_fixations
}

if filter_config['type'] not in filter_dict:
Expand Down

0 comments on commit e32e2af

Please sign in to comment.