Skip to content

Commit

Permalink
Bugfix: ContextAwareSaliency download link
Browse files Browse the repository at this point in the history
The project page of the ContextAwareSaliency model seems to be
gone. I contacted the authors for an updated download link,
for the time being I'm using a webarchive link that still
contains the model code.

Signed-off-by: Matthias Kümmerer <[email protected]>
  • Loading branch information
matthias-k committed Jun 20, 2024
1 parent 4e69a51 commit 662103c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ test: cython
prepublish:
./run-docker.sh rm -rf dist
./run-docker.sh bash build.sh
twine upload dist/pysaliency*.tar.gz -r testpypi
twine upload --repository=pysaliency-test dist/pysaliency*.tar.gz # assumes that ~/.pypirc defines a pysaliency-test entry, see https://test.pypi.org/manage/account/token/
# twine upload dist/pysaliency*.tar.gz -r testpypi


publish:
./run-docker.sh rm -rf dist
./run-docker.sh bash build.sh
twine upload dist/pysaliency*.tar.gz
twine upload --repository=pysaliency dist/pysaliency*.tar.gz

8 changes: 7 additions & 1 deletion pysaliency/external_models/matlab_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ class ContextAwareSaliency(ExternalModelMixin, MatlabSaliencyMapModel):
Stas Goferman, Lihi Zelnik-Manor, Ayellet Tal. Context-Aware Saliency Detection [CVPR 2010] [PAMI 2012]
http://webee.technion.ac.il/labs/cgm/Computer-Graphics-Multimedia/Software/Saliency/Saliency.html
(this URL is down as of 2024-06. Ther doesn't seem to be a new version, but you can check an old version
at https://web.archive.org/web/20230106184636/https://cgm.technion.ac.il/Computer-Graphics-Multimedia/Software/Saliency/Saliency.html)
"""
__modelname__ = 'ContextAwareSaliency'

Expand All @@ -124,7 +127,10 @@ def _setup(self):
with TemporaryDirectory() as temp_dir:
if not os.path.isdir(temp_dir):
os.makedirs(self.location)
download_and_check('http://webee.technion.ac.il/labs/cgm/Computer-Graphics-Multimedia/Software/Saliency/Saliency.zip',
# url = 'http://webee.technion.ac.il/labs/cgm/Computer-Graphics-Multimedia/Software/Saliency/Saliency.zip'
# The original URL is not available anymore. We use the webarchive version
url = 'https://web.archive.org/web/20230106184636/https://cgm.technion.ac.il/Computer-Graphics-Multimedia/Software/Saliency/Saliency.zip'
download_and_check(url,
os.path.join(temp_dir, 'Saliency.zip'),
'c3c6768ef26e95def76000f51e8aad7c')

Expand Down

0 comments on commit 662103c

Please sign in to comment.