Skip to content

replacing deprecated imresize #103

@cxrodgers

Description

@cxrodgers

In scipy v1.3, the scipy.misc.imread and scipy.misc.imresize functions are no longer available. These are used throughout this package, especially in loading data in pose_dataset.py.

There's an easy replacement for imread : imageio.imread

For imresize, there are several choices:

  • scipy.ndimage.zoom
  • skimage.transform.resize
  • PIL.Image.resize

These differ slightly in their implementation details (e.g., type of interpolation, anti-aliasing filters). Any preferences for which would be best?

My feeling is that scipy.ndimage.zoom is the best because it doesn't require adding a dependency (skimage or PIL). Also, the function signature is the same as the old scipy.misc.imresize, so it's a drop-in replacement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions