From 1055be412b60b597cf6c50f4c6675efdcd6bdd57 Mon Sep 17 00:00:00 2001 From: Yao You Date: Fri, 11 Oct 2024 15:46:51 -0500 Subject: [PATCH] fix: fix probability data type --- CHANGELOG.md | 4 ++++ unstructured_inference/__version__.py | 2 +- unstructured_inference/models/yolox.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c2b466c..2526031e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.40 + +* fix: store probabilities with `float` data type instead of `int` + ## 0.7.39 * fix: Correctly assign mutable default value to variable in `LayoutElements` class diff --git a/unstructured_inference/__version__.py b/unstructured_inference/__version__.py index 52680926..53ea3558 100644 --- a/unstructured_inference/__version__.py +++ b/unstructured_inference/__version__.py @@ -1 +1 @@ -__version__ = "0.7.39" # pragma: no cover +__version__ = "0.7.40" # pragma: no cover diff --git a/unstructured_inference/models/yolox.py b/unstructured_inference/models/yolox.py index 3d39fb3c..031ac2b2 100644 --- a/unstructured_inference/models/yolox.py +++ b/unstructured_inference/models/yolox.py @@ -137,7 +137,7 @@ def image_processing( return LayoutElements( element_coords=sorted_dets[:, :4], - element_probs=sorted_dets[:, 4].astype(int), + element_probs=sorted_dets[:, 4].astype(float), element_class_ids=sorted_dets[:, 5].astype(int), element_class_id_map=self.layout_classes, source=Source.YOLOX,