Compare commits

..

No commits in common. "d4f8a1257750a117184b7642fb7007b273afe0d6" and "c6f955a50c5376b3b24bc25cde4428c21064bdbf" have entirely different histories.

5 changed files with 1441 additions and 1401 deletions

View File

@ -1,4 +1,4 @@
FROM docker.io/library/python:3.11-slim as base
FROM docker.io/library/python:3.10-slim as base
# Configure piwheels repo to use pre-compiled numpy wheels for arm
RUN echo -n "[global]\n" > /etc/pip.conf &&\
@ -19,7 +19,7 @@ RUN blobconverter --zoo-name mobile_object_localizer_192x192 --zoo-type depthai
FROM base as builder
RUN apt-get install -y git && \
pip3 install poetry && \
pip3 install poetry==1.2.0 && \
poetry self add "poetry-dynamic-versioning[plugin]"
ADD poetry.lock .

View File

@ -10,7 +10,7 @@ import typing, types
import depthai as dai
import paho.mqtt.client as mqtt
from camera import oak_pipeline as cam
from . import depthai as cam # pylint: disable=reimported
logger = logging.getLogger(__name__)
@ -45,10 +45,6 @@ def _parse_args_cli() -> argparse.Namespace:
help="threshold to filter detected objects",
type=float,
default=_get_env_float_value("OBJECTS_THRESHOLD", 0.2))
parser.add_argument("-f", "--camera-fps",
help="set rate at which camera should produce frames",
type=int,
default=30)
parser.add_argument("-H", "--image-height", help="image height",
type=int,
default=_get_env_int_value("IMAGE_HEIGHT", 120))
@ -105,7 +101,6 @@ def execute_from_command_line() -> None:
camera=cam.CameraSource(pipeline=pipeline,
img_width=args.image_width,
img_height=args.image_height,
fps=args.camera_fps,
))
def sigterm_handler(signum: int, frame: typing.Optional[

View File

@ -196,7 +196,7 @@ class ObjectDetectionNN:
class CameraSource(Source):
"""Image source based on camera preview"""
def __init__(self, pipeline: dai.Pipeline, img_width: int, img_height: int, fps: int):
def __init__(self, pipeline: dai.Pipeline, img_width: int, img_height: int):
self._cam_rgb = pipeline.createColorCamera()
self._xout_rgb = pipeline.createXLinkOut()
self._xout_rgb.setStreamName("rgb")
@ -206,7 +206,7 @@ class CameraSource(Source):
self._cam_rgb.setPreviewSize(width=img_width, height=img_height)
self._cam_rgb.setInterleaved(False)
self._cam_rgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.RGB)
self._cam_rgb.setFps(fps)
self._cam_rgb.setFps(30)
# link camera preview to output
self._cam_rgb.preview.link(self._xout_rgb.input)

2817
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,14 +9,15 @@ packages = [
]
[tool.poetry.dependencies]
python = "^3.11"
python = "^3.10"
paho-mqtt = "^1.6.1"
depthai = "^2.22.0"
depthai = "^2.19.0"
protobuf3 = "^0.2.1"
google = "^3.0.0"
blobconverter = "^1.3.0"
protobuf = "^4.21.8"
opencv-python-headless = "^4.6.0.66"
robocar-protobuf = {version = "^1.3.0", source = "robocar"}
robocar-protobuf = {version = "^1.1.2", source = "robocar"}
[tool.poetry.group.test.dependencies]
@ -34,7 +35,8 @@ types-protobuf = "^3.20.4.2"
[[tool.poetry.source]]
name = "robocar"
url = "https://git.cyrilix.bzh/api/packages/robocars/pypi/simple"
priority = "explicit"
default = false
secondary = false
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]