diff --git a/ci/upload-artifactory.sh b/ci/upload-artifactory.sh index e15bc0ae5..b00b77323 100755 --- a/ci/upload-artifactory.sh +++ b/ci/upload-artifactory.sh @@ -5,5 +5,5 @@ curl -fL https://getcli.jfrog.io | sh cd wheelhouse/audited/ || exit 1 export PATH_PREFIX=luxonis-python-snapshot-local/depthai -../../jfrog rt config --url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS +../../jfrog config add --artifactory-url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS ../../jfrog rt u "*" "$PATH_PREFIX/" diff --git a/depthai-core b/depthai-core index acd24cbbc..5ba16496f 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit acd24cbbc0e79233f4fb37c93680738439938af9 +Subproject commit 5ba16496f09de407d6edf86319ddc0fb5134ed73 diff --git a/src/DatatypeBindings.cpp b/src/DatatypeBindings.cpp index 055f57a59..afe15ff34 100644 --- a/src/DatatypeBindings.cpp +++ b/src/DatatypeBindings.cpp @@ -64,14 +64,14 @@ void DatatypeBindings::bind(pybind11::module& m){ .def_readwrite("instanceNum", &RawImgFrame::instanceNum) .def_readwrite("sequenceNum", &RawImgFrame::sequenceNum) .def_property("ts", - [](const RawImgFrame& o){ - double ts = o.ts.sec + o.ts.nsec / 1000000000.0; - return ts; + [](const RawImgFrame& o){ + double ts = o.ts.sec + o.ts.nsec / 1000000000.0; + return ts; }, - [](RawImgFrame& o, double ts){ - o.ts.sec = ts; - o.ts.nsec = (ts - o.ts.sec) * 1000000000.0; - } + [](RawImgFrame& o, double ts){ + o.ts.sec = ts; + o.ts.nsec = (ts - o.ts.sec) * 1000000000.0; + } ) ; @@ -150,7 +150,7 @@ void DatatypeBindings::bind(pybind11::module& m){ .value("FP32", TensorInfo::DataType::FP32) .value("I8", TensorInfo::DataType::I8) ; - + py::enum_(tensorInfo, "StorageOrder") .value("NHWC", TensorInfo::StorageOrder::NHWC) .value("NHCW", TensorInfo::StorageOrder::NHCW) @@ -194,7 +194,7 @@ void DatatypeBindings::bind(pybind11::module& m){ .def(py::init<>()) .def_readwrite("detections", &RawSpatialImgDetections::detections) ; - + // Bind RawImageManipConfig py::class_> rawImageManipConfig(m, "RawImageManipConfig", DOC(dai, RawImageManipConfig)); rawImageManipConfig @@ -277,7 +277,7 @@ void DatatypeBindings::bind(pybind11::module& m){ .value("TRACKED", Tracklet::TrackingStatus::TRACKED) .value("LOST", Tracklet::TrackingStatus::LOST) ; - + // Bind RawTracklets py::class_> rawTacklets(m, "RawTracklets", DOC(dai, RawTracklets)); rawTacklets @@ -410,7 +410,7 @@ void DatatypeBindings::bind(pybind11::module& m){ py::array contiguous = numpy.attr("ascontiguousarray")(arr); frm.getData().resize(contiguous.nbytes()); - memcpy(frm.getData().data(), contiguous.data(), contiguous.nbytes()); + memcpy(frm.getData().data(), contiguous.data(), contiguous.nbytes()); }, py::arg("array"), "Copies array bytes to ImgFrame buffer") .def("getFrame", [](py::object &obj, bool copy){ @@ -426,14 +426,14 @@ void DatatypeBindings::bind(pybind11::module& m){ // obj is "Python" object, which we used then to bind the numpy view lifespan to // creates numpy array (zero-copy) which holds correct information such as shape, ... auto& img = obj.cast(); - + // shape bool valid = img.getWidth() > 0 && img.getHeight() > 0; std::vector shape = {img.getData().size()}; py::dtype dtype = py::dtype::of(); switch(img.getType()){ - + case ImgFrame::Type::RGB888i : case ImgFrame::Type::BGR888i : // HWC @@ -463,12 +463,12 @@ void DatatypeBindings::bind(pybind11::module& m){ break; case ImgFrame::Type::GRAYF16: - shape = {img.getHeight(), img.getWidth()}; + shape = {img.getHeight(), img.getWidth()}; dtype = py::dtype("half"); break; case ImgFrame::Type::RAW16: - shape = {img.getHeight(), img.getWidth()}; + shape = {img.getHeight(), img.getWidth()}; dtype = py::dtype::of(); break; @@ -477,7 +477,7 @@ void DatatypeBindings::bind(pybind11::module& m){ shape = {img.getHeight(), img.getWidth(), 3}; dtype = py::dtype("half"); break; - + case ImgFrame::Type::RGBF16F16F16p: case ImgFrame::Type::BGRF16F16F16p: shape = {3, img.getHeight(), img.getWidth()}; @@ -488,7 +488,7 @@ void DatatypeBindings::bind(pybind11::module& m){ default: shape = {img.getData().size()}; dtype = py::dtype::of(); - break; + break; } // Check if enough data @@ -504,13 +504,13 @@ void DatatypeBindings::bind(pybind11::module& m){ if(copy){ py::array a(dtype, shape); std::memcpy(a.mutable_data(), img.getData().data(), std::min( (long) (img.getData().size()), (long) (a.nbytes()))); - return a; + return a; } else { return py::array(dtype, shape, img.getData().data(), obj); } }, py::arg("copy") = false, "Returns numpy array with shape as specified by width, height and type") - + .def("getCvFrame", [](py::object &obj){ using namespace pybind11::literals; @@ -744,9 +744,10 @@ void DatatypeBindings::bind(pybind11::module& m){ .def(py::init<>()) .def_readwrite("config", &SpatialLocations::config) .def_readwrite("depthAverage", &SpatialLocations::depthAverage) + .def_readwrite("depthAveragePixelCount", &SpatialLocations::depthAveragePixelCount) .def_readwrite("spatialCoordinates", &SpatialLocations::spatialCoordinates) ; - + py::class_ (m, "Rect", DOC(dai, Rect)) .def(py::init<>())