This is an implementation of the Boolean Map Saliency algorithm, by Jianming Zhang and Stan Sclaroff, with slight modifications. You can read the paper here: http://cs-people.bu.edu/jmzhang/BMS/BMS_iccv13_preprint.pdf.
- Python >= 2.7
- OpenCV >= 2.4 (with Python bindings)
python saliency.py -i <image_path>
This will output a saliency image in the same directory as the input image.
Upper two images are apple by Valdemar Fishmen and Golden Gate Bridge with Reflections by Louis Raphael. Originals are on the left, while full-resolution saliency results are on the right.
The algorithm works for more than just natural images. Here's a saliency example on fan artwork from /r/Overwatch (credit goes to GreenTaldarin):