[ERROR:0] global ./modules/dnn/src/dnn.cpp (3551) getLayerShapesRecursively OPENCV/DNN: [Eltwise]:(252): getMemoryShapes() throws exception. inputs=2 outputs=1/1 blobs=0
[ERROR:0] global ./modules/dnn/src/dnn.cpp (3557) getLayerShapesRecursively input[0] = [ 1 64 109 160 ]
[ERROR:0] global ./modules/dnn/src/dnn.cpp (3557) getLayerShapesRecursively input[1] = [ 1 64 108 160 ]
[ERROR:0] global ./modules/dnn/src/dnn.cpp (3561) getLayerShapesRecursively output[0] = [ 1 64 109 160 ]
[ERROR:0] global ./modules/dnn/src/dnn.cpp (3567) getLayerShapesRecursively Exception message: OpenCV(4.5.4) ./modules/dnn/src/layers/eltwise_layer.cpp:247: error: (-215:Assertion failed) inputs[vecIdx][j] == inputs[i][j] in function 'getMemoryShapes'
thread 'main' panicked at src/main.rs:20:41:
called Result::unwrap() on an Err value: Error { code: "StsAssert, -215", message: "OpenCV(4.5.4) ./modules/dnn/src/layers/eltwise_layer.cpp:247: error: (-215:Assertion failed) inputs[vecIdx][j] == inputs[i][j] in function 'getMemoryShapes'\n" }
```rust
use opencv::{
core::Size,
imgcodecs,
objdetect::FaceDetectorYN,
prelude::*,
};
fn main() {
let mut detector = FaceDetectorYN::create_def(
"./face_detection_yunet_2023mar.onnx",
"",
Size::new(100, 100),
)
.unwrap();
let img = imgcodecs::imread("./face.png", imgcodecs::IMREAD_COLOR).unwrap();
detector.set_input_size(img.size().unwrap()).unwrap();
let mut faces = Mat::default();
detector.detect(&img, &mut faces).unwrap();
}
I followed the official tutorial, I took the files from the same place
thread 'main' panicked at src/main.rs:20:41: called
Result::unwrap()
on anErr
value: Error { code: "StsAssert, -215", message: "OpenCV(4.5.4) ./modules/dnn/src/layers/eltwise_layer.cpp:247: error: (-215:Assertion failed) inputs[vecIdx][j] == inputs[i][j] in function 'getMemoryShapes'\n" }I followed the official tutorial, I took the files from the same place