Skip to content

resize_image missing image argument in tf_segmentation.py causes TypeError at runtime #562

Description

@Harshavardhan-Raju

File: perceptionmetrics/models/tf_segmentation.py
Line: 275–278

Description

In the t_in closure, resize_image() is called without passing the tensor
(image) as the first positional argument. This causes a TypeError at runtime
whenever TF segmentation inference is run with resizing enabled.

Bug

tensor = resize_image(
    method="bilinear",
    width=self.model_cfg["resize"].get("width", None),
    height=self.model_cfg["resize"].get("height", None),
)

Fix

tensor = resize_image(
    tensor,
    method="bilinear",
    width=self.model_cfg["resize"].get("width", None),
    height=self.model_cfg["resize"].get("height", None),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions