code-loader 0.2.66__py3-none-any.whl → 0.2.67__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.
@@ -165,13 +165,13 @@ class YoloLoss:
165
165
  gj: List[torch.Tensor], gi: List[torch.Tensor],
166
166
  target: List[torch.Tensor]) -> Tuple[tf.Tensor, tf.Tensor]:
167
167
  # temp
168
+ assert self.anchors is not None
168
169
  gt_class = tf.ones((batch_size,
169
170
  self.anchors.shape[1], *self.feature_maps[i]), dtype=tf.int32) * self.background_label
170
171
  if len(b[i]) > 0:
171
172
  gt_class = tf.tensor_scatter_nd_update(gt_class, torch.stack([b[i], a[i], gj[i], gi[i]]).T.numpy(),
172
173
  target[i][:, 1])
173
174
  conf_t_tensor = tf.reshape(gt_class, [gt_class.shape[0], -1])
174
- assert self.anchors is not None
175
175
  gt_loc = tf.zeros((batch_size, len(self.anchors[i]), *self.feature_maps[i], 4), dtype=tf.float32)
176
176
  if len(b[i]) > 0:
177
177
  gt_loc = tf.tensor_scatter_nd_update(gt_loc, torch.stack([b[i], a[i], gj[i], gi[i]]).T.numpy(),
@@ -181,6 +181,7 @@ class YoloLoss:
181
181
 
182
182
  def get_yolo_match(self, batch_size: int, y_true: tf.Tensor, loc_data: List[tf.Tensor], conf_data: List[tf.Tensor]) \
183
183
  -> Tuple[List[torch.Tensor], ...]:
184
+ assert self.anchors is not None
184
185
  yolo_targets: List[NDArray[np.float32]] = []
185
186
  scales_num = len(loc_data)
186
187
  for i in range(batch_size):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: code-loader
3
- Version: 0.2.66
3
+ Version: 0.2.67
4
4
  Summary:
5
5
  Home-page: https://github.com/tensorleap/code-loader
6
6
  License: MIT
@@ -12,7 +12,7 @@ code_loader/helpers/detection/utils.py,sha256=TCoprd1jOFQOu5hgYlKyIMWKJFirKCOivX
12
12
  code_loader/helpers/detection/yolo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
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
- code_loader/helpers/detection/yolo/loss.py,sha256=t-nSt4Gznyj5d-nZIQDnpTMuRXXbqOa7oB4QmvjSm_E,11035
15
+ code_loader/helpers/detection/yolo/loss.py,sha256=l-bzJ1Ysy40VZPTqosRIFF93ROVuxbUgP_2deqTuIXM,11075
16
16
  code_loader/helpers/detection/yolo/pytorch_utils.py,sha256=RuB9tt13fIKuuGXoaTLOmfA1DqwUubFa_I2vQLnUl0w,10454
17
17
  code_loader/helpers/detection/yolo/utils.py,sha256=eV9-IZhglRNGud1UmSckIuA49WRKJitDQhPKK7iIaBc,6563
18
18
  code_loader/leap_binder/__init__.py,sha256=Oe7DNj6RmgX-tMruOrI7GYvf3SyAnzOxugF2e117_Z8,93
@@ -23,7 +23,7 @@ code_loader/metrics/default_metrics.py,sha256=xtvTskR7LC5pyKSlFcvlyBpFY9TSXNGVAi
23
23
  code_loader/utils.py,sha256=WUcM97OuxrhfLCRPoH9EbXrxajNpYgX1CTMc3_PXtYU,1736
24
24
  code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  code_loader/visualizers/default_visualizers.py,sha256=HqWx2qfTrroGl2n8Fpmr_4X-rk7tE2oGapjO3gzz4WY,2226
26
- code_loader-0.2.66.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
27
- code_loader-0.2.66.dist-info/METADATA,sha256=Fdf2fYsP0Ap9tkgrIKqGxYBI6CnU52cPsClqEMsZZ1Y,876
28
- code_loader-0.2.66.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
29
- code_loader-0.2.66.dist-info/RECORD,,
26
+ code_loader-0.2.67.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
27
+ code_loader-0.2.67.dist-info/METADATA,sha256=ON0YBoKYr21CrnyF1h34jPWpSZcHBMS5VVjprZ34DvY,876
28
+ code_loader-0.2.67.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
29
+ code_loader-0.2.67.dist-info/RECORD,,