This repository contains the source code for the method described in
@article{mukherjee2017salprop, title={SalProp: Salient object proposals via aggregated edge cues}, author={Mukherjee, Prerana and Lall, Brejesh and Tandon, Sarvaswa}, journal={arXiv preprint arXiv:1706.04472}, year={2017} }
The system is implemented in MATLAB and Python.
To use this software, you need to have the following in the salprop-v1.0 directory:
- Piotr Dollar's very useful [Image & Video Matlab Toolbox] https://pdollar.github.io/toolbox/
- Oriented Edge Forests [oef-master] https://github.com/samhallman/oef
-
Add the directory "salprop-v1.0" to path
-
Run the demo file
salprop-v1.0 is the folder which will be downloaded from this github repository.
-
Place the required image file in the "salprop-v1.0/Evaluation Tools" folder by the name "demoImg.jpg"
-
Place a .mat file containing the ground truth object proposals for the image in the same folder by the name "ground_truth.mat"
- Store it in a variable named "gtBoxes" in the .mat file
- Format of ground truth boxes : [cmin,rmin,cmax,rmax] NOTE: If a ground truth file is not provided, top 1000 proposals are returned in a variable named "boxes"
-
Add the directory "salprop-v1.0" to path
-
Run the demo file
-
Also add the .mat file from [oef-master]/cache/forest/modelCvpr.mat in the folder salprop-v1.0/Model Files/
-
Add the directory salprop-v1.0 to path
-
Change the paths in the following files to the path of the salprop-v1.0 directory for eg. /home/username/Desktop/salprop-v1.0/
- File 1: loadparams - line 5
-
Change the paths in the following files to the path of the matpy directory for eg. /home/username/Desktop/salprop-v1.0/matpy/
- File 1: Python Scripts/computeTextureMap.py - line 7
- File 2: Pyhton Scripts/genWindows.py - line 9
- File 3: Python Scripts/predict.py - line 8
- File 4: Pyhton Scripts/score.py - line 151
-
Load parameters by running the initialize script as follows params = initialize;
-
Run SalProp on an image (img) using the following syntax: boxes = salprop(img,params)
NOTE: Top 1000 boxes are returned Tune the tightness parameter in loadparams (params.boxes.tightness) to tune the quality of the boxes. Value remains between 0 and 1. Higher the value, tighter would be the box. As value increases, chances of finding the object reduces. For best results, keep the value as 0.5, 0.6 or 0.7.