keras-onnx
keras-onnx copied to clipboard
How can do custom conversion?
@jiafatom @nswamy @buddhapuneeth Thank you very much for your repo. I want to convert keras model of maskrcnn into onnx format. I need custom conversion.
Is there any example or clue?
The example of converting keras mask-rcnn is here and running in our nightly build every day. The model has a custom conversion example: set_converter('CropAndResize', convert_tf_crop_and_resize)
.
Hi @jiafatom,
Thanks for sharing that code, I'm trying to do this but with custom trained weights, I see you downloaded mask_rcnn_coco.h5, but I don't see where the weights gets loaded into the model... how could I change that to load the custom weights ?
Also where did you get test_utils ? (from test_utils import run_onnx_runtime, print_mismatches, convert_tf_crop_and_resize)
To load your custom weights, just change model.load_weights
here. test_utils
is in our source code, please search inside our repo.
thanks a lot @jiafatom, yeah I found it now... I'm going to try it out.
Thanks a lot @jiafatom it worked !!