Skip to content

Commit

Permalink
v0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikWin committed Feb 4, 2025
1 parent 6f98819 commit b1811cd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion vidformer-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vidformer-cli"
version = "0.10.0"
version = "0.11.0"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion vidformer-py/vidformer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [🧑‍💻 Source Code](https://github.com/ixlab/vidformer/tree/main/vidformer-py/)
"""

__version__ = "0.10.1"
__version__ = "0.11.0"


import base64
Expand Down
14 changes: 7 additions & 7 deletions vidformer-py/vidformer/cv2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def set_server(server):
"yuvj420p": "rgb24",
"yuvj422p": "rgb24",
"yuvj444p": "rgb24",
"gray8": "gray8",
"gray": "gray",
}


Expand All @@ -122,7 +122,7 @@ def __init__(self, f, fmt):

def _mut(self):
if self._modified:
assert self._fmt["pix_fmt"] in ["rgb24", "gray8"]
assert self._fmt["pix_fmt"] in ["rgb24", "gray"]
return

self._modified = True
Expand All @@ -133,11 +133,11 @@ def _mut(self):
self._f = _filter_scale(self._f, pix_fmt="rgb24")
self._fmt["pix_fmt"] = "rgb24"
elif (
self._fmt["pix_fmt"] != "gray8"
and _top_level_pix_fmt(self._fmt["pix_fmt"]) == "gray8"
self._fmt["pix_fmt"] != "gray"
and _top_level_pix_fmt(self._fmt["pix_fmt"]) == "gray"
):
self._f = _filter_scale(self._f, pix_fmt="gray8")
self._fmt["pix_fmt"] = "gray8"
self._f = _filter_scale(self._f, pix_fmt="gray")
self._fmt["pix_fmt"] = "gray"

def copy(self):
return Frame(self._f, self._fmt.copy())
Expand Down Expand Up @@ -621,7 +621,7 @@ def zeros(shape, dtype=np.uint8):

height, width, channels = shape
if channels == 1:
pix_fmt = "gray8"
pix_fmt = "gray"
else:
pix_fmt = "rgb24"

Expand Down
2 changes: 1 addition & 1 deletion vidformer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vidformer"
version = "0.10.0"
version = "0.11.0"
description = "Video Data Transformation Library."
authors = ["Dominik Winecki <dominikwinecki@gmail.com>"]
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions viper-den/test_cv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ def test_numpy():
break


def test_numpy_gray8():
def test_numpy_gray():
server = vf.IgniServer(ENDPOINT, API_KEY)
cv2.set_server(server)

img = cv2.zeros((100, 150, 1), dtype=np.uint8)
assert type(img) is cv2.Frame
assert img._fmt["width"] == 150
assert img._fmt["height"] == 100
assert img._fmt["pix_fmt"] == "gray8"
assert img._fmt["pix_fmt"] == "gray"
assert img.shape == (100, 150, 1)

img_numpy = img.numpy()
Expand Down

0 comments on commit b1811cd

Please sign in to comment.