Skip to content

Commit

Permalink
fix: fix probability data type (#391)
Browse files Browse the repository at this point in the history
This PR fixes the data type for probabilities from int to float.
  • Loading branch information
badGarnet authored Oct 11, 2024
1 parent e411862 commit 4431fe5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion unstructured_inference/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.39" # pragma: no cover
__version__ = "0.7.40" # pragma: no cover
2 changes: 1 addition & 1 deletion unstructured_inference/models/yolox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4431fe5

Please sign in to comment.