JdeRobot / JdeRobot/PerceptionMetrics
resize_image missing image argument in tf_segmentation.py causes TypeError at runtime
- 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
Assessment
This issue has not been assessed yet.