Skip to content

Replace deprecated SimilarityTransform.estimate() with SimilarityTransform.from_estimate() #2876

Description

@tommycarstensen

scikit-image 0.26 deprecated SimilarityTransform.estimate() in favor of the SimilarityTransform.from_estimate() class constructor (scikit-image#7771). It will be removed in scikit-image 2.2.

This produces a FutureWarning on every face alignment call:

insightface/utils/face_align.py:23: FutureWarning: `estimate` is deprecated since version 0.26
and will be removed in version 2.2. Please use `SimilarityTransform.from_estimate` class
constructor instead.

The fix is a one-liner in insightface/utils/face_align.py:

# Before
tform = SimilarityTransform()
tform.estimate(dst, src)

# After
tform = SimilarityTransform.from_estimate(dst, src)

Environment: insightface 0.7.3, scikit-image 0.26.0, Python 3.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions