JdeRobot / JdeRobot/PerceptionMetrics

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

Open
#562 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
112
Forks
109
PR merge metrics
No merged PRs in 30d

Description

**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
```python
tensor = resize_image(
method="bilinear",
width=self.model_cfg["resize"].get("width", None),
height=self.model_cfg["resize"].get("height", None),
)
```

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.