BMS_v2

所属分类:能源行业(电力石油煤炭)
开发工具:C++
文件大小:2237KB
下载次数:0
上传日期:2016-09-27 05:28:32
上 传 者sh-1993
说明:  显著性检测器BMS_v2的python包装器
(A python wrapper of Saliency detector BMS_v2)

文件列表:
BMS.m (2566, 2016-09-27)
BMS_CODE (0, 2016-09-27)
BMS_CODE\BMS (65603, 2016-09-27)
BMS_CODE\BMS.o (51168, 2016-09-27)
BMS_CODE\CMakeLists.txt (2068, 2016-09-27)
BMS_CODE\main.o (26128, 2016-09-27)
BMS_CODE\makefile (678, 2016-09-27)
BMS_CODE\src (0, 2016-09-27)
BMS_CODE\src\BMS.cpp (5751, 2016-09-27)
BMS_CODE\src\BMS.h (2178, 2016-09-27)
BMS_CODE\src\OS_specific.h (1794, 2016-09-27)
BMS_CODE\src\fileGettor.h (1983, 2016-09-27)
BMS_CODE\src\main.cpp (5284, 2016-09-27)
badimg (0, 2016-09-27)
badimg\5924629699.png (2051, 2016-09-27)
badimg\5924630779.png (2051, 2016-09-27)
badimg\5924642699.png (2051, 2016-09-27)
badimg\5924658195.png (9218, 2016-09-27)
badimg\5924674021.png (2051, 2016-09-27)
badimg\5925181122.png (2051, 2016-09-27)
badimg\5925210706.png (9218, 2016-09-27)
badimg\59388290.png (23960, 2016-09-27)
badimg\59388293.png (54010, 2016-09-27)
badimg\59388306.png (88328, 2016-09-27)
badimg\59388341.png (37518, 2016-09-27)
badimg\59388345.png (73506, 2016-09-27)
bms.py (1547, 2016-09-27)
bms.pyc (900, 2016-09-27)
demo.m (1563, 2016-09-27)
img (0, 2016-09-27)
img\Image_95.bmp (921654, 2016-09-27)
img\Thumbs.db (19456, 2016-09-27)
img\acoustic-guitar-player.jpg (191704, 2016-09-27)
img\det00000001.jpg (931828, 2016-09-27)

# BMS_v2 A simple python wrapper of [Exploiting Surroundedness for Saliency Detection: A Boolean Map Approach](http://cs-people.bu.edu/jmzhang/BMS/BMS.html). We use their source code [version 2](http://cs-people.bu.edu/jmzhang/BMS/down_bms_v2.php?Down=BMS_v2.zip). ## Usage 1. copy execute file `BMS` under `/BMS_CODE` to the same directory of `bms.py`. 2. Store all the image (i.e., jpg, jpeg, JPG, tif, png, bmp) under `rootPath`. Then, simply run the following code: ``` import bms bms.BMS(rootPath, targetPath, fastOrAccu) ``` ## Update Now I add some mistake proof in source codes in order to prevent unknown system crashes. 1. check if an image is readable. I've noticed that if one saves images in wrong extension will cause openCV exception error. 2. show up message if the image is broken/not readable. 3. count the number of images processed. Example: ``` Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import bms >>> bms.BMS('badimg','out') Could not open or find image 5924658195.png >>> bms.BMS('img','out') Average_time: 0.0229997 over 3 images. ``` ## Time I ran all three images under `/img` with current configuration, and it only cost `average_time: 0.0229997` seconds(about 43.48 fps) on my computer. And more evaluation on time cost is TBA. ## Modify the configuration If you want faster computation time, all you need to do is set `fastOrAccu` to 0. Even further, you can increase the `sample_step_size` or decrease the `max_dim`. Or ultimately, you can dig into their source code and compile your own version. ## Citation Jianming Zhang and Stan Sclaroff. "Exploiting Surroundedness for Saliency Detection: A Boolean Map Approach.'' IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2015. [PDF](http://cs-people.bu.edu/jmzhang/BMS/BMS_PAMI_preprint.pdf)

近期下载者

相关文件


收藏者