Skip to content

Dnn concatenation with constants ignores the constant #20332

@Happyzippy

Description

@Happyzippy
System information (version)
  • OpenCV => 4.5.2.54 - Python
  • Operating System / Platform => Windows 64 Bit
  • Compiler => opencv-python pip package
Detailed description

dnn concatenation with a constant, ignores the constant input and outputs the concatenation of the other signals in the block

Steps to reproduce

download and unzip model.onnx file, replace onnx_path with the path to model.onnx
model.zip

import cv2
N = 1
net = cv2.dnn.readNetFromONNX(onnx_path)
xin = np.ones((N, 3, 10, 10))
net.setInput(xin)
out = net.forward()
print(xin.shape, "->", out.shape)

Expected output
(1, 3, 10, 10) -> (1, 6, 10, 10)
Actual output
(1, 3, 10, 10) -> (1, 3, 10, 10)

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions