-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to export and run on android the exported custom class trained model using mask_rcnn_fbnetv3a_C4.yaml #489
Comments
could you provide more context? |
I have trained a custom class model using mask_rcnn_fbnetv3a_C4.yaml and exported the model using the following code import copy from d2go.export.d2_meta_arch import patch_d2_meta_archfrom d2go.runner import GeneralizedRCNNRunner disable all the warningsprevious_level = logging.root.manager.disable patch_d2_meta_arch()torch.backends.quantized.engine = 'qnnpack' datasets = cfg.DATASETS.TRAIN[0] cfg.QUANTIZATION.BACKEND = 'qnnpack' predictor_path = convert_and_export_predictor( recover the logging levellogging.disable(previous_level) f = open('config2.yml', 'w') #for android class Wrapper(torch.nn.Module):
orig_model = torch.jit.load(os.path.join(predictor_path, "model.jit")) metrics = runner.do_test(cfg, model) print(metrics) These two model which I have exported is working fine while inferencing in python notebook but the .pt model for android is not working how to resolve this issue??? |
did you find any way out to run custom model in android?? |
You've to optimize the model and use .ptl format to use it in android.
|
Hello @labs10 , I have implmented the same solution provided by you, but its giving me the error |
@VaibhavAsare d2go provides mobile optimized tracing, use |
@labs10 This also not working in android. Is This issue with instance segmentation using mask_rcnn_fbnetv3a_C4.yaml only??? |
@VaibhavAsare I think the forward function must be changed since it is a mask-rcnn model. Ideally a fastrcnn model has three outputs and maskrcnn unlike fastrcnn has an extra output i.e masks No? |
@VaibhavAsare please let me know if this works. |
@nkhlS141 No it is working. |
Hello Everyone,
I have trained a custom class model using mask_rcnn_fbnetv3a_C4.yaml and exported the model demo begineer notebook in the repoistry but the model is not working in android.
How to solve this issue ?? and
how to check the exported model is working fine in our working environment ???
The text was updated successfully, but these errors were encountered: