Commit c0e5e3d3 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Merge branch 'enhancement/fix_ssim_deprecationwarning' into 'master'

Fixed DeprecationWarning related to skimage.measure.compare_ssim. Added...

See merge request !20
parents 2cdc7959 ba921059
Pipeline #11601 canceled with stages
in 32 minutes and 23 seconds
......@@ -2,7 +2,13 @@
History
=======
0.14.31 (2020-08-17)
0.14.32 (2020-08-18)
--------------------
* Fixed DeprecationWarning related to skimage.measure.compare_ssim. Added minimal version of scikit-image.
0.14.31 (2020-08-18)
--------------------
* Moved skimage import to functional level to avoid static TLS import error.
......
......@@ -36,10 +36,13 @@ def calc_ssim(image0, image1, dynamic_range=None, win_size=None, gaussian_weight
:param gaussian_weights:
:return:
"""
from skimage.measure import compare_ssim as ssim # import here to avoid static TLS import error
from skimage.metrics import structural_similarity as ssim # import here to avoid static TLS import error
if image0.dtype != image1.dtype:
image0 = image0.astype(np.int16)
image1 = image1.astype(np.int16)
return ssim(image0, image1, data_range=dynamic_range, win_size=win_size, gaussian_weights=gaussian_weights)
return ssim(image0, image1,
data_range=dynamic_range,
win_size=win_size,
gaussian_weights=gaussian_weights)
......@@ -19,5 +19,5 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '0.14.31'
__versionalias__ = '20200818_01'
__version__ = '0.14.32'
__versionalias__ = '20200818_02'
......@@ -3,7 +3,7 @@ kealib # fix for libkea.so.1.4.7: cannot open shared object file: No such file
numpy
shapely
six
scikit-image
scikit-image>=0.16.0
pandas
geopandas
pyproj
......
......@@ -36,7 +36,8 @@ version = {}
with open("py_tools_ds/version.py") as version_file:
exec(version_file.read(), version)
requirements = ['gdal>=2.1.0', 'numpy', 'shapely', 'six', 'pandas', 'scikit-image', 'geopandas', 'pyproj', 'spectral']
requirements = ['gdal>=2.1.0', 'numpy', 'shapely', 'six', 'pandas', 'scikit-image>=0.16.0', 'geopandas', 'pyproj',
'spectral']
setup_requirements = [] # TODO(danschef): put setup requirements (distutils extensions, etc.) here
test_requirements = requirements + ["coverage", "nose", "nose2", "nose-htmloutput", "rednose"]
......
......@@ -11,7 +11,7 @@ dependencies:
- conda-forge::libgdal # force to use conda-forge for libgdal to avoid package version incompatiblies due to mixed channels (libkea.so.1.4.7: cannot open shared object file: No such file or directory)
# - kealib # fix for libkea.so.1.4.7: cannot open shared object file: No such file or directory (not needed as long as libgdal and gdal are conda-forge packages)
- pyproj
- scikit-image
- scikit-image>=0.16.0
- geopandas
- pip:
- sphinx-argparse
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment