Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

targetran

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

targetran - npm Package Compare versions

Comparing version
0.10.4
to
0.11.7
+5
-3
PKG-INFO
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 @@

@@ -337,3 +337,4 @@ ![logo](logo/targetran_logo.png)

.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 @@

@@ -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