From fd4ea6d487c94de75290c77e3cc8b40744f9f242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Thu, 21 Oct 2021 15:33:49 +0200 Subject: [PATCH] update requirements and docstrings --- depthai_sdk/requirements.txt | 12 +++++------- depthai_sdk/setup.py | 2 +- depthai_sdk/src/depthai_sdk/fps.py | 9 ++++----- requirements.txt | 4 ++++ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/depthai_sdk/requirements.txt b/depthai_sdk/requirements.txt index 61240d643..f9e126ab5 100644 --- a/depthai_sdk/requirements.txt +++ b/depthai_sdk/requirements.txt @@ -1,7 +1,5 @@ -opencv-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l" -opencv-contrib-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l" -opencv-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l" -opencv-contrib-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l" -blobconverter==1.2.2 -pytube==11.0.1 -depthai +opencv-python>4 +opencv-contrib-python>4 +blobconverter>=1.2.2 +pytube>=11.0.1 +depthai>2 diff --git a/depthai_sdk/setup.py b/depthai_sdk/setup.py index 9bd1d6c71..c3e8e45c0 100644 --- a/depthai_sdk/setup.py +++ b/depthai_sdk/setup.py @@ -7,7 +7,7 @@ setup( name='depthai-sdk', - version='1.1.1', + version='1.1.2', description='This package contains convenience classes and functions that help in most common tasks while using DepthAI API', long_description=io.open("README.md", encoding="utf-8").read(), long_description_content_type="text/markdown", diff --git a/depthai_sdk/src/depthai_sdk/fps.py b/depthai_sdk/src/depthai_sdk/fps.py index 8a5e0dd43..37469dc42 100644 --- a/depthai_sdk/src/depthai_sdk/fps.py +++ b/depthai_sdk/src/depthai_sdk/fps.py @@ -19,8 +19,8 @@ class FPSHandler: def __init__(self, cap=None, maxTicks = 100): """ Args: - cap (cv2.VideoCapture): handler to the video file object - maxTicks (int): maximum queue length in tickFps computation + cap (cv2.VideoCapture, Optional): handler to the video file object + maxTicks (int, Optional): maximum ticks amount for FPS calculation """ self._timestamp = None self._start = None @@ -31,9 +31,8 @@ def __init__(self, cap=None, maxTicks = 100): self._ticks = {} if maxTicks < 2: - warnings.warn(f"FPSHandler maxTicks value must be 2 or higher. " - f"It will automatically be set to 2 instead of {maxTicks}") - maxTicks = 2 + raise ValueError(f"Proviced maxTicks value must be 2 or higher (supplied: {maxTicks})") + self._maxTicks = maxTicks def nextIter(self): diff --git a/requirements.txt b/requirements.txt index fca990d9c..2ac6f7f61 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,7 @@ argcomplete==1.12.1 -e ./depthai_sdk --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ depthai==2.10.0.0.dev+7a0749a61597c086c5fd6e579618ae33accec8df +opencv-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l" +opencv-contrib-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l" +opencv-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l" +opencv-contrib-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l" \ No newline at end of file