libovmatting icon indicating copy to clipboard operation
libovmatting copied to clipboard

Cannot create MVN layer InstanceNormalization_205.

Open 972461099 opened this issue 3 years ago • 3 comments

Hi,thanks your nice work. I meet some err. I retrained the modnet model, I got a new onnx,and then replaced your onnx, I meet the error: MatterChannel::create():Cannot create MVN layer InstanceNormalization_205/Ins_Norm/MVN_id:500 from unsupported opset:opset6 Can not create Matte Channel.

972461099 avatar May 20 '21 08:05 972461099

@972461099

AFA, libovmatting library only supports two matting method: METHOD_BACKGROUND_MATTING_V2 and METHOD_MODNET. It is defined in 'include/ovmatter.h'.

METHOD_BACKGROUND_MATTING_V2 method uses model defined in 'pytorch_mobilenetv2.bin/pytorch_mobilenetv2.xml'.

METHOD_MODNET method uses model defined in 'modnet.bin/modnet.xml' .

if you want to use your own model, you can do following steps:

  • define new matting methed enum 'MattingMethod' which is defined in 'include/ovmatter.h'
  • declare and implement a new class inheriting 'MatterBaseImpl', then write a new cnn that uses your own models.

That's all. Good Luck.

kingpeter2015 avatar May 20 '21 08:05 kingpeter2015

Thank you for your reply. I also use the modnet model, which is only used to replace your xml and bin, and the others have not changed. In addition to changing the resolution size of the fixed input in onnx. It’s just that I re-converted the original model from "https://github.com/ZHKKKe/MODNet", onnx==12, openvino==2021.2.185, this process is no problem, in the python version Can run smoothly. So I want to know whether you have modified the original model during the conversion process?

972461099 avatar May 24 '21 06:05 972461099

@972461099

The attachment file is origin onnx file i've used in the library. Please Ref

modnet.zip

kingpeter2015 avatar May 24 '21 06:05 kingpeter2015