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

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

diegovd gravatar image

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

Comments

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 -0600 )edit

The operations I mean can be found here. https://github.com/onnx/onnx/blob/mas.... Is any of these not supported?

diegovd gravatar imagediegovd ( 2019-06-08 19:38:44 -0600 )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 -0600 )edit

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

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

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 -0600 )edit