targetran
Advanced tools
+5
-3
| Metadata-Version: 2.1 | ||
| Name: targetran | ||
| Version: 0.10.4 | ||
| Version: 0.11.7 | ||
| Summary: Target transformation for data augmentation in objection detection | ||
@@ -11,3 +11,3 @@ Home-page: https://github.com/bhky/targetran | ||
| Classifier: Operating System :: OS Independent | ||
| Requires-Python: >=3.7 | ||
| Requires-Python: >=3.8 | ||
| Description-Content-Type: text/markdown | ||
@@ -352,3 +352,4 @@ License-File: LICENSE | ||
| .map(image_only(affine_transform)) \ | ||
| .map(image_only(TFResize((256, 256)))) | ||
| .map(image_only(TFResize((256, 256)))) \ | ||
| .batch(32) # Conventional batching can be used for classification setup. | ||
| ``` | ||
@@ -363,2 +364,3 @@ ```python | ||
| ds = PTDataset(..., transforms=transforms) | ||
| data_loader = DataLoader(ds, batch_size=32) | ||
| ``` | ||
@@ -365,0 +367,0 @@ |
+3
-1
@@ -337,3 +337,4 @@  | ||
| .map(image_only(affine_transform)) \ | ||
| .map(image_only(TFResize((256, 256)))) | ||
| .map(image_only(TFResize((256, 256)))) \ | ||
| .batch(32) # Conventional batching can be used for classification setup. | ||
| ``` | ||
@@ -348,2 +349,3 @@ ```python | ||
| ds = PTDataset(..., transforms=transforms) | ||
| data_loader = DataLoader(ds, batch_size=32) | ||
| ``` | ||
@@ -350,0 +352,0 @@ |
+2
-2
@@ -17,6 +17,6 @@ [metadata] | ||
| packages = find: | ||
| python_requires = >=3.7 | ||
| python_requires = >=3.8 | ||
| install_requires = | ||
| opencv-python | ||
| numpy>=1.21.0 | ||
| numpy>=1.22.0 | ||
@@ -23,0 +23,0 @@ [options.package_data] |
| Metadata-Version: 2.1 | ||
| Name: targetran | ||
| Version: 0.10.4 | ||
| Version: 0.11.7 | ||
| Summary: Target transformation for data augmentation in objection detection | ||
@@ -11,3 +11,3 @@ Home-page: https://github.com/bhky/targetran | ||
| Classifier: Operating System :: OS Independent | ||
| Requires-Python: >=3.7 | ||
| Requires-Python: >=3.8 | ||
| Description-Content-Type: text/markdown | ||
@@ -352,3 +352,4 @@ License-File: LICENSE | ||
| .map(image_only(affine_transform)) \ | ||
| .map(image_only(TFResize((256, 256)))) | ||
| .map(image_only(TFResize((256, 256)))) \ | ||
| .batch(32) # Conventional batching can be used for classification setup. | ||
| ``` | ||
@@ -363,2 +364,3 @@ ```python | ||
| ds = PTDataset(..., transforms=transforms) | ||
| data_loader = DataLoader(ds, batch_size=32) | ||
| ``` | ||
@@ -365,0 +367,0 @@ |
| opencv-python | ||
| numpy>=1.21.0 | ||
| numpy>=1.22.0 |
@@ -1,3 +0,3 @@ | ||
| __version__ = "0.10.4" | ||
| __version__ = "0.11.7" | ||
| __author__ = "Bosco Yung" | ||
| __license__ = "MIT" |
@@ -25,3 +25,3 @@ """ | ||
| def _np_range(start: int, end: int, step: int) -> NDIntArray: | ||
| return np.arange(start, end, step, dtype=np.int32) # type: ignore | ||
| return np.arange(start, end, step, dtype=np.int32) | ||
@@ -34,7 +34,7 @@ | ||
| def _np_round_to_int(x: NDAnyArray) -> NDIntArray: | ||
| return np.rint(x.astype(dtype=np.float32)).astype(dtype=np.int32) # type: ignore | ||
| return np.rint(x.astype(dtype=np.float32)).astype(dtype=np.int32) | ||
| def _np_logical_and(x: NDBoolArray, y: NDBoolArray) -> NDBoolArray: | ||
| return np.logical_and(x, y) # type: ignore | ||
| return np.logical_and(x, y) | ||
@@ -54,3 +54,3 @@ | ||
| ) | ||
| return np.pad(image, pad_width=pad_width, constant_values=0) # type: ignore | ||
| return np.pad(image, pad_width=pad_width, constant_values=0) | ||
@@ -57,0 +57,0 @@ |
@@ -52,3 +52,3 @@ """ | ||
| _np_pad_image, _np_range, _np_cast_to_int, _np_round_to_int, np.repeat, | ||
| np.tile, | ||
| np.tile, # type: ignore | ||
| np.ones_like, np.stack, np.concatenate, np.matmul, | ||
@@ -264,3 +264,3 @@ np.clip, np.floor, np.ceil, _np_gather_image, | ||
| self._interpolation = interpolation | ||
| self._identity_mat = np.expand_dims(np.array([ # type: ignore | ||
| self._identity_mat = np.expand_dims(np.array([ | ||
| [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0] | ||
@@ -289,6 +289,6 @@ ]), axis=0) | ||
| conditions = np.reshape(rand_fn() < probs, (len(probs), 1, 1)) | ||
| image_dest_tran_mats = np.where( | ||
| image_dest_tran_mats = np.where( # type: ignore | ||
| conditions, image_dest_tran_mats, self._identity_mat | ||
| ) | ||
| bboxes_tran_mats = np.where( | ||
| bboxes_tran_mats = np.where( # type: ignore | ||
| conditions, bboxes_tran_mats, self._identity_mat | ||
@@ -295,0 +295,0 @@ ) |
@@ -254,3 +254,3 @@ """ | ||
| self._rng = tf.random.Generator.from_seed( | ||
| seed if seed is not None else np.random.randint(1e6) | ||
| seed if seed is not None else np.random.randint(1e6) # type: ignore | ||
| ) | ||
@@ -257,0 +257,0 @@ self.name = name |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
113352
0.32%