code-loader 0.2.55__py3-none-any.whl → 0.2.56__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- code_loader/helpers/detection/yolo/utils.py +3 -4
- {code_loader-0.2.55.dist-info → code_loader-0.2.56.dist-info}/METADATA +1 -1
- {code_loader-0.2.55.dist-info → code_loader-0.2.56.dist-info}/RECORD +5 -5
- {code_loader-0.2.55.dist-info → code_loader-0.2.56.dist-info}/LICENSE +0 -0
- {code_loader-0.2.55.dist-info → code_loader-0.2.56.dist-info}/WHEEL +0 -0
@@ -1,5 +1,4 @@
|
|
1
1
|
from typing import Tuple, List, Union
|
2
|
-
import collections.abc
|
3
2
|
import numpy as np
|
4
3
|
import tensorflow as tf # type: ignore
|
5
4
|
from numpy.typing import NDArray
|
@@ -56,10 +55,10 @@ def scale_loc_prediction(loc_pred: List[tf.Tensor], decoded: bool = False, image
|
|
56
55
|
strides: Tuple[int, int, int] = (8, 16, 32)) -> \
|
57
56
|
List[tf.Tensor]:
|
58
57
|
new_loc_pred = [None] * len(loc_pred)
|
59
|
-
if
|
60
|
-
scale_arr: NDArray[np.float32] = np.array([image_size, image_size, image_size, image_size])
|
58
|
+
if isinstance(image_size, int) or isinstance(image_size, float):
|
59
|
+
scale_arr: NDArray[np.float32] = np.array([image_size, image_size, image_size, image_size], dtype=np.float32)
|
61
60
|
else:
|
62
|
-
scale_arr = np.array([*image_size[::-1], *image_size[::-1]])
|
61
|
+
scale_arr = np.array([*image_size[::-1], *image_size[::-1]], dtype=np.float32)
|
63
62
|
if decoded:
|
64
63
|
new_loc_pred = [loc / scale_arr for loc in loc_pred]
|
65
64
|
else:
|
@@ -13,7 +13,7 @@ code_loader/helpers/detection/yolo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
13
13
|
code_loader/helpers/detection/yolo/decoder.py,sha256=EsjebDBya53BXtth3vCwLNAlCVwpaTpG0n8oUB2AJOg,6398
|
14
14
|
code_loader/helpers/detection/yolo/grid.py,sha256=xcsHh7P10_PrEavvJm1JAraxteQujqN42RfMP5nYrts,3132
|
15
15
|
code_loader/helpers/detection/yolo/loss.py,sha256=DxFv2mkm0w7M1yFKTrYUpnYk0RqDxXiHR1MoFEWtRhk,6959
|
16
|
-
code_loader/helpers/detection/yolo/utils.py,sha256=
|
16
|
+
code_loader/helpers/detection/yolo/utils.py,sha256=eV9-IZhglRNGud1UmSckIuA49WRKJitDQhPKK7iIaBc,6563
|
17
17
|
code_loader/leap_binder/__init__.py,sha256=Oe7DNj6RmgX-tMruOrI7GYvf3SyAnzOxugF2e117_Z8,93
|
18
18
|
code_loader/leap_binder/leapbinder.py,sha256=TXjLdySIXjujrZrYo3wcF8Q2olYfQ0vschUZ8dHOTLs,6404
|
19
19
|
code_loader/leaploader.py,sha256=StIRy3LOB-V0RtC59E72dTN6-DkFyE10xMYpYdvDwzU,14096
|
@@ -22,7 +22,7 @@ code_loader/metrics/default_metrics.py,sha256=EbRk6LDNgTZXN9Y8dp7wXrbxHR9MVIJcPr
|
|
22
22
|
code_loader/utils.py,sha256=WUcM97OuxrhfLCRPoH9EbXrxajNpYgX1CTMc3_PXtYU,1736
|
23
23
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
24
|
code_loader/visualizers/default_visualizers.py,sha256=HqWx2qfTrroGl2n8Fpmr_4X-rk7tE2oGapjO3gzz4WY,2226
|
25
|
-
code_loader-0.2.
|
26
|
-
code_loader-0.2.
|
27
|
-
code_loader-0.2.
|
28
|
-
code_loader-0.2.
|
25
|
+
code_loader-0.2.56.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
26
|
+
code_loader-0.2.56.dist-info/WHEEL,sha256=vxFmldFsRN_Hx10GDvsdv1wroKq8r5Lzvjp6GZ4OO8c,88
|
27
|
+
code_loader-0.2.56.dist-info/METADATA,sha256=H-pEH32AzYUCKPBpTrUUIan0v8urAxyEmlpSNRmMpIo,874
|
28
|
+
code_loader-0.2.56.dist-info/RECORD,,
|
File without changes
|
File without changes
|