Skip to content

Commit

Permalink
fix: correct type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
IamGianluca committed Apr 3, 2024
1 parent f780926 commit b094a31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blazingai/vision/boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def _boxes_json2array(
return result


def _boxes_coco2pascalvoc(boxes: List[torch.Tensor]) -> List[torch.Tensor]:
def _boxes_coco2pascalvoc(boxes: torch.Tensor) -> torch.Tensor:
"""[x_min, y_min, width, height] -> [x_min, y_min, x_max, y_max]"""
boxes[:, 2:] = boxes[:, :2] + boxes[:, 2:]
return boxes


def _boxes_pascalvoc2coco(boxes: List[torch.Tensor]) -> List[torch.Tensor]:
def _boxes_pascalvoc2coco(boxes: torch.Tensor) -> torch.Tensor:
"""[x_min, y_min, x_max, y_max] -> [x_min, y_min, width, height]"""
boxes[:, 2:] = boxes[:, 2:] - boxes[:, :2]
return boxes
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[project]
requires-python = ">=3.8"
name = "blazingai"
version = "2.0.0"
description = "A framework to accelerate AI development"
authors = [{name= "Gianluca Rossi" , email= "gr.gianlucarossi@gmail.com" }]
requires-python = ">=3.8"
license = {file = "LICENSE"}
readme = "README.md"
dependencies = [
Expand Down

0 comments on commit b094a31

Please sign in to comment.