This is a ready-to-use python file for refine saliency maps using dense CRF. If you want to know more about CRF, you can refer to here.
@article{Saliency-Refinement-DenseCRF,
Author = {Wei Ji},
Title = {The application of the DenseCRF for saliency detection.},
Journal = {https://github.com/jiwei0921/DenseCRF_refine_saliency-map/},
Year = {2019}
}
environment: You need to run conda create -n SOD python=3.7
.
pydensecrf: This package depends on pydensecrf, available via pip install git+https://github.com/lucasb-eyer/pydensecrf.git
.
opencv3: This package depends on cv2, available via pip install opencv-python
.
numpy: This package depends on numpy, available via pip install numpy
.
- put your input (.png) and saliency maps (.png) in images and predictions files, respectively.
- set your input_path, sal_path and output_path in densecrf_sal.py.
- run
python densecrf_sal.py
- then, you can see the fine results in the output file.
- pydensecrf/densecrf/include/Eigen/Core:22:10: fatal error: ‘complex’ file not found
#include
^~~~~~~~~
1 warning and 1 error generated.
Command: conda install -c conda-forge pydensecrf