From b094a31b150cd518bb5acd75e9bf036cf4d13e84 Mon Sep 17 00:00:00 2001 From: Gianluca Rossi Date: Wed, 3 Apr 2024 16:46:46 -0400 Subject: [PATCH] fix: correct type hint --- blazingai/vision/boxes.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blazingai/vision/boxes.py b/blazingai/vision/boxes.py index 615b8d3..bd23151 100644 --- a/blazingai/vision/boxes.py +++ b/blazingai/vision/boxes.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 7ecf4c3..7386f99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [