Are All the Onnx 1.5 implemented operations supported by the OpenCv 4.1 readNetfromOnnx Importer?

asked 2019-06-08 09:12:54 -0500

I was wandering if there were any operations that ONNX can import but that cannot by imported by the OpenCv importer.

edit retag flag offensive close merge delete


Please provide us at least the list of all the ONNX operations mentioned in the topic.

dkurt gravatar imagedkurt ( 2019-06-08 15:46:05 -0500 )edit

The operations I mean can be found here. Is any of these not supported?

diegovd gravatar imagediegovd ( 2019-06-08 19:38:44 -0500 )edit

Do you already have a network? It's better to start with specific model to say if it's supported or not yet. Anyway there is custom layers support so users can implement it in runtime.

dkurt gravatar imagedkurt ( 2019-06-09 03:01:11 -0500 )edit

What about "Cast" operator. I try by customer layer. but still not working.

class CastLayer(object):
def __init__(self, params, blobs): = params.get('to')

def getMemoryShapes(self, inputs):
    if len(inputs)==0:
        #return self.input
        return [[1,3,96,96],[1,3,96,96]]
    inputShape = inputs[0]
    batchSize, numChannels = inputShape[0], inputShape[1]
    height, width = inputShape[2], inputShape[3]

    return [[batchSize, numChannels, height, width]]

def forward(self, inputs):
    return [np.float(inputs[0])]
NickKao gravatar imageNickKao ( 2019-08-27 23:39:01 -0500 )edit