Upgrading scikit-image 0.15 to 0.16
Breaking0.15.0 → 0.16.2Breaking11Platform2Deprecated11New13Changed22Fixed42Other95
BreakingUpgrade verdict
11 breaking changes and 2 platform requirement changes.
In plain terms
- The old novice module is gone; code importing it will fail.
- Several image resizing and pyramid functions now treat images as single-channel by default, and they no longer try to guess whether a 3D array is a color image.
- The old misspelled option for drawing HOG features is gone; use the correctly spelled one.
- The seam carving feature has been taken out of the package for licensing reasons.
Must act Top 5 of 24 that need code or config changes
Python requirement changed in 0.16.1: >=3.5 → >=3.6.
What you must change
Breaking11
Removes the deprecated skimage.novice subpackage.
skimage.noviceDefault value of multichannel parameters is now False in rescale, pyramid_reduce, pyramid_laplacian, pyramid_gaussian, and pyramid_expand; 3D arrays are no longer guessed.
skimage.transform.rescaleskimage.transform.pyramid_reduceskimage.transform.pyramid_laplacianskimage.transform.pyramid_gaussianskimage.transform.pyramid_expandmultichannelRemoves the deprecated visualise argument from skimage.feature.hog; use visualize instead.
skimage.feature.hogvisualisevisualizeRemoves skimage.transform.seam_carve from the library due to licensing restrictions.
skimage.transform.seam_carveRemoves the as_grey parameter from skimage.data.load and skimage.io.imread; use as_gray instead.
skimage.data.loadskimage.io.imreadas_greyas_grayRemoves the min_size parameter from skimage.morphology.remove_small_holes; use area_threshold instead.
skimage.morphology.remove_small_holesmin_sizearea_thresholdRemoves the deprecated correct_mesh_orientation function from skimage.measure.
skimage.measure.correct_mesh_orientationskimage.measure._regionprops now uses row-column coordinates exclusively; the old x-y interface is no longer available.
skimage.measure._regionpropsRemoves the flatten parameter from skimage.io.imread in favor of as_gray.
skimage.io.imreadflattenas_grayRemoves the Hxx, Hxy, Hyy parameters from skimage.feature.corner.hessian_matrix_eigvals in favor of H_elems.
skimage.feature.corner.hessian_matrix_eigvalsHxxHxyHyyH_elemsUnifies the skeletonize and skeletonize 3D APIs.
skeletonizeskeletonize_3dPlatform2
Drops support for Python 3.5 and officially supports Python 3.6 and 3.7, following NEP 29.
Drops Python 3.5 support.
Deprecations to plan for
Deprecated11
Deprecates the neighbors parameter in skimage.measure.convex_hull_object in favor of connectivity; removal in 0.18.0.
skimage.measure.convex_hull_objectneighborsconnectivityDeprecates skimage.measure.compare_mse, compare_nrmse, compare_psnr and compare_ssim in favor of the skimage.metrics module.
skimage.measure.compare_mseskimage.measure.compare_nrmseskimage.measure.compare_psnrskimage.measure.compare_ssimskimage.metricsDeprecates skimage.color.guess_spatial_dimensions; it will be removed in 0.18.
skimage.color.guess_spatial_dimensionsDeprecates the bc argument in skimage.segmentation.active_contour.
skimage.segmentation.active_contourbcDeprecates skimage.data.load; it will be removed in 0.18.
skimage.data.loadDeprecates skimage.transform.match_histogram in favor of skimage.exposure.match_histogram.
skimage.transform.match_histogramskimage.exposure.match_histogramDeprecates the neighbors parameter of skimage.morphology.convex_hull_object.
skimage.morphology.convex_hull_objectneighborsDeprecates skimage.transform.randon_tranform's integer-to-float conversion default; set preserve_range to True to keep current behaviour.
skimage.transform.randon_tranformpreserve_rangeAddresses deprecations for the 0.16 release.
Followup deprecations for 0.16.
Adds a warning for future dtype kwarg removal.
dtypeAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
function load(f, as_gray=…, as_grey=…) → function load(f, as_gray=…) - added:
function brick() - added:
function cell() - added:
function colorwheel() - added:
function grass() - added:
function gravel() - added:
function rough_wall() - added:
function shepp_logan_phantom()
- added:
export line_nd - added:
export polygon2mask
- added:
function line_nd(start, stop, *, endpoint=…, integer=…)
- added:
export match_histograms
- added:
function match_histograms(image, reference, *, multichannel=…)
- changed:
function hessian_matrix_eigvals(H_elems, Hxy=…, Hyy=…, Hxx=…) → function hessian_matrix_eigvals(H_elems)
- removed:
variable next_fast_len
- added:
export threshold_multiotsu
- added:
function farid(image, *, mask=…) - added:
function farid_h(image, *, mask=…) - added:
function farid_v(image, *, mask=…) - added:
variable HFARID_WEIGHTS - added:
variable VFARID_WEIGHTS - added:
variable d1 - added:
variable p
- added:
export majority
- changed:
function threshold_li(image, *, tolerance=…) → function threshold_li(image, *, tolerance=…, initial_guess=…, iter_callback=…) - added:
function threshold_multiotsu(image, classes=…, nbins=…)
- removed:
export correct_mesh_orientation - added:
export inertia_tensor - added:
export inertia_tensor_eigvals - added:
export regionprops_table
- changed:
function ransac(data, model_class, min_samples, residual_threshold, is_data_valid=…, is_model_valid=…, max_trials=…, stop_sample_num=…, stop_residuals_sum=…, stop_probability=…, random_state=…) → function ransac(data, model_class, min_samples, residual_threshold, is_data_valid=…, is_model_valid=…, max_trials=…, stop_sample_num=…, stop_residuals_sum=…, stop_probability=…, random_state=…, initial_inliers=…)
- added:
export adapted_rand_error - added:
export contingency_table - added:
export mean_squared_error - added:
export normalized_root_mse - added:
export peak_signal_noise_ratio - added:
export structural_similarity - added:
export variation_of_information
- added:
function mean_squared_error(image0, image1) - added:
function normalized_root_mse(image_true, image_test, *, normalization=…) - added:
function peak_signal_noise_ratio(image_true, image_test, *, data_range=…)
- changed:
function convex_hull_object(image, neighbors=…) → function convex_hull_object(image, neighbors=…, *, connectivity=…)
- changed:
function remove_small_holes(ar, area_threshold=…, connectivity=…, in_place=…, min_size=…) → function remove_small_holes(ar, area_threshold=…, connectivity=…, in_place=…)
- removed:
export Picture - removed:
export color_dict - removed:
export colors - removed:
export open
- added:
export optical_flow_tvl1
- changed:
function active_contour(image, snake, alpha=…, beta=…, w_line=…, w_edge=…, gamma=…, bc=…, max_px_move=…, max_iterations=…, convergence=…) → function active_contour(image, snake, alpha=…, beta=…, w_line=…, w_edge=…, gamma=…, bc=…, max_px_move=…, max_iterations=…, convergence=…, *, boundary_condition=…, coordinates=…)
- removed:
export seam_carve - added:
export warp_polar
- changed:
function radon(image, theta=…, circle=…) → function radon(image, theta=…, circle=…, *, preserve_range=…)
- removed:
function seam_carve(*args, **kwargs)
- added:
export compare_images
- added:
function compare_images(image1, image2, method=…, *, n_tiles=…)